org.enhydra.jawe.components.graph
Class GraphController
java.lang.Object
java.util.Observable
org.enhydra.jawe.components.graph.GraphController
- All Implemented Interfaces:
- java.util.EventListener, java.util.Observer, ChoiceButtonListener, JaWEComponent, org.jgraph.event.GraphSelectionListener
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
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 |
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
GraphController
public GraphController(JaWEComponentSettings settings)
throws java.lang.Exception
- Throws:
java.lang.Exception
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()