|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--FigNode
|
+--org.argouml.uml.diagram.ui.FigNodeModelElement
|
+--org.argouml.uml.diagram.sequence.ui.FigObject
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 | |
|---|---|
private FigRect |
_backgroundBox
The filled box for the object box (object fig without lifeline). |
private java.lang.String |
_baseNames
The comma seperated list of base names of the classifierRole(s) that this object represents. |
private java.lang.String |
_classifierRoleNames
The comma seperated list of names of the classifierRole(s) that this object represents. |
private java.util.List |
_figActivations
The list where the figrects are stored that are the activation boxes. |
private java.util.List |
_figFigLinkPorts
The list with the figLinkPorts. |
private FigLine |
_lifeLine
The lifeline (dashed line under the object box to which activations are attached) |
private LifeLinePort |
_lifeLinePort
The owner of the lifeline. |
private java.util.List |
_linkPositions
The list where the nodes to which links can be attached are stored |
private java.lang.String |
_objectName
The name of the object (the owner of this fig). |
private FigRect |
_outerBox
The outer black rectangle of the object box (object fig without lifeline). |
static int |
DEFAULT_HEIGHT
The defaultheight of the object rectangle. |
static int |
DEFAULT_WIDTH
The defaultwidth of the object rectangle |
static int |
MARGIN
The margin between the outer box and the name and stereotype text box. |
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 |
|---|
_bigPort, _enclosedFigs, _encloser, _name, _readyToEdit, _shadowSize, _stereo, BUNDLE, checkSize, ITALIC_LABEL_FONT, LABEL_FONT, POPUP_ADD_OFFSET, ROWHEIGHT, SHADOW_COLOR_ALPHA, SHADOW_COLOR_VALUE, STEREOHEIGHT, suppressCalcBounds |
| Constructor Summary | |
|---|---|
FigObject()
Default constructor. |
|
FigObject(java.lang.Object node)
|
|
| Method Summary | |
|---|---|
private void |
addActivations()
|
void |
addNode(int position,
Node node)
|
void |
calcBounds()
|
private void |
center(FigText figText)
|
java.lang.Object |
deepHitPort(int x,
int y)
Returns the port for a given coordinate pair. |
java.util.List |
getActivationNodes(Node node)
Returns a list with all nodes that belong to the same activation as the given node. |
private java.lang.String |
getBeautifiedName(java.lang.Object o)
Returns a beautified name to show in the name text box. |
FigLink |
getFigLink(FigLinkPort portFig)
Gets the FigLink that is attached to the given
FigLinkPort. |
java.awt.Color |
getFillColor()
|
boolean |
getFilled()
|
int |
getIndexOf(Node node)
Returns the index of a given node. |
FigLine |
getLifeLine()
|
java.awt.Color |
getLineColor()
|
int |
getLineWidth()
|
ObjectNode |
getObjectNode()
Returns the ObjectNode. |
Fig |
getPortFig(java.lang.Object np)
|
java.util.List |
getPreviousActivation(Node node)
Returns a list with the start, end and all nodes in between them of the activation that is prior to the given node. |
private int |
getYCoordinate(Node node)
|
private int |
getYCoordinateForActivationBox(Node node,
boolean start)
|
boolean |
hasActivations()
Returns true if this FigObject has activations. |
void |
makeActivation(int startIndex,
int endIndex)
Makes an activation from the node with index startindex to the node with index endindex. |
void |
makeActivation(Node startNode,
Node endNode)
See makeActivation(int startIndex, int endIndex) |
protected void |
modelChanged(MElementEvent mee)
This is called aftern any part of the UML MModelElement has changed. |
void |
mouseReleased(java.awt.event.MouseEvent me)
When the mouse button is released, this fig will be moved into position |
Node |
nextNode(Node node)
Returns the node that's next to the given node. |
Node |
previousNode(Node node)
Returns the node that's before the given node in the nodes list. |
private void |
removeActivations()
|
void |
removeFig(Fig f)
Removes the fig from both the figs list as from the _figActivations list and the _figLinkPorts. |
void |
renderingChanged()
Rerenders the fig if needed. |
private void |
reSize(Fig f,
int x,
int y,
int w,
int h)
Scales the given fig that must be part of this FigObject. |
void |
setBounds(int x,
int y,
int w,
int h)
Sets the bounds and coordinates of this Fig. |
void |
setFillColor(java.awt.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 |
setNode(int index,
Node node)
Sets the given node on the given index in linkPositions. |
void |
setOwner(java.lang.Object own)
|
void |
updateActivations()
First removes all current activation boxes, then add new ones to the figobject depending on the state of the nodes. |
private void |
updateBaseNames()
|
protected void |
updateBounds()
The width of the FigObject should be equal to the width of the name or stereo text box. |
private void |
updateClassifierRoleNames()
|
protected void |
updateListeners(java.lang.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. |
private void |
updateObjectName()
|
protected void |
updateStereotypeText()
Updates the text of the sterotype FigText. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.MouseListener |
|---|
mouseClicked, mouseEntered, mouseExited, mousePressed |
| Field Detail |
public static final int WIDTH
public static final int MARGIN
public static final int ROWDISTANCE
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_WIDTH
private FigRect _outerBox
private FigRect _backgroundBox
private FigLine _lifeLine
private LifeLinePort _lifeLinePort
private java.util.List _linkPositions
private java.util.List _figActivations
private java.util.List _figFigLinkPorts
private java.lang.String _baseNames
private java.lang.String _classifierRoleNames
private java.lang.String _objectName
| Constructor Detail |
public FigObject()
public FigObject(java.lang.Object node)
node - | Method Detail |
public void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased in interface java.awt.event.MouseListenerMouseListener.mouseReleased(MouseEvent)protected void updateNameText()
updateNameText in class FigNodeModelElementFigNodeModelElement.updateNameText()protected void updateStereotypeText()
FigNodeModelElement
updateStereotypeText in class FigNodeModelElementFigNodeModelElement.updateStereotypeText()private void center(FigText figText)
public void setBounds(int x,
int y,
int w,
int h)
Fig#setBounds(int, int, int, int)
private void reSize(Fig f,
int x,
int y,
int w,
int h)
f - the fig to scalex - the new x coordinate for the FigObjecty - the new y coordinate for the FigObjectw - the new w coordinate for the FigObjecth - the new h coordinate for the FigObjectprivate java.lang.String getBeautifiedName(java.lang.Object o)
o - is the object
public void calcBounds()
calcBounds in class FigNodeModelElementFig#calcBounds(),
FigNodeModelElement.calcBounds()private void removeActivations()
private void addActivations()
public void updateActivations()
protected void updateBounds()
updateBounds in class FigNodeModelElementFigNodeModelElement.updateBounds()public void setLineWidth(int w)
org.tigris.gef.presentation.Fig#setLineWidth(int)public void setFillColor(java.awt.Color col)
org.tigris.gef.presentation.Fig#setFillColor(java.awt.Color)public void setFilled(boolean filled)
org.tigris.gef.presentation.Fig#setFilled(boolean)public java.awt.Color getFillColor()
org.tigris.gef.presentation.Fig#getFillColor()public boolean getFilled()
org.tigris.gef.presentation.Fig#getFilled()public java.awt.Color getLineColor()
org.tigris.gef.presentation.Fig#getLineColor()public int getLineWidth()
org.tigris.gef.presentation.Fig#getLineWidth()protected void updateListeners(java.lang.Object newOwner)
FigNodeModelElement
updateListeners in class FigNodeModelElementnewOwner - FigNodeModelElement.updateListeners(java.lang.Object)protected void modelChanged(MElementEvent mee)
FigNodeModelElement
modelChanged in class FigNodeModelElementFigNodeModelElement.modelChanged(MElementEvent)private void updateClassifierRoleNames()
private void updateBaseNames()
private void updateObjectName()
public void renderingChanged()
FigNodeModelElement
renderingChanged in class FigNodeModelElementFigNodeModelElement.renderingChanged()
public java.lang.Object deepHitPort(int x,
int y)
This method has a side effect of creating a FigLinkPort if ???
org.tigris.gef.presentation.FigNode#deepHitPort(int, int)private int getYCoordinate(Node node)
private int getYCoordinateForActivationBox(Node node,
boolean start)
public void setOwner(java.lang.Object own)
setOwner in class FigNodeModelElementorg.tigris.gef.presentation.Fig#setOwner(java.lang.Object)public FigLink getFigLink(FigLinkPort portFig)
FigLink that is attached to the given
FigLinkPort.
portFig -
FigLink that is attached.public FigLine getLifeLine()
public java.util.List getActivationNodes(Node node)
TODO: Does not work for EmptyNode atm.
node - is the given node
public int getIndexOf(Node node)
node - is the given node
public void makeActivation(Node startNode,
Node endNode)
startNode - endNode -
public void makeActivation(int startIndex,
int endIndex)
startIndex - endIndex - public Node nextNode(Node node)
node - is the given node
public Node previousNode(Node node)
node - is the given node
public boolean hasActivations()
FigObject has activations. An
activation is in this case a start ActivationNode and an end
ActivationNode in the Nodes list (_linkPositions).
FigObject has activations.public Fig getPortFig(java.lang.Object np)
org.tigris.gef.presentation.FigNode#getPortFig(java.lang.Object)
public void setNode(int index,
Node node)
index - node - public ObjectNode getObjectNode()
public void removeFig(Fig f)
org.tigris.gef.presentation.FigGroup#removeFig(Fig)public java.util.List getPreviousActivation(Node node)
node - is the given node
public void addNode(int position,
Node node)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
| ArgoUML © 1996-2004 (20040306) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |