TWE 2.5-1 API

org.enhydra.jawe.components.graph
Class DefaultGraphActivity

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byorg.jgraph.graph.DefaultGraphCell
          extended byorg.enhydra.jawe.components.graph.GraphActivityInterface
              extended byorg.enhydra.jawe.components.graph.DefaultGraphActivity
All Implemented Interfaces:
java.lang.Cloneable, org.jgraph.graph.GraphCell, Linkable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode, WorkflowElement

public class DefaultGraphActivity
extends GraphActivityInterface

Used to define Activity object in graph and to modify it's properties.

Author:
Sasa Bojanic
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
 
Fields inherited from class org.jgraph.graph.DefaultGraphCell
attributes
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
DefaultGraphActivity(org.enhydra.shark.xpdl.elements.Activity act)
          Creates activity with given userObject.
 
Method Summary
 boolean acceptsSource()
          Returns true if Activity is a valid source for transition.
 boolean acceptsTarget()
          Returns true if Activity is a valid target for transition.
protected  void addPort()
           
 java.lang.Object clone()
          Create a clone of the cell.
protected  java.lang.Object cloneUserObject()
          Create a clone of the ActivityProperties object.
 java.awt.Point getOffset()
           
 GraphPortInterface getPort()
          Gets the port associate with this activity.
 org.enhydra.shark.xpdl.XMLComplexElement getPropertyObject()
          Gets a property object (XML schema Element).
 java.util.Set getReferencedActivities()
          Gets all activities that this activity references.
 java.util.Set getReferencingActivities()
          Gets all activities that reference this one.
 java.lang.String getTooltip()
          Gets a tooltip text for activity.
 java.lang.String getType()
           
 java.lang.String toString()
          Gets an activity "display name" property.
 
Methods inherited from class org.jgraph.graph.DefaultGraphCell
changeAttributes, getAttributes, getChildren, setAttributes
 
Methods inherited from class javax.swing.tree.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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultGraphActivity

public DefaultGraphActivity(org.enhydra.shark.xpdl.elements.Activity act)
Creates activity with given userObject. Also creates default port for holding activity transitions.

Method Detail

addPort

protected void addPort()

getType

public java.lang.String getType()

getPort

public GraphPortInterface getPort()
Gets the port associate with this activity.

Specified by:
getPort in class GraphActivityInterface

acceptsSource

public boolean acceptsSource()
Returns true if Activity is a valid source for transition. This depends of activitie's type property, it can accept to be a source for transition if it is a normal or starting.


acceptsTarget

public boolean acceptsTarget()
Returns true if Activity is a valid target for transition. This depends of activitie's type property, it can accept to be a target for for transition if it is a normal or ending.


getPropertyObject

public org.enhydra.shark.xpdl.XMLComplexElement getPropertyObject()
Description copied from interface: WorkflowElement
Gets a property object (XML schema Element).


getTooltip

public java.lang.String getTooltip()
Gets a tooltip text for activity.


toString

public java.lang.String toString()
Gets an activity "display name" property.


clone

public java.lang.Object clone()
Create a clone of the cell. The cloning of the user object is deferred to the cloneUserObject() method. NOTE: this original method of DefaultGraphCell is modified to retain synchronization of userObject and value attribute from attribute map when model is attribute store

Returns:
Object a clone of this object.

cloneUserObject

protected java.lang.Object cloneUserObject()
Create a clone of the ActivityProperties object.

Returns:
Object a clone of this activity property object.

getReferencingActivities

public java.util.Set getReferencingActivities()
Gets all activities that reference this one.

Specified by:
getReferencingActivities in class GraphActivityInterface

getReferencedActivities

public java.util.Set getReferencedActivities()
Gets all activities that this activity references.

Specified by:
getReferencedActivities in class GraphActivityInterface

getOffset

public java.awt.Point getOffset()
Specified by:
getOffset in class GraphActivityInterface

TWE 2.5-1 API