|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
org.argouml.uml.ui.UMLPlainTextDocument
Model for a text property on a model element. It listens to property change events for the given property name so that changes made to the underlying UML model are reflected here.
NOTE: If you override the insertString() or remove() methods be sure to preserve the flushEvents() calls to keep things synchronized. Events caused by updates are delivered asynchronously to the actual update calls.
| Nested Class Summary |
| Nested classes inherited from class javax.swing.text.AbstractDocument |
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement |
| Field Summary |
| Fields inherited from class javax.swing.text.PlainDocument |
lineLimitAttribute, tabSizeAttribute |
| Fields inherited from class javax.swing.text.AbstractDocument |
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName |
| Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
| Constructor Summary | |
UMLPlainTextDocument(String name)
Constructor for UMLPlainTextDocument. |
|
| Method Summary | |
String |
getEventName()
Returns the eventName. |
protected abstract String |
getProperty()
|
Object |
getTarget()
Returns the target. |
void |
insertString(int offset,
String str,
AttributeSet a)
|
boolean |
isEditing()
Returns the editing. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
remove(int offs,
int len)
|
void |
setEditing(boolean ed)
Sets the editing. |
protected void |
setEventName(String en)
Sets the eventName. |
protected abstract void |
setProperty(String text)
|
void |
setTarget(Object target)
Sets the target. |
void |
targetAdded(TargetEvent e)
Fired when a target is added to the list of targets. |
void |
targetRemoved(TargetEvent e)
Fired when a target is removed from the list of targets |
void |
targetSet(TargetEvent e)
Fired when a total new set of targets is set |
| Methods inherited from class javax.swing.text.PlainDocument |
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.swing.text.Document |
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeDocumentListener, removeUndoableEditListener, render |
| Constructor Detail |
public UMLPlainTextDocument(String name)
name - the event| Method Detail |
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)public final Object getTarget()
public final void setTarget(Object target)
target - The target to set
public void insertString(int offset,
String str,
AttributeSet a)
throws BadLocationException
insertString in interface DocumentBadLocationExceptionDocument.insertString(
int, java.lang.String, javax.swing.text.AttributeSet)
public void remove(int offs,
int len)
throws BadLocationException
remove in interface DocumentBadLocationExceptionDocument.remove(int, int)protected abstract void setProperty(String text)
text - the value of the propertyprotected abstract String getProperty()
public boolean isEditing()
public void setEditing(boolean ed)
ed - The editing to setpublic String getEventName()
protected void setEventName(String en)
en - The eventName to setpublic void targetAdded(TargetEvent e)
TargetListener
targetAdded in interface TargetListenere - The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(org.argouml.ui.targetmanager.TargetEvent)public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved in interface TargetListenere - The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(org.argouml.ui.targetmanager.TargetEvent)public void targetSet(TargetEvent e)
TargetListener
targetSet in interface TargetListenere - The targetevent, name will be TARGET_SETTargetListener.targetSet(org.argouml.ui.targetmanager.TargetEvent)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |