|
|||||||||||
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
A new model for a textproperty. This model does not use reflection to reach its goal and will perform better therefore. Furthermore, it only reacts to events that are meant for this model which improves maintainability and performance.
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 | |
private boolean |
editing
True if an user edits the document directly (by typing in text) |
private String |
eventName
The name of the property set event that will change the property this document shows. |
private boolean |
firing
True if an event should be fired when the text of the document is changed |
private static Logger |
LOG
|
private Object |
panelTarget
The target of the propertypanel that's behind this property. |
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. |
private void |
handleEvent()
|
void |
insertString(int offset,
String str,
AttributeSet a)
|
boolean |
isEditing()
Returns the editing. |
private boolean |
isFiring()
|
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. |
private void |
setFiring(boolean f)
|
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 |
Field Detail |
private static final Logger LOG
private boolean firing
private boolean editing
private Object panelTarget
private String eventName
Constructor Detail |
public UMLPlainTextDocument(String name)
name
- the eventMethod Detail |
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public final Object getTarget()
public final void setTarget(Object target)
target
- The target to setpublic void insertString(int offset, String str, AttributeSet a) throws BadLocationException
insertString
in interface Document
BadLocationException
Document.insertString(
int, java.lang.String, javax.swing.text.AttributeSet)
public void remove(int offs, int len) throws BadLocationException
remove
in interface Document
BadLocationException
Document.remove(int, int)
protected abstract void setProperty(String text)
text
- the value of the propertyprotected abstract String getProperty()
private final void setFiring(boolean f)
private final boolean isFiring()
private final void handleEvent()
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 TargetListener
e
- The targetevent, name will be TARGET_ADDEDTargetListener.targetAdded(org.argouml.ui.targetmanager.TargetEvent)
public void targetRemoved(TargetEvent e)
TargetListener
targetRemoved
in interface TargetListener
e
- The targetevent, name will be TARGET_REMOVEDTargetListener.targetRemoved(org.argouml.ui.targetmanager.TargetEvent)
public void targetSet(TargetEvent e)
TargetListener
targetSet
in interface TargetListener
e
- 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-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |