Class JmtCell
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.jgraph.graph.DefaultGraphCell
jsimgraph.JGraphMod.JmtCell
- All Implemented Interfaces:
Serializable, Cloneable, MutableTreeNode, TreeNode, org.jgraph.graph.GraphCell
- Direct Known Subclasses:
CacheCell, ClassSwitchCell, DelayCell, ForkCell, JoinCell, LoggerCell, PlaceCell, RouterCell, ScalerCell, SemaphoreCell, ServerCell, SinkCell, SourceCell, TerminalCell, TransitionCell
public abstract class JmtCell
extends org.jgraph.graph.DefaultGraphCell
vertex cell for jmt
- Author:
- Federico Granata Date: 11-lug-2003 Time: 13.48.34, Bertoli Marco
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intintstatic final intstatic final intintstatic final intstatic final intstatic final intbooleanstatic final intstatic final intstatic final intintstatic final intDifferent kind of nodes.static final intstatic final intintFields inherited from class org.jgraph.graph.DefaultGraphCell
attributesFields inherited from class DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.jgraph.graph.Port[]Creates the ports for this vertexbooleanTells if this station generates or destroys jobs (useful for blocking region management)getIcon()Returns name of the icon of this cellreturn the dimension of the iconReturns previous parent of this cell (the one present when resetParent() method was called)doublegetSize(org.jgraph.JGraph graph) Returns Cell's real size (this method considers Icon and name size)return the dimension of the iconbooleanTells if the free rotation is allowed for this cellbooleanTells if the InputPort of this cell is on the left sidebooleanTells if this cell parent was changed since last call to resetParent() methodvoidResets stored parent information for this cellsetAttributes(Point2D pt, org.jgraph.JGraph graph) Sets all the attributes like background colour, dimensions, port number & positionvoidsetFreeRotationAllowed(boolean value) Sets the value of the attribute isFreeRotationAllowedvoidSets name of the icon of this cellvoidsetIconModifiers(boolean isMirrored, boolean isFreeRotationAllowed, double angle) Sets the attributes that have an impact on the rendering of the cell ImagevoidsetLeftInputCell(boolean state) voidsetRotationAngle(double value) Sets the angle of rotation of the cellvoidupdateCellSize(Icon icon, org.jgraph.JGraph graph) Changes the bounds of the cellvoidMethods inherited from class org.jgraph.graph.DefaultGraphCell
addPort, addPort, addPort, changeAttributes, clone, getAttributes, getChildren, setAttributesMethods inherited from class DefaultMutableTreeNode
add, breadthFirstEnumeration, children, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString
-
Field Details
-
SOURCE
public static final int SOURCEDifferent kind of nodes.- See Also:
-
SINK
public static final int SINK- See Also:
-
TERMINAL
public static final int TERMINAL- See Also:
-
ROUTER
public static final int ROUTER- See Also:
-
DELAY
public static final int DELAY- See Also:
-
SERVER
public static final int SERVER- See Also:
-
FORK
public static final int FORK- See Also:
-
JOIN
public static final int JOIN- See Also:
-
LOGGER
public static final int LOGGER- See Also:
-
CLASSSWITCH
public static final int CLASSSWITCH- See Also:
-
CACHE
public static final int CACHE- See Also:
-
SEMAPHORE
public static final int SEMAPHORE- See Also:
-
SCALER
public static final int SCALER- See Also:
-
PLACE
public static final int PLACE- See Also:
-
TRANSITION
public static final int TRANSITION- See Also:
-
seen
public boolean seen -
in
public int in -
out
public int out -
sons
public int sons -
icon
-
type
public int type
-
-
Constructor Details
-
JmtCell
-
-
Method Details
-
getSize
Returns Cell's real size (this method considers Icon and name size)- Parameters:
graph-JGraphobject to retrieve font dimension informations- Returns:
- cell's real size Bertoli Marco 4-giu-2005
-
createPorts
public abstract org.jgraph.graph.Port[] createPorts()Creates the ports for this vertex- Returns:
- array of ports
-
setAttributes
-
updatePortPositions
-
updateCellSize
Changes the bounds of the cell- Parameters:
icon- icon of the cellgraph-
-
isLeftInputCell
public boolean isLeftInputCell()Tells if the InputPort of this cell is on the left side- Returns:
- true if the InputPort of this cell is on the left side
-
setLeftInputCell
public void setLeftInputCell(boolean state) -
resetParent
public void resetParent()Resets stored parent information for this cell -
parentChanged
public boolean parentChanged()Tells if this cell parent was changed since last call to resetParent() method- Returns:
- true if parent changed, false otherwise
- See Also:
-
generateOrDestroyJobs
public boolean generateOrDestroyJobs()Tells if this station generates or destroys jobs (useful for blocking region management)- Returns:
- true if this station generates or destroy jobs, false otherwise
-
getPrevParent
Returns previous parent of this cell (the one present when resetParent() method was called)- Returns:
- previous parent of this cell
- See Also:
-
setIcon
Sets name of the icon of this cell- Parameters:
icon- : name of the icon of this cell
-
getIcon
Returns name of the icon of this cell- Returns:
- name of the icon of this cell
-
setFreeRotationAllowed
public void setFreeRotationAllowed(boolean value) Sets the value of the attribute isFreeRotationAllowed- Parameters:
value- : tells if the free rotation is allowed
-
isFreeRotationAllowed
public boolean isFreeRotationAllowed()Tells if the free rotation is allowed for this cell- Returns:
- true if the cell is only linked to bezier curves
-
setRotationAngle
public void setRotationAngle(double value) Sets the angle of rotation of the cell- Parameters:
value- : value of the rotation angle
-
getRotationAngle
public double getRotationAngle()- Returns:
- the angle of rotation of the cell (in degrees)
-
setIconModifiers
public void setIconModifiers(boolean isMirrored, boolean isFreeRotationAllowed, double angle) Sets the attributes that have an impact on the rendering of the cell Image- Parameters:
isMirrored- : tells if the InputPort of this cell is on the left sideisFreeRotationAllowed- : tells if the free rotation is allowedangle- : value of the rotation angle
-
getIconDimension
-
getStandardIconDimension
return the dimension of the icon- Returns:
- Dimension of the icon
-