|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.argouml.notation.NotationProvider
org.argouml.notation.providers.AssociationEndNameNotation
public abstract class AssociationEndNameNotation
This abstract class forms the basis of all Notation providers for the text shown next to the end of an association. Subclass this for all languages.
| Constructor Summary | |
|---|---|
protected |
AssociationEndNameNotation()
The constructor. |
| Method Summary | |
|---|---|
void |
initialiseListener(java.beans.PropertyChangeListener listener,
java.lang.Object modelElement)
Initialise the appropriate model change listeners for the given modelelement to the given listener. |
void |
updateListener(java.beans.PropertyChangeListener listener,
java.lang.Object modelElement,
java.beans.PropertyChangeEvent pce)
Update the set of listeners based on the given event. |
| Methods inherited from class org.argouml.notation.NotationProvider |
|---|
addElementListener, addElementListener, addElementListener, cleanListener, formatNameList, formatNameList, getParsingHelp, parse, removeAllElementListeners, removeElementListener, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AssociationEndNameNotation()
| Method Detail |
|---|
public void initialiseListener(java.beans.PropertyChangeListener listener,
java.lang.Object modelElement)
NotationProvider
initialiseListener in class NotationProviderlistener - the given listenermodelElement - the modelelement that we provide
notation for
public void updateListener(java.beans.PropertyChangeListener listener,
java.lang.Object modelElement,
java.beans.PropertyChangeEvent pce)
NotationProviderThe default implementation just removes all listeners, and then re-initialises completely - this is method 1. A more efficient way would be to dissect the propertyChangeEvent, and only adapt the listeners that need to be adapted - this is method 2.
Method 2 is explained by the code below that is commented out. Method 1 is the easiest to implement, since at every arrival of an event, we just remove all old listeners, and then inspect the current model, and add listeners where we need them. I.e. the advantage is that we only need to traverse the model structure in one location, i.e. the initialiseListener() method.
updateListener in class NotationProviderlistener - the given listenermodelElement - the modelelement that we provide
notation forpce - the received event, that we base the changes on
|
||||||||||
| 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 |