public class WorkflowEditor
extends java.lang.Object
This class handles the editing operations on a workflow
Constructor and Description |
---|
WorkflowEditor()
Constructs a workflow editor
|
WorkflowEditor(Workflow workflow) |
Modifier and Type | Method and Description |
---|---|
void |
add(WorkflowEntity entity)
Adds a node or relationship
|
void |
addWorkflowEditListener(WorkflowEditListener listener)
Adds a listener to the editor
|
void |
clearChanges()
Sets the saved state
|
void |
delete()
Deletes the currently selected object
|
void |
delete(WorkflowEntity entity)
Deletes the entity
|
WorkflowEntity |
getSelected()
Gets the selected entity
|
int |
getTimestamp()
Gets the current timestamp - this is used by the undo
code to restore a set of changes
|
int |
getTopTimestamp()
Returns the time stamp of the entry on the top of the stack
or zero if no entries.
|
boolean |
hasChanges()
Tests the saved state
|
boolean |
hasUndoEntries()
Gets the state of the undo stack
|
void |
move(int column,
int row)
Moves the currently selected object
|
void |
move(WorkflowEntity entity,
int column,
int row)
Moves the entity
|
void |
removeWorkflowEditListener(WorkflowEditListener listener)
Removes a listener from the editor
|
void |
setEditable(boolean editable)
Constructs a workflow editor for a workflow
|
void |
setSelected(WorkflowEntity selection,
boolean user)
Sets the selected entity - a node or a relationship
|
boolean |
undo()
Undo one frame on the stack
|
public WorkflowEditor()
public WorkflowEditor(Workflow workflow)
public void setEditable(boolean editable)
workflow
- The workflow to editpublic int getTimestamp()
public boolean hasUndoEntries()
public boolean undo()
public int getTopTimestamp()
public void addWorkflowEditListener(WorkflowEditListener listener)
listener
- The workflow edit listenerpublic void removeWorkflowEditListener(WorkflowEditListener listener)
listener
- The workflow edit listenerpublic void setSelected(WorkflowEntity selection, boolean user)
o
- The entity to selectedpublic WorkflowEntity getSelected()
public void add(WorkflowEntity entity)
o
- The object to addpublic void delete()
public void delete(WorkflowEntity entity)
entity
- The entity to deletepublic void move(int column, int row)
row
- The new rowcolumn
- The new columnpublic void move(WorkflowEntity entity, int column, int row)
entity
- The entity to deleterow
- The new rowcolumn
- The new columnpublic boolean hasChanges()
public void clearChanges()