|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.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.
Field Summary | |
---|---|
private boolean |
_editing
True if an user edits the document directly (by typing in text) |
private java.lang.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 java.lang.Object |
_target
The target of the propertypanel that's behind this property. |
static Logger |
cat
|
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(java.lang.String eventName)
Constructor for UMLPlainTextDocument. |
Method Summary | |
---|---|
java.lang.String |
getEventName()
Returns the eventName. |
protected abstract java.lang.String |
getProperty()
|
java.lang.Object |
getTarget()
Returns the target. |
private void |
handleEvent()
|
void |
insertString(int offset,
java.lang.String str,
javax.swing.text.AttributeSet a)
|
boolean |
isEditing()
Returns the editing. |
private boolean |
isFiring()
|
void |
listRoleItemSet(MElementEvent e)
|
void |
propertySet(MElementEvent e)
|
void |
recovered(MElementEvent e)
|
void |
remove(int offs,
int len)
|
void |
removed(MElementEvent e)
|
void |
roleAdded(MElementEvent e)
|
void |
roleRemoved(MElementEvent e)
|
void |
setEditing(boolean editing)
Sets the editing. |
protected void |
setEventName(java.lang.String eventName)
Sets the eventName. |
private void |
setFiring(boolean firing)
|
protected abstract void |
setProperty(java.lang.String text)
|
void |
setTarget(java.lang.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 javax.swing.text.AbstractDocument |
---|
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Logger cat
private boolean _firing
private boolean _editing
private java.lang.Object _target
private java.lang.String _eventName
Constructor Detail |
public UMLPlainTextDocument(java.lang.String eventName)
Method Detail |
public void propertySet(MElementEvent e)
ru.novosoft.uml.MElementListener#propertySet(ru.novosoft.uml.MElementEvent)
public void roleAdded(MElementEvent e)
ru.novosoft.uml.MElementListener#roleAdded(ru.novosoft.uml.MElementEvent)
public void roleRemoved(MElementEvent e)
ru.novosoft.uml.MElementListener#roleRemoved(ru.novosoft.uml.MElementEvent)
public void listRoleItemSet(MElementEvent e)
ru.novosoft.uml.MElementListener#listRoleItemSet(ru.novosoft.uml.MElementEvent)
public void removed(MElementEvent e)
ru.novosoft.uml.MElementListener#removed(ru.novosoft.uml.MElementEvent)
public void recovered(MElementEvent e)
ru.novosoft.uml.MElementListener#recovered(ru.novosoft.uml.MElementEvent)
public final java.lang.Object getTarget()
public final void setTarget(java.lang.Object target)
target
- The target to setpublic void insertString(int offset, java.lang.String str, javax.swing.text.AttributeSet a) throws javax.swing.text.BadLocationException
insertString
in interface javax.swing.text.Document
insertString
in class javax.swing.text.PlainDocument
javax.swing.text.BadLocationException
Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)
public void remove(int offs, int len) throws javax.swing.text.BadLocationException
remove
in interface javax.swing.text.Document
remove
in class javax.swing.text.AbstractDocument
javax.swing.text.BadLocationException
Document.remove(int, int)
protected abstract void setProperty(java.lang.String text)
protected abstract java.lang.String getProperty()
private final void setFiring(boolean firing)
private final boolean isFiring()
private final void handleEvent()
public boolean isEditing()
public void setEditing(boolean editing)
editing
- The editing to setpublic java.lang.String getEventName()
protected void setEventName(java.lang.String eventName)
eventName
- 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 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |