Together Workflow Editor 3.0-1 API

org.enhydra.jawe.components.graph
Class GraphController

java.lang.Object
  extended byjava.util.Observable
      extended byorg.enhydra.jawe.components.graph.GraphController
All Implemented Interfaces:
ChoiceButtonListener, java.util.EventListener, org.jgraph.event.GraphSelectionListener, JaWEComponent, java.util.Observer

public class GraphController
extends java.util.Observable
implements java.util.Observer, JaWEComponent, ChoiceButtonListener, org.jgraph.event.GraphSelectionListener

Used to handle process graphs.

Author:
Sasa Bojanic, Miroslav Popov

Field Summary
protected  CopyOrCutInfo copyOrCutInfo
           
protected  java.util.Map graphMap
           
protected  GraphMarqueeHandler graphMarqueeHandler
           
protected  GraphObjectFactory graphObjectFactory
           
protected  GraphObjectRendererFactory graphObjectRendererFactory
           
protected  HistoryManager hm
           
protected  GraphOverview overview
           
protected  GraphControllerPanel panel
           
protected  Graph selectedGraph
           
protected  GraphSettings settings
           
protected  java.lang.String type
           
protected  boolean updateInProgress
           
 
Fields inherited from class java.util.Observable
 
Fields inherited from interface org.enhydra.jawe.JaWEComponent
LOWER_STATUS_COMPONENT, MAIN_COMPONENT, OTHER_COMPONENT, SPECIAL_COMPONENT, TREE_COMPONENT, UPPER_STATUS_COMPONENT
 
Constructor Summary
GraphController(JaWEComponentSettings settings)
           
 
Method Summary
protected  void adjustActions()
           
 boolean adjustXPDL(org.enhydra.shark.xpdl.elements.Package pkg)
           
 boolean canCreateElement(org.enhydra.shark.xpdl.XMLCollection col)
           
 boolean canDuplicateElement(org.enhydra.shark.xpdl.XMLCollection col, org.enhydra.shark.xpdl.XMLElement el)
           
 boolean canInsertElement(org.enhydra.shark.xpdl.XMLCollection col, org.enhydra.shark.xpdl.XMLElement el)
           
 boolean canModifyElement(org.enhydra.shark.xpdl.XMLElement el)
           
 boolean canRemoveElement(org.enhydra.shark.xpdl.XMLCollection col, org.enhydra.shark.xpdl.XMLElement el)
           
 boolean canRepositionElement(org.enhydra.shark.xpdl.XMLCollection col, org.enhydra.shark.xpdl.XMLElement el)
           
 java.util.List checkValidity(org.enhydra.shark.xpdl.XMLElement el, boolean fullCheck)
           
protected  Graph createGraph()
           
 void createGraph(org.enhydra.shark.xpdl.elements.ActivitySet as)
           
 void createGraph(org.enhydra.shark.xpdl.elements.WorkflowProcess wp)
           
protected  JaWEGraphModel createGraphModel()
           
protected  XPDLElementChangeInfo createInfo(org.enhydra.shark.xpdl.XMLElement main, java.util.List elements, int action)
           
protected  GraphControllerPanel createPanel()
           
 void displayNextGraph()
           
 void displayPreviousGraph()
           
protected  java.util.Map getAllPackageParticipants(java.util.List pkgs)
           
protected  java.util.List getAllWorkflowProcessesAndActivitySetsForAdjustment(java.util.List pkgs)
           
 java.util.List getChoices(ChoiceButton cbutton)
           
 CopyOrCutInfo getCopyOrCutInfo()
           
 org.enhydra.shark.xpdl.XMLCollectionElement getDisplayedXPDLObject()
           
 Graph getGraph(org.enhydra.shark.xpdl.XMLCollectionElement wpOrAs)
           
 GraphMarqueeHandler getGraphMarqueeHandler()
           
 GraphObjectFactory getGraphObjectFactory()
           
 GraphObjectRendererFactory getGraphObjectRendererFactory()
           
 GraphSettings getGraphSettings()
           
