|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFigEdgePoly
org.argouml.uml.diagram.ui.FigEdgeModelElement
org.argouml.uml.diagram.use_case.ui.FigExtend
public class FigExtend
A fig for use with extend relationships on use case diagrams.
Realised as a dotted line with an open arrow head and the label «extend» together with any condition alongside.
Field Summary |
---|
Fields inherited from interface org.argouml.uml.diagram.ui.ArgoFig |
---|
DEBUG, DEBUG_COLOR, FILL_COLOR, INVISIBLE_LINE_COLOR, LINE_COLOR, LINE_WIDTH, ROWHEIGHT, SOLID_FILL_COLOR, STEREOHEIGHT, TEXT_COLOR, X0, Y0 |
Constructor Summary | |
---|---|
FigExtend(java.lang.Object owner,
DiagramSettings settings)
Construct an Extend fig. |
Method Summary | |
---|---|
protected boolean |
canEdit(Fig f)
Define whether the given fig can be edited (it can't). |
protected void |
modelChanged(java.beans.PropertyChangeEvent e)
This is called after any part of the UML ModelElement has changed. |
void |
paint(java.awt.Graphics g)
|
void |
renderingChanged()
Rerenders the attached elements of the fig. |
void |
setFig(Fig f)
Set a new fig to represent this edge. |
protected void |
updateConditionText()
Now sort out the condition text. |
protected void |
updateLabel()
|
protected void |
updateListeners(java.lang.Object oldOwner,
java.lang.Object newOwner)
Implementations of this method should register/unregister the fig for all (model)events that may cause a repaint to be necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.argouml.cognitive.Highlightable |
---|
getHighlight, setHighlight |
Constructor Detail |
---|
public FigExtend(java.lang.Object owner, DiagramSettings settings)
owner
- uml elementsettings
- rendering settingsMethod Detail |
---|
public void setFig(Fig f)
We invoke the superclass accessor. Then change aspects of the new fig that are not as we want. In this case to use dashed lines.
setFig
in class FigEdgeModelElement
f
- The fig to use.protected boolean canEdit(Fig f)
canEdit
in class FigEdgeModelElement
f
- The fig about which the enquiry is being made. Ignored in this
implementation.
false
under all circumstances.public void paint(java.awt.Graphics g)
protected void updateListeners(java.lang.Object oldOwner, java.lang.Object newOwner)
FigEdgeModelElement
But for, for example, for a FigLink the fig must also register for events fired by the association of the owner - because the name of the association is shown, not the name of the Link.
In other cases, there is no need to register for any event, e.g. when a notationProvider is used.
This function is called in 2 places: at creation (load) time of this Fig, i.e. when the owner changes, and in some cases by the modelChanged() function, i.e. when the model changes.
This function shall always register for the "remove" event of the owner! Otherwise the Fig will not be deleted when the owner gets deleted.
IF this method is called with both the oldOwner and the newOwner equal and not null, AND we listen only to the owner itself, THEN we can safely ignore the call, but ELSE we need to update the listeners of the related elements, since the related elements may have been replaced.
updateListeners
in class FigEdgeModelElement
oldOwner
- the previous owner,
or null if there was none, and all listeners have to be setnewOwner
- the new owner for the listeners,
or null if all listeners have to be removedprotected void modelChanged(java.beans.PropertyChangeEvent e)
FigEdgeModelElement
modelChanged
in class FigEdgeModelElement
e
- the eventpublic void renderingChanged()
FigEdgeModelElement
Warning: The purpose of this function is NOT to redraw the whole Fig every time something changes. That would be inefficient.
Instead, this function should only be called for major changes that require a complete redraw, such as change of owner, and change of notation language.
Overrule this function for subclasses that add extra or remove graphical parts.
renderingChanged
in interface ArgoFig
renderingChanged
in class FigEdgeModelElement
protected void updateConditionText()
protected void updateLabel()
|
||||||||||
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 |