|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.argouml.uml.diagram.ui.DiagramNameDocument
This is the model for the diagram name text box (JTextField) shown on the property panel of a Diagram.
It handles changes by the user in the text-entry field, by updating the name of the diagram. And it handles target changes (i.e. when the user selects another diagram) by updating the name shown in the namefield.
Field Summary | |
private JTextField |
field
|
private boolean |
stopEvents
|
Constructor Summary | |
DiagramNameDocument(JTextField theField)
The constructor. |
Method Summary | |
void |
changedUpdate(DocumentEvent e)
|
void |
insertUpdate(DocumentEvent e)
|
void |
removeUpdate(DocumentEvent e)
|
private void |
setTarget(Object t)
If the currently selected object is a diagram, then update the name-field. |
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 |
private void |
update(DocumentEvent e)
If a new name has been typed by the user, then let's update the name of the diagram. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private JTextField field
private boolean stopEvents
Constructor Detail |
public DiagramNameDocument(JTextField theField)
Method Detail |
private void setTarget(Object t)
MVW: I added the stopEvents mechanism, because otherwise updating the field causes the UML model to be adapted!
t
- the currently selected objectpublic 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)
public void insertUpdate(DocumentEvent e)
insertUpdate
in interface DocumentListener
DocumentListener.insertUpdate(javax.swing.event.DocumentEvent)
public void removeUpdate(DocumentEvent e)
removeUpdate
in interface DocumentListener
DocumentListener.removeUpdate(javax.swing.event.DocumentEvent)
public void changedUpdate(DocumentEvent e)
changedUpdate
in interface DocumentListener
DocumentListener.changedUpdate(javax.swing.event.DocumentEvent)
private void update(DocumentEvent e)
e
- the documentevent from the Documentlistener interface
|
|||||||||||
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 |