|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tigris.gef.presentation.Fig
org.tigris.gef.presentation.FigGroup
org.tigris.gef.presentation.FigNode
org.argouml.uml.diagram.ui.FigNodeModelElement
org.argouml.uml.diagram.sequence.ui.FigClassifierRole
Fig to show an object on a sequence diagram. The fig consists of an upper box that shows the name of the object (the owner) and a lifeline. The lifeline consists of lifeline elements. An element can be a dashed line (no link attached) or a rectangle (link attached).
| Field Summary | |
static int |
MARGIN
The margin between the outer box and the name and stereotype text box. |
static int |
MIN_HEAD_HEIGHT
The defaultheight of the object rectangle. |
static int |
MIN_HEAD_WIDTH
The defaultwidth of the object rectangle. |
static int |
ROWDISTANCE
The distance between two rows in the object rectangle. |
static int |
WIDTH
The width of an activation box. |
| Fields inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement |
ABSTRACT, ACTIVE, invisibleAllowed, LEAF, notationProviderName, ROOT, ROWHEIGHT, SHADOW_COLOR_ALPHA, SHADOW_COLOR_VALUE, STEREOHEIGHT |
| Fields inherited from class org.tigris.gef.presentation.FigNode |
_blinkPorts, _highlight, ang135, ang225, ang315, ang45 |
| Fields inherited from class org.tigris.gef.presentation.Fig |
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE, plotter |
| Constructor Summary | |
FigClassifierRole(Object node)
|
|
FigClassifierRole(Object node,
int x,
int y,
int w,
int h)
|
|
| Method Summary | |
void |
addNode(int position,
MessageNode node)
Adds a node at the given position. |
Object |
deepHitPort(int x,
int y)
Returns the port for a given coordinate pair. |
Color |
getFillColor()
|
boolean |
getFilled()
|
DefaultHandler |
getHandler(HandlerStack stack,
Object container,
String uri,
String localname,
String qname,
Attributes attributes)
|
int |
getIndexOf(MessageNode node)
Returns the index of a given node. |
Color |
getLineColor()
|
int |
getLineWidth()
|
MessageNode |
getNode(int position)
Gets a node that has the given position (creates new nodes if needed). |
int |
getNodeCount()
|
Fig |
getPortFig(Object messageNode)
|
static boolean |
isCallMessage(Object message)
|
static boolean |
isCreateMessage(Object message)
|
static boolean |
isDestroyMessage(Object message)
|
static boolean |
isReturnMessage(Object message)
|
Selection |
makeSelection()
Override to return a custom SelectionResize class that will not allow handles on the north edge to be dragged. |
protected void |
modelChanged(PropertyChangeEvent mee)
This is called after any part of the UML MModelElement has changed. |
void |
mouseReleased(MouseEvent me)
When the mouse button is released, this fig will be moved into position. |
MessageNode |
nextNode(MessageNode node)
Returns the node that's next to the given node. |
MessageNode |
previousNode(MessageNode node)
Returns the node that's before the given node in the nodes list. |
void |
renderingChanged()
Rerenders the fig. |
void |
setBoundsImpl(int x,
int y,
int w,
int h)
Sets the bounds and coordinates of this Fig. |
void |
setFillColor(Color col)
|
void |
setFilled(boolean filled)
|
void |
setLineWidth(int w)
Changing the line width should only change the line width of the outerbox and the lifeline. |
void |
setOwner(Object own)
In ArgoUML, for every Fig, this setOwner() function may only be called twice: Once after the fig is created, with a non-null argument, and once at end-of-life of the Fig, with a null argument. |
void |
superTranslate(int dx,
int dy)
This method is overridden in order to ignore change of y co-ordinate during drag. |
void |
updateActivations()
First removes all current activation boxes, then add new ones to the figobject depending on the state of the nodes. |
protected void |
updateBounds()
The width of the FigClassifierRole should be equal to the width of the name or stereo text box. |
protected void |
updateListeners(Object oldOwner,
Object newOwner)
Implementations of this method should register/unregister the fig for all (model)events. |
protected void |
updateNameText()
Constructs the contents of the name text box and upates the name text box accordingly. |
protected void |
updateStereotypeText()
Updates the text of the sterotype FigText. |
| Methods inherited from class org.tigris.gef.presentation.FigNode |
addFigEdge, bindPort, cleanUp, contains, dispose, endTrans, getFigEdges, getFigEdges, getHighlight, getPortFigs, getPortSector, hidePorts, hitPort, hitPort, isBlinkPorts, mouseEntered, mouseExited, mousePressed, paint, removeFigEdge, removePort, setBlinkPorts, setHighlight, showPorts, translateImpl, updateEdges |
| Methods inherited from class org.tigris.gef.presentation.FigGroup |
addFig, addFigs, deepSelect, elements, getDisplayedFigs, getExtraFrameSpace, getFigAt, getFigCount, getFigPosn, getFigs, getFont, getFontFamily, getFontSize, getPrivateData, getSubFigBounds, getTextColor, getTextFillColor, getTextFilled, hitFig, isReshapable, isRotatable, iterator, parseDynObjects, removeAll, removeFig, setExtraFrameSpace, setFigs, setFigs, setFont, setFontFamily, setFontSize, setLineColor, setPrivateData, setTextColor, setTextFillColor, setTextFilled |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.MouseListener |
mouseClicked, mouseEntered, mouseExited, mousePressed |
| Methods inherited from interface org.argouml.cognitive.Highlightable |
getHighlight, setHighlight |
| Methods inherited from interface org.tigris.gef.di.GraphicElement |
getId, getOwner, routingRect |
| Field Detail |
public static final int WIDTH
public static final int MARGIN
public static final int ROWDISTANCE
public static final int MIN_HEAD_HEIGHT
public static final int MIN_HEAD_WIDTH
| Constructor Detail |
public FigClassifierRole(Object node,
int x,
int y,
int w,
int h)
public FigClassifierRole(Object node)
| Method Detail |
public void mouseReleased(MouseEvent me)
mouseReleased in interface MouseListenerMouseListener.mouseReleased(MouseEvent)protected void updateNameText()
updateNameText in class FigNodeModelElementFigNodeModelElement.updateNameText()public int getNodeCount()
public void setBoundsImpl(int x,
int y,
int w,
int h)
Fig.setBoundsImpl(int, int, int, int)
public void superTranslate(int dx,
int dy)
FigNode.superTranslate(int, int)public static boolean isCallMessage(Object message)
public static boolean isReturnMessage(Object message)
public static boolean isCreateMessage(Object message)
public static boolean isDestroyMessage(Object message)
public void updateActivations()
public DefaultHandler getHandler(HandlerStack stack,
Object container,
String uri,
String localname,
String qname,
Attributes attributes)
throws SAXException
getHandler in interface HandlerFactorySAXExceptionHandlerFactory.getHandler(
org.tigris.gef.persistence.pgml.HandlerStack, java.lang.Object,
java.lang.String, java.lang.String, java.lang.String,
org.xml.sax.Attributes)protected void updateBounds()
updateBounds in class FigNodeModelElementFigNodeModelElement.updateBounds()public void setLineWidth(int w)
Fig.setLineWidth(int)public void setFillColor(Color col)
Fig.setFillColor(java.awt.Color)public void setFilled(boolean filled)
Fig.setFilled(boolean)public Color getFillColor()
Fig.getFillColor()public boolean getFilled()
Fig.getFilled()public Color getLineColor()
Fig.getLineColor()public int getLineWidth()
Fig.getLineWidth()
protected void updateListeners(Object oldOwner,
Object newOwner)
FigNodeModelElementAn explanation of the original purpose of this method is given in issue 1321.
This function is used in UMLDiagram, which removes all listeners to all Figs when a diagram is not displayed, and restore them when it becomes visible again.
In this case, it is imperative that indeed ALL listeners are updated, since they are ALL removed by the call to removeElementListener.
Additionally, this function may be used by the modelChanged() function.
In this case, it is also imperative that all listeners get removed / added.
updateListeners in class FigNodeModelElementnewOwner - null, or the owner of this.
The former means that listeners have to be removed,
the latter that they have to be set.
TODO: Should this not be boolean, to clarify?FigNodeModelElement#updateListeners(java.lang.Object)protected void modelChanged(PropertyChangeEvent mee)
FigNodeModelElement
modelChanged in class FigNodeModelElementmee - the ModelElementEvent that caused the changeFigNodeModelElement.modelChanged(java.beans.PropertyChangeEvent)public void renderingChanged()
FigNodeModelElementThis functionality was originally the functionality of modelChanged but modelChanged takes the event now into account.
renderingChanged in class FigNodeModelElementFigNodeModelElement.renderingChanged()
public Object deepHitPort(int x,
int y)
FigNode.deepHitPort(int, int)public void setOwner(Object own)
FigNodeModelElementHence, during the lifetime of this Fig object, the owner shall go from null to some UML object, and to null again.
setOwner in class FigNodeModelElementFig.setOwner(java.lang.Object)public int getIndexOf(MessageNode node)
node - is the given node
public MessageNode nextNode(MessageNode node)
node - is the given node
public MessageNode previousNode(MessageNode node)
node - is the given node
public Fig getPortFig(Object messageNode)
FigNode.getPortFig(java.lang.Object)
public void addNode(int position,
MessageNode node)
position - the position in which the node will be addednode - the node to be addedpublic MessageNode getNode(int position)
position - the position of the resulting node
public Selection makeSelection()
makeSelection in class FigNodeModelElementFig.makeSelection()protected void updateStereotypeText()
FigNodeModelElement
updateStereotypeText in class FigNodeModelElementFigNodeModelElement.updateStereotypeText()
|
|||||||||||
| 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 |