protected  java.util.List getGraphsToValidate(org.enhydra.shark.xpdl.XMLElement el)
           
 HistoryManager getHistoryManager()
           
 java.lang.String getName()
           
 GraphOverview getOverview()
           
 Graph getSelectedGraph()
           
 java.lang.Object getSelectedObject(ChoiceButton cbutton)
           
 JaWEComponentSettings getSettings()
           
 java.lang.String getType()
           
 JaWEComponentView getView()
           
protected  void init()
           
protected  void insertPackage(org.enhydra.shark.xpdl.elements.Package pkg)
           
 boolean isUpdateInProgress()
           
protected  void removeGraph(org.enhydra.shark.xpdl.XMLCollectionElement wpOrAs)
           
protected  void removePackage(org.enhydra.shark.xpdl.elements.Package pkg)
           
 void selectGraphForElement(org.enhydra.shark.xpdl.XMLCollectionElement cel)
           
 void selectionChanged(ChoiceButton cbutton, java.lang.Object change)
           
protected  void setSelectedGraph(Graph graph)
           
 void setType(java.lang.String type)
           
 void setUpdateInProgress(boolean isInProgress)
           
 void update(java.util.Observable o, java.lang.Object arg)
           
 void update(XPDLElementChangeInfo info)
           
 void valueChanged(org.jgraph.event.GraphSelectionEvent e)
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected java.lang.String type

updateInProgress

protected boolean updateInProgress

graphObjectFactory

protected GraphObjectFactory graphObjectFactory

graphObjectRendererFactory

protected GraphObjectRendererFactory graphObjectRendererFactory

graphMarqueeHandler

protected GraphMarqueeHandler graphMarqueeHandler

selectedGraph

protected Graph selectedGraph

panel

protected GraphControllerPanel panel

overview

protected GraphOverview overview

graphMap

protected java.util.Map graphMap

copyOrCutInfo

protected CopyOrCutInfo copyOrCutInfo

settings

protected GraphSettings settings

hm

protected HistoryManager hm
Constructor Detail

GraphController

public GraphController(JaWEComponentSettings settings)
                throws java.lang.Exception
Method Detail

update

public void update(java.util.Observable o,
                   java.lang.Object arg)
Specified by:
update in interface java.util.Observer

getSettings

public JaWEComponentSettings getSettings()
Specified by:
getSettings in interface JaWEComponent

getView

public JaWEComponentView getView()
Specified by:
getView in interface JaWEComponent

getName

public java.lang.String getName()
Specified by:
getName in interface JaWEComponent

getType

public java.lang.String getType()
Specified by:
getType in interface JaWEComponent

setType

public void setType(java.lang.String type)
Specified by:
setType in interface JaWEComponent

adjustXPDL

public boolean adjustXPDL(org.enhydra.shark.xpdl.elements.Package pkg)
Specified by:
adjustXPDL in interface JaWEComponent

checkValidity

public java.util.List checkValidity(org.enhydra.shark.xpdl.XMLElement el,
                                    boolean fullCheck)
Specified by:
checkValidity in interface JaWEComponent

getGraphsToValidate

protected java.util.List getGraphsToValidate(org.enhydra.shark.xpdl.XMLElement el)

canCreateElement

public boolean canCreateElement(org.enhydra.shark.xpdl.XMLCollection col)
Specified by:
canCreateElement in interface JaWEComponent

canInsertElement

public boolean canInsertElement(org.enhydra.shark.xpdl.XMLCollection col,
                                org.enhydra.shark.xpdl.XMLElement el)
Specified by:
canInsertElement in interface JaWEComponent

canModifyElement

public boolean canModifyElement(org.enhydra.shark.xpdl.XMLElement el)
Specified by:
canModifyElement in interface JaWEComponent

canRemoveElement

public boolean canRemoveElement(org.enhydra.shark.xpdl.XMLCollection col,
                                org.enhydra.shark.xpdl.XMLElement el)
Specified by:
canRemoveElement in interface JaWEComponent

canDuplicateElement

public boolean canDuplicateElement(org.enhydra.shark.xpdl.XMLCollection col,
                                   org.enhydra.shark.xpdl.XMLElement el)
Specified by:
canDuplicateElement in interface JaWEComponent

canRepositionElement

public boolean canRepositionElement(org.enhydra.shark.xpdl.XMLCollection col,
                                    org.enhydra.shark.xpdl.XMLElement el)
Specified by:
canRepositionElement in interface JaWEComponent

selectionChanged

public void selectionChanged(ChoiceButton cbutton,
                             java.lang.Object change)
Specified by:
selectionChanged in interface ChoiceButtonListener

getSelectedObject

public java.lang.Object getSelectedObject(ChoiceButton cbutton)
Specified by:
getSelectedObject in interface ChoiceButtonListener

getChoices

public java.util.List getChoices(ChoiceButton cbutton)
Specified by:
getChoices in interface ChoiceButtonListener

valueChanged

public void valueChanged(org.jgraph.event.GraphSelectionEvent e)
Specified by:
valueChanged in interface org.jgraph.event.GraphSelectionListener

init

protected void init()
             throws java.lang.Exception
Throws:
java.lang.Exception

getGraphSettings

public GraphSettings getGraphSettings()

update

public void update(XPDLElementChangeInfo info)

getAllWorkflowProcessesAndActivitySetsForAdjustment

protected java.util.List getAllWorkflowProcessesAndActivitySetsForAdjustment(java.util.List pkgs)

getAllPackageParticipants

protected java.util.Map getAllPackageParticipants(java.util.List pkgs)

createPanel

protected GraphControllerPanel createPanel()

getGraphMarqueeHandler

public GraphMarqueeHandler getGraphMarqueeHandler()

getGraphObjectFactory

public GraphObjectFactory getGraphObjectFactory()

getGraphObjectRendererFactory

public GraphObjectRendererFactory getGraphObjectRendererFactory()

getDisplayedXPDLObject

public org.enhydra.shark.xpdl.XMLCollectionElement getDisplayedXPDLObject()

createGraph

public void createGraph(org.enhydra.shark.xpdl.elements.WorkflowProcess wp)

createGraph

public void createGraph(org.enhydra.shark.xpdl.elements.ActivitySet as)

createGraph

protected Graph createGraph()

createGraphModel

protected JaWEGraphModel createGraphModel()

getSelectedGraph

public Graph getSelectedGraph()

getGraph

public Graph getGraph(org.enhydra.shark.xpdl.XMLCollectionElement wpOrAs)

setSelectedGraph

protected void setSelectedGraph(Graph graph)

selectGraphForElement

public void selectGraphForElement(org.enhydra.shark.xpdl.XMLCollectionElement cel)

removeGraph

protected void removeGraph(org.enhydra.shark.xpdl.XMLCollectionElement wpOrAs)

displayPreviousGraph

public void displayPreviousGraph()

displayNextGraph

public void displayNextGraph()

insertPackage

protected void insertPackage(org.enhydra.shark.xpdl.elements.Package pkg)

removePackage

protected void removePackage(org.enhydra.shark.xpdl.elements.Package pkg)

createInfo

protected XPDLElementChangeInfo createInfo(org.enhydra.shark.xpdl.XMLElement main,
                                           java.util.List elements,
                                           int action)

setUpdateInProgress

public void setUpdateInProgress(boolean isInProgress)
Specified by:
setUpdateInProgress in interface JaWEComponent

isUpdateInProgress

public boolean isUpdateInProgress()
Specified by:
isUpdateInProgress in interface JaWEComponent

getCopyOrCutInfo

public CopyOrCutInfo getCopyOrCutInfo()

getOverview

public GraphOverview getOverview()

getHistoryManager

public HistoryManager getHistoryManager()

adjustActions

protected void adjustActions()

Together Workflow Editor 3.0-1 API