|
||||||||||
| 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.sequence2.diagram.FigMessage
public class FigMessage
The Fig that represents a message between classifier roles.
| 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 | |
|---|---|
FigMessage(java.lang.Object edge,
DiagramSettings settings)
Construct a fig owned by the given UML element with the provided render settings. |
|
| Method Summary | |
|---|---|
protected ArgoJMenu |
buildOperationMenu()
|
void |
calcBounds()
|
void |
computeRouteImpl()
|
void |
convertToArc()
Converts the message into a spline. |
void |
deleteFromModel()
|
java.lang.Object |
determineActivator()
Determines the activator of this message based on the message position in relation to other messages. |
protected boolean |
determineFigNodes()
The default behaviour from FigEdgeModelElement is not correct here. |
java.lang.Object |
getAction()
Deprecated. This method is only called internally. If its needed at all it will become private. External callers can test for action type using isCallAction etc. If absolutely required the actions can be accessed via the model. |
protected int |
getNotationProviderType()
Overrule this for subclasses that need a different NotationProvider. |
protected SDNotationSettings |
getNotationSettings()
|
java.util.Vector |
getPopUpActions(java.awt.event.MouseEvent me)
|
protected void |
initNotationProviders(java.lang.Object own)
Replace the NotationProvider(s). |
Selection |
makeSelection()
|
void |
setFig(Fig f)
|
void |
setLineColor(java.awt.Color c)
|
protected void |
textEditStarted(FigText ft)
This method is called when the user doubleclicked on the text field, and starts editing. |
void |
translate(int dx,
int dy)
|
void |
updateLayout(UmlChangeEvent event)
This is a template method called by the ArgoUML framework as the result of a change to a model element. |
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 FigMessage(java.lang.Object edge,
DiagramSettings settings)
edge - owning UML elementsettings - rendering settings| Method Detail |
|---|
protected int getNotationProviderType()
FigEdgeModelElement
getNotationProviderType in class FigEdgeModelElementprotected void initNotationProviders(java.lang.Object own)
FigEdgeModelElementThis method shall not be used for the initial creation of notation providers, but only for replacing them when required. Initialization must be done in the constructor using methods which can't be overridden.
NotationProviders can not be updated - they are lightweight throw-away objects. Hence this method creates a (new) NotationProvider whenever needed. E.g. when the notation language is changed by the user, then the NPs are to be re-created. So, this method shall not be called from a Fig constructor.
After the removal of the deprecated method setOwner(), this method shall contain the following statement: assert notationProviderName != null
initNotationProviders in class FigEdgeModelElementown - the current ownerprotected void textEditStarted(FigText ft)
FigEdgeModelElementIt is also possible to alter the text to be edited already here, e.g. by adding the stereotype in front of the name, but that seems not user-friendly.
textEditStarted in class FigEdgeModelElementft - the FigText that will be edited and contains the start-textprotected SDNotationSettings getNotationSettings()
getNotationSettings in class FigEdgeModelElementpublic java.lang.Object getAction()
public java.util.Vector getPopUpActions(java.awt.event.MouseEvent me)
getPopUpActions in class FigEdgeModelElementme - the MouseEvent that triggered the popup menu request
protected ArgoJMenu buildOperationMenu()
public Selection makeSelection()
makeSelection in class FigEdgeModelElementSelectionRerouteEdge object that manages selection and
rerouting of the edge.org.tigris.gef.presentation.Fig#makeSelection()public void setFig(Fig f)
setFig in class FigEdgeModelElementpublic void convertToArc()
public void computeRouteImpl()
public void calcBounds()
public void setLineColor(java.awt.Color c)
setLineColor in class FigEdgeModelElementpublic void deleteFromModel()
deleteFromModel in class FigEdgeModelElementprotected boolean determineFigNodes()
determineFigNodes in class FigEdgeModelElement
public void translate(int dx,
int dy)
public void updateLayout(UmlChangeEvent event)
Override this in any subclasses in order to restructure the FigNode due to change of any model element that this FigNode is listening to.
This method is guaranteed by the framework to be running on the Swing/AWT thread.
updateLayout in class FigEdgeModelElementevent - the UmlChangeEvent that caused the changeFigEdgeModelElement.updateLayout(org.argouml.model.UmlChangeEvent)
protected void updateListeners(java.lang.Object oldOwner,
java.lang.Object newOwner)
FigEdgeModelElementBut 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 FigEdgeModelElementoldOwner - 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 removedpublic java.lang.Object determineActivator()
Currently this only manages return messages. Any other message type returns with no action taking place.
The activator is set to the first call or create message found above this message.
|
||||||||||
| 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 |