public class GraphCanvas extends Object implements XBayaExecutionModeListener
| Constructor and Description |
|---|
GraphCanvas(XBayaEngine engine)
Creates a GraphPanel.
|
GraphCanvas(XBayaEngine engine,
String workflowName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addGraphCanvasListener(GraphCanvasListener listener) |
Node |
addNode(Component component)
Creates a new Node from a specified Component and adds it.
|
Node |
addNode(Component component,
Point location)
Creates a new Node from a specified Component and adds it.
|
void |
addOrRemoveEdge() |
void |
executionModeChanged(XBayaConfiguration config)
Triggers when the execution mode in xbaya is changed
For possition executions modes see,
XBayaConfiguration.XBayaExecutionMode
|
Graph |
getGraph() |
Port |
getSelectedInputPort()
Returns the selectedInputPort.
|
Node |
getSelectedNode()
Returns the selectedNode.
|
Port |
getSelectedOutputPort()
Returns the selectedOutputPort.
|
JComponent |
getSwingComponent() |
Workflow |
getWorkflow() |
File |
getWorkflowFile() |
Workflow |
getWorkflowWithImage()
Returns the workflow.
|
boolean |
isWorkflowChanged() |
void |
newWorkflow()
Creates a new graph.
|
void |
removeGraphCanvasListener(GraphCanvasListener listener) |
void |
removeSelected()
Removes the selected graph piece if any.
|
void |
removeSelectedEdge()
Removes the selected edge if any.
|
void |
removeSelectedNode()
Removes the selected Node if any
|
void |
repaint()
Repaints the panel.
|
void |
setDescription(String description) |
void |
setNameAndDescription(String name,
String description) |
void |
setWorkflow(Workflow workflow)
Sets workflow.
|
void |
setWorkflowFile(File workflowFile) |
void |
workflowSaved() |
public GraphCanvas(XBayaEngine engine)
engine - The XBayaEnginepublic GraphCanvas(XBayaEngine engine, String workflowName)
public JComponent getSwingComponent()
public Workflow getWorkflow()
public Workflow getWorkflowWithImage()
public Graph getGraph()
public void setWorkflow(Workflow workflow)
workflow - The workflow to set.public void newWorkflow()
public void setNameAndDescription(String name, String description)
name - description - public void setDescription(String description)
public Node addNode(Component component, Point location)
component - The Component to add.location - The location to add the node.public Node addNode(Component component)
component - The Component to add.public void removeSelected()
throws GraphException
GraphExceptionpublic void removeSelectedNode()
throws GraphException
GraphExceptionpublic void removeSelectedEdge()
public void addOrRemoveEdge()
public Node getSelectedNode()
public Port getSelectedInputPort()
public Port getSelectedOutputPort()
public void repaint()
public void addGraphCanvasListener(GraphCanvasListener listener)
listener - public void removeGraphCanvasListener(GraphCanvasListener listener)
listener - public File getWorkflowFile()
public void setWorkflowFile(File workflowFile)
public boolean isWorkflowChanged()
public void workflowSaved()
public void executionModeChanged(XBayaConfiguration config)
XBayaExecutionModeListenerexecutionModeChanged in interface XBayaExecutionModeListenerconfig - - XBaya configuration objectCopyright © 2011–2014 The Apache Software Foundation. All rights reserved.