|
|||||||||||
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.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 org.tigris.gef.presentation.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 org.tigris.gef.presentation.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 org.tigris.gef.presentation.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 |
Fields inherited from class org.tigris.gef.presentation.FigNode |
_blinkPorts, _figEdges, _highlight, ang135, ang225, ang315, ang45 |
Fields inherited from class org.tigris.gef.presentation.FigGroup |
_dynObjects, _extraFrameSpace |
Fields inherited from class org.tigris.gef.presentation.Fig |
_allowsSaving, _context, _dashes, _displayed, _fillColor, _filled, _g2dashes, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _selected, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, DASH_ARRAYS, DASHED_CHOICES, MIN_SIZE |
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(org.tigris.gef.presentation.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. |
org.tigris.gef.presentation.FigLine |
getLifeLine()
|
java.awt.Color |
getLineColor()
|
int |
getLineWidth()
|
ObjectNode |
getObjectNode()
Returns the ObjectNode. |
org.tigris.gef.presentation.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(ru.novosoft.uml.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(org.tigris.gef.presentation.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(org.tigris.gef.presentation.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 org.tigris.gef.presentation.FigNode |
addFigEdge, bindPort, cleanUp, clone, contains, endTrans, getBlinkPorts, getFigEdges, getHighlight, getPortFigs, getPortFigs, getPortSector, hidePorts, hitPort, hitPort, isBlinkPorts, isDragConnectable, mouseEntered, mouseExited, mousePressed, removeFigEdge, removePort, setBlinkPorts, setHighlight, showPorts, translate, updateEdges |
Methods inherited from class org.tigris.gef.presentation.FigGroup |
addFigs, deepSelect, elements, getDisplayedFigs, getExtraFrameSpace, getFigAt, getFigs, getFigs, getFont, getFontFamily, getFontSize, getPrivateData, getSize, getSubFigBounds, getTextColor, getTextFillColor, getTextFilled, hitFig, isReshapable, isRotatable, iterator, parseDynObjects, removeAll, setExtraFrameSpace, setFigs, setFigs, setFont, setFontFamily, setFontSize, setLineColor, setPrivateData, setTextColor, setTextFillColor, setTextFilled |
Methods inherited from class org.tigris.gef.presentation.Fig |
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, connectionPoint, contains, contains, countCornersContained, createDrag, drawDashedLine, drawDashedPerimeter, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoints, getPoints, getPreferedSize, getResource, getSingle, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopieable, isCopyable, isCutable, isDisplayed, isFactoryConstructed, isLowerRightResizable, isMovable, isResizable, isSelected, isVisible, OK, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setCenter, setContext, setDashed, setDashedString, setDisplayed, setGroup, setHeight, setLayer, setLocation, setLocation, setLocked, setMovable, setNumPoints, setPoints, setPoints, setPoints, setPoints, setPoints, setResizable, setResource, setSavingAllowed, setSelected, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within |
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.tigris.gef.ui.Highlightable |
addPropertyChangeListener, removePropertyChangeListener |
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 org.tigris.gef.presentation.FigRect _outerBox
private org.tigris.gef.presentation.FigRect _backgroundBox
private org.tigris.gef.presentation.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.MouseListener
MouseListener.mouseReleased(MouseEvent)
protected void updateNameText()
updateNameText
in class FigNodeModelElement
FigNodeModelElement.updateNameText()
protected void updateStereotypeText()
FigNodeModelElement
updateStereotypeText
in class FigNodeModelElement
FigNodeModelElement.updateStereotypeText()
private void center(org.tigris.gef.presentation.FigText figText)
public void setBounds(int x, int y, int w, int h)
Fig.setBounds(int, int, int, int)
private void reSize(org.tigris.gef.presentation.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 FigNodeModelElement
Fig.calcBounds()
,
FigNodeModelElement.calcBounds()
private void removeActivations()
private void addActivations()
public void updateActivations()
protected void updateBounds()
updateBounds
in class FigNodeModelElement
FigNodeModelElement.updateBounds()
public void setLineWidth(int w)
Fig.setLineWidth(int)
public void setFillColor(java.awt.Color col)
Fig.setFillColor(java.awt.Color)
public void setFilled(boolean filled)
Fig.setFilled(boolean)
public java.awt.Color getFillColor()
Fig.getFillColor()
public boolean getFilled()
Fig.getFilled()
public java.awt.Color getLineColor()
Fig.getLineColor()
public int getLineWidth()
Fig.getLineWidth()
protected void updateListeners(java.lang.Object newOwner)
FigNodeModelElement
updateListeners
in class FigNodeModelElement
newOwner
- FigNodeModelElement.updateListeners(java.lang.Object)
protected void modelChanged(ru.novosoft.uml.MElementEvent mee)
FigNodeModelElement
modelChanged
in class FigNodeModelElement
FigNodeModelElement.modelChanged(MElementEvent)
private void updateClassifierRoleNames()
private void updateBaseNames()
private void updateObjectName()
public void renderingChanged()
FigNodeModelElement
renderingChanged
in class FigNodeModelElement
FigNodeModelElement.renderingChanged()
public java.lang.Object deepHitPort(int x, int y)
This method has a side effect of creating a FigLinkPort if ???
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 FigNodeModelElement
Fig.setOwner(java.lang.Object)
public FigLink getFigLink(FigLinkPort portFig)
FigLink
that is attached to the given
FigLinkPort
.
portFig
-
FigLink
that is attached.public org.tigris.gef.presentation.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 org.tigris.gef.presentation.Fig getPortFig(java.lang.Object np)
FigNode.getPortFig(java.lang.Object)
public void setNode(int index, Node node)
index
- node
- public ObjectNode getObjectNode()
public void removeFig(org.tigris.gef.presentation.Fig f)
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 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |