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 Details

  • Constructor Details

    • JmtCell

      public JmtCell(String icon, Object userObject)
      Creates a graph cell and initializes it with the specified user object.
      Parameters:
      icon - the name of the icon of this cell
      userObject - an Object provided by the user that constitutes the cell's data Conti Andrea 01-09-2003 Bertoli Marco 04-giu-2005
  • Method Details

    • getSize

      public Dimension getSize(org.jgraph.JGraph graph)
      Returns Cell's real size (this method considers Icon and name size)
      Parameters:
      graph - JGraph object 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

      public Hashtable<Object,Map> setAttributes(Point2D pt, org.jgraph.JGraph graph)
      Sets all the attributes like background colour, dimensions, port number & position
      Parameters:
      pt -
      Returns:
      created map
    • updatePortPositions

      public void updatePortPositions(Map<Object,Map> nest, Icon icon, Dimension cellDimension)
    • updateCellSize

      public void updateCellSize(Icon icon, org.jgraph.JGraph graph)
      Changes the bounds of the cell
      Parameters:
      icon - icon of the cell
      graph -
    • 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

      public TreeNode getPrevParent()
      Returns previous parent of this cell (the one present when resetParent() method was called)
      Returns:
      previous parent of this cell
      See Also:
    • setIcon

      public void setIcon(String icon)
      Sets name of the icon of this cell
      Parameters:
      icon - : name of the icon of this cell
    • getIcon

      public String 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 side
      isFreeRotationAllowed - : tells if the free rotation is allowed
      angle - : value of the rotation angle
    • getIconDimension

      public Dimension getIconDimension()
      return the dimension of the icon
      Returns:
      Dimension of the icon
    • getStandardIconDimension

      public Dimension getStandardIconDimension()
      return the dimension of the icon
      Returns:
      Dimension of the icon