org.openbp.cockpit.modeler
Class Modeler

java.lang.Object
  extended by org.openbp.jaspira.plugin.AbstractPlugin
      extended by org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin
          extended by org.openbp.cockpit.modeler.Modeler
All Implemented Interfaces:
CH.ifa.draw.framework.DrawingEditor, CH.ifa.draw.framework.FigureSelectionListener, java.awt.event.FocusListener, java.awt.event.HierarchyListener, java.util.EventListener, DrawingEditorPlugin, Trackable, VisiblePlugin, Plugin

public class Modeler
extends AbstractVisiblePlugin
implements DrawingEditorPlugin, Trackable, java.awt.event.FocusListener

The Modeler class is one of the core components of the OpenBP modeler. It is an invisible plugin that contains the drawing for a single OpenBP process.

Author:
Stephan Moritz

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin
AbstractVisiblePlugin.StandardVisiblePluginEvents
 
Nested classes/interfaces inherited from class org.openbp.jaspira.plugin.AbstractPlugin
AbstractPlugin.StandardPluginEvents
 
Field Summary
static java.lang.String ATTRIBUTE_SKELETON
          Runtime attribute for items: The item is an item skeleton that is used as a pattern for the creation of new items that are dragged from the standard toolbox.
 
Fields inherited from class org.openbp.jaspira.plugin.AbstractPlugin
PROPERTY_CONDITION, PROPERTY_DESCRIPTION, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_SEQUENCE, PROPERTY_TITLE, PROPERTY_VENDOR, PROPERTY_VERSION
 
Fields inherited from interface org.openbp.jaspira.gui.plugin.VisiblePlugin
GER, GEU, SIZE_VARIABLE_BOTH, SIZE_VARIABLE_HEIGHT, SIZE_VARIABLE_NONE, SIZE_VARIABLE_WIDTH, TOOLBAR_DYNAMIC, TOOLBAR_EVENTS, TOOLBAR_NONE
 
Fields inherited from interface org.openbp.jaspira.plugin.Plugin
ID_DELIMETER, LEVEL_APPLICATION, LEVEL_FRAME, LEVEL_PAGE, LEVEL_PLUGIN
 
Constructor Summary
Modeler()
           
 
Method Summary
 void addTrackChangedListener(javax.swing.event.ChangeListener listener)
          The listener is registered for all properties as a WEAK listener, i. e. it may be garbage-collected if not referenced otherwise.
 void addViewChangeListener(CH.ifa.draw.framework.ViewChangeListener arg0)
           
 void cancelUndo()
          Cancels the current undoable.
 boolean canClose()
          Checks, whether this plugin can be closed.
 boolean canCopy()
          Checks if the plugin can copy the selected data to the clipboard.
 boolean canCut()
          Checks if the plugin can cut the selected data to the clipboard.
 boolean canDelete()
          Checks if the plugin can delete the selected data.
 boolean canDrag()
          Checks if the plugin can be dragged.
 boolean canPaste(java.awt.datatransfer.Transferable transferable)
          Checks if the plugin can paste the data of the given transferable object.
 void centerTrackerAt(java.awt.Point p)
          Centers the trackable component at the specified point.
 boolean convertPlaceholder(NodeFigure nodeFigure, NodeProvider np, java.awt.Point p)
          Converts the given placeholder to some 'real' node.
 java.awt.datatransfer.Transferable copy()
          Copies the selected data from the plugin to the clipboard.
 java.awt.datatransfer.Transferable cut()
          Cuts the selected data from the plugin to the clipboard.
 void delete()
          Deletes the selected data, if any.
 void endUndo()
          Updates the current undoable with the current 'after operation' state and registers it with the undo manager.
 void figureSelectionChanged(CH.ifa.draw.framework.DrawingView arg0)
           
 void fireTrackChangedEvent(javax.swing.event.ChangeEvent event)
          Fires an event indicating that the tracker position has changed to the registered track change listeners.
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 Undoable getCurrentUndoable()
          Gets the current undoable.
 java.awt.Dimension getDocumentSize()
          Returns the size of the document that is displayed in the view.
 ProcessDrawing getDrawing()
          Returns the drawing associated with this editor.
 WorkspaceDrawingView getDrawingView()
          Gets the drawing view that displays the contents of this view plugin.
protected  java.lang.Class[] getExternalEventModuleClasses()
          Returns the list of external event module classes.
 PluginState getPluginState()
          Returns the state of this plugin.
 ProcessItem getProcess()
          Returns the edited process.
 ModelQualifier getProcessQualifier()
          Returns the model qualifier of the edited process.
 java.lang.String getResourceCollectionContainerName()
          Gets the name of the resource component the default resource of the plugin belongs to.
 java.util.List getSubClients()
          Gets the Dnd sub clients of this plugin.
 java.lang.String getSubTitle()
          Returns the sub title of this plugin.
 java.lang.String getTitle()
          Gets the title.
 int getToolbarType()
          Gets the type of the plugin toolbar.
 ModelerToolSupport getToolSupport()
          Gets the the modeler tool support object holding all tools.
 CH.ifa.draw.util.UndoManager getUndoManager()
           
 UndoMgr getUndoMgr()
          Gets the undo manager.
 java.awt.Rectangle getVisibleArea()
          Returns the area that is currently visible.
 boolean hasCloseButton()
          Returns true if the plugin should have a close button in its title bar.
protected  void initializeComponents()
          Init the visual components of the plugin.
 boolean isTrackSuspended()
          Returns true if the tracking has been suspended.
 boolean isUndoRecording()
          Checks if currently an undo operation is being recorded.
 void moveTrackerBy(int x, int y)
          Moves the tracker by the given distance.
 void paste(java.awt.datatransfer.Transferable transferable)
          Pastes the given data into the plugin.
 void pluginHidden()
          Called after the plugin has been hidden.
 void pluginShown()
          Called after the plugin has been displayed.
protected  void pluginUninstalled()
          This template method is called before the plugin is uninstalled.
protected  void preClose()
          This method is called when actual closing is performed.
 void removeTrackChangedListener(javax.swing.event.ChangeListener listener)
          Removes a change listener from the trackable object.
 void removeViewChangeListener(CH.ifa.draw.framework.ViewChangeListener arg0)
           
 void repairDamage()
          Repairs damages in all views of the modeler.
 void resumeTrack()
          Resumes propagation of track change events.
 boolean saveProcess()
          Saves the process to the server.
 void setPluginState(PluginState state)
          Rebuilds the state of the plugin using the given state object.
 void setProcess(ProcessItem process, boolean readonly)
          Sets the process to be edited.
 void setProcessByUndoRedo(ProcessItem process)
          Sets the process to be edited due to an undo or redo operation.
 void setScaleFactor(double scaleFactor)
          Sets the scaling factor of the workspace.
 void setVisibleArea(java.awt.Rectangle r)
          Sets the area that is currently visible.
 void showStatus(java.lang.String arg0)
           
 Undoable startUndo(java.lang.String displayName)
          Creates an undoable object given the display name of the operation that can be undone with this undoable.
 Undoable startUndoForAction(JaspiraActionEvent jae)
          Creates an undoable object given the name of the action that initiated the operation that can be undone with this undoable.
 Undoable startUndoForAction(java.lang.String eventName)
          Creates an undoable object given the name of the action that initiated the operation that can be undone with this undoable.
 void suspendTrack()
          Prevents track change events to be propagated.
 CH.ifa.draw.framework.Tool tool()
           
 void toolDone()
           
 CH.ifa.draw.framework.DrawingView view()
          Returns the currently active view.
 CH.ifa.draw.framework.DrawingView[] views()
           
 
Methods inherited from class org.openbp.jaspira.gui.plugin.AbstractVisiblePlugin
addPluginFocusListener, applicationReady, canPageChange, createToolbar, firePluginFocusGained, firePluginFocusLost, focusPlugin, getContentPane, getPage, getPluginComponent, getPluginFocusComponent, getPluginFromComponentHierarchy, getPluginHolder, getPluginPanel, getSizeBehavior, hierarchyChanged, initializeResources, installPlugin, installPluginContent, isPluginFocused, isPluginVisible, postPluginContainerUpdate, removePluginFocusListener, setPluginHolder, showPlugin, stackEvent, uninstallPlugin, updatePluginContainer
 
Methods inherited from class org.openbp.jaspira.plugin.AbstractPlugin
addActionKeySequence, addPlugin, addToPeerGroup, closeCanceled, containsStackedEvent, fireEvent, fireEvent, fireEvent, getAction, getChildPlugins, getClassName, getCondition, getDescendantPlugins, getDescription, getEventActionNames, getEventModules, getExternalActions, getExternalOptionModuleClasses, getIcon, getIcon, getLevel, getName, getOptionModules, getParentPlugin, getPeerGroup, getPeerGroupNames, getPeerGroups, getPluginResourceCollection, getUniqueId, getVendor, getVersion, handleEvent, handleKeySequence, inheritEvent, initializeFromPluginProfile, initializePlugin, installFirstPlugin, matchesPeerGroup, matchesPeerGroups, passDown, pluginInstalled, receiveEvent, removeFromPeerGroup, removePlugin, removeStackedEvent, requestClose, setDescription, setIcon, setName, setParentPlugin, setResourceCollection, setTitle, toString, uninstallLastPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openbp.jaspira.gui.plugin.VisiblePlugin
addPluginFocusListener, createToolbar, firePluginFocusGained, firePluginFocusLost, focusPlugin, getPage, getPluginComponent, getPluginFocusComponent, getPluginHolder, getPluginPanel, getSizeBehavior, isPluginFocused, isPluginVisible, postPluginContainerUpdate, removePluginFocusListener, setPluginHolder, showPlugin, updatePluginContainer
 
Methods inherited from interface org.openbp.jaspira.plugin.Plugin
addPlugin, addToPeerGroup, containsStackedEvent, fireEvent, fireEvent, fireEvent, getAction, getChildPlugins, getClassName, getCondition, getDescendantPlugins, getDescription, getEventActionNames, getIcon, getLevel, getName, getParentPlugin, getPeerGroup, getPeerGroupNames, getPeerGroups, getPluginResourceCollection, getUniqueId, getVendor, getVersion, handleEvent, inheritEvent, initializePlugin, installFirstPlugin, installPlugin, matchesPeerGroup, matchesPeerGroups, receiveEvent, removeFromPeerGroup, removePlugin, requestClose, setParentPlugin, stackEvent, uninstallLastPlugin, uninstallPlugin
 

Field Detail

ATTRIBUTE_SKELETON

public static final java.lang.String ATTRIBUTE_SKELETON
Runtime attribute for items: The item is an item skeleton that is used as a pattern for the creation of new items that are dragged from the standard toolbox.

See Also:
Constant Field Values
Constructor Detail

Modeler

public Modeler()
Method Detail

getResourceCollectionContainerName

public java.lang.String getResourceCollectionContainerName()
Description copied from class: AbstractPlugin
Gets the name of the resource component the default resource of the plugin belongs to.

Specified by:
getResourceCollectionContainerName in class AbstractPlugin
Returns:
The container name

initializeComponents

protected void initializeComponents()
Init the visual components of the plugin.

Specified by:
initializeComponents in class AbstractVisiblePlugin
See Also:
AbstractVisiblePlugin.initializeComponents()

getToolSupport

public ModelerToolSupport getToolSupport()
Gets the the modeler tool support object holding all tools.

Specified by:
getToolSupport in interface DrawingEditorPlugin

setProcess

public void setProcess(ProcessItem process,
                       boolean readonly)
Sets the process to be edited. The method clones the given process.

Parameters:
process - Process to be edited

getProcess

public ProcessItem getProcess()
Returns the edited process.


getDrawingView

public WorkspaceDrawingView getDrawingView()
Gets the drawing view that displays the contents of this view plugin.


getDrawing

public ProcessDrawing getDrawing()
Returns the drawing associated with this editor.


getProcessQualifier

public ModelQualifier getProcessQualifier()
Returns the model qualifier of the edited process.


saveProcess

public boolean saveProcess()
Saves the process to the server.

Returns:
true: The process was saved successfully.
false: There was an error saving the process. The error has been reported to the user.

repairDamage

public void repairDamage()
Repairs damages in all views of the modeler.

Specified by:
repairDamage in interface DrawingEditorPlugin

convertPlaceholder

public boolean convertPlaceholder(NodeFigure nodeFigure,
                                  NodeProvider np,
                                  java.awt.Point p)
Converts the given placeholder to some 'real' node.

Parameters:
nodeFigure - Placeholder node figure to convert
np - Node provider that will provide the node to convert to or null. In the latter case, a menu should be displayed to the user where he can choose the type of node to create.
p - Current mouse position
Returns:
true: The conversion was successfully completed. Any pending operations can be performed.
false: The conversion failed, was cancelled or is not completed yet.

getExternalEventModuleClasses

protected java.lang.Class[] getExternalEventModuleClasses()
Description copied from class: AbstractPlugin
Returns the list of external event module classes. Override this method to customize the plugin.

Overrides:
getExternalEventModuleClasses in class AbstractPlugin
Returns:
An array of classes or null (the default) if the plugin doesn't declare external event modules. The returned classes need to subclass ExternalEventModule
See Also:
AbstractPlugin.getExternalEventModuleClasses()

pluginUninstalled

protected void pluginUninstalled()
Description copied from class: AbstractPlugin
This template method is called before the plugin is uninstalled.

Overrides:
pluginUninstalled in class AbstractPlugin
See Also:
AbstractPlugin.pluginUninstalled()

setPluginState

public void setPluginState(PluginState state)
Description copied from class: AbstractPlugin
Rebuilds the state of the plugin using the given state object.

Specified by:
setPluginState in interface Plugin
Overrides:
setPluginState in class AbstractPlugin
See Also:
AbstractPlugin.setPluginState(PluginState)

getPluginState

public PluginState getPluginState()
Description copied from class: AbstractPlugin
Returns the state of this plugin.

Specified by:
getPluginState in interface Plugin
Overrides:
getPluginState in class AbstractPlugin
See Also:
AbstractPlugin.getPluginState()

getToolbarType

public int getToolbarType()
Description copied from class: AbstractVisiblePlugin
Gets the type of the plugin toolbar. This will determine how the toolbar of the plugin will be constructed.

Specified by:
getToolbarType in interface VisiblePlugin
Overrides:
getToolbarType in class AbstractVisiblePlugin
Returns:
VisiblePlugin.TOOLBAR_NONE/VisiblePlugin.TOOLBAR_EVENTS/VisiblePlugin.TOOLBAR_DYNAMIC
Default: TOOLBAR_EVENTS
See Also:
AbstractVisiblePlugin.getToolbarType()

canDrag

public boolean canDrag()
Description copied from interface: VisiblePlugin
Checks if the plugin can be dragged.

Specified by:
canDrag in interface VisiblePlugin
Overrides:
canDrag in class AbstractVisiblePlugin
See Also:
AbstractVisiblePlugin.canDrag()

hasCloseButton

public boolean hasCloseButton()
Description copied from class: AbstractVisiblePlugin
Returns true if the plugin should have a close button in its title bar. Override this method to customize the plugin.

Specified by:
hasCloseButton in interface VisiblePlugin
Overrides:
hasCloseButton in class AbstractVisiblePlugin
See Also:
AbstractVisiblePlugin.hasCloseButton()

canClose

public boolean canClose()
Description copied from class: AbstractPlugin
Checks, whether this plugin can be closed. Note that this method does not necessarily mean that the plugin WILL be closed. Overwrite this method to handle unsafe states or user interaction. Calling of this method is always followed by either AbstractPlugin.preClose() or AbstractPlugin.closeCanceled().

Specified by:
canClose in interface Plugin
Overrides:
canClose in class AbstractPlugin
Returns:
True if this plugin can be closed right now
See Also:
Plugin.canClose()

preClose

protected void preClose()
Description copied from class: AbstractPlugin
This method is called when actual closing is performed.

Overrides:
preClose in class AbstractPlugin
See Also:
AbstractPlugin.preClose()

pluginShown

public void pluginShown()
Description copied from class: AbstractVisiblePlugin
Called after the plugin has been displayed.

Specified by:
pluginShown in interface VisiblePlugin
Overrides:
pluginShown in class AbstractVisiblePlugin
See Also:
AbstractVisiblePlugin.pluginShown()

pluginHidden

public void pluginHidden()
Description copied from class: AbstractVisiblePlugin
Called after the plugin has been hidden.

Specified by:
pluginHidden in interface VisiblePlugin
Overrides:
pluginHidden in class AbstractVisiblePlugin
See Also:
AbstractVisiblePlugin.pluginHidden()

getTitle

public java.lang.String getTitle()
Description copied from class: AbstractPlugin
Gets the title.

Specified by:
getTitle in interface Plugin
Overrides:
getTitle in class AbstractPlugin
See Also:
AbstractPlugin.getTitle()

getSubTitle

public java.lang.String getSubTitle()
Description copied from class: AbstractPlugin
Returns the sub title of this plugin. This defaults to the title itself.

Specified by:
getSubTitle in interface Plugin
Overrides:
getSubTitle in class AbstractPlugin
See Also:
AbstractPlugin.getSubTitle()

getSubClients

public java.util.List getSubClients()
Description copied from class: AbstractPlugin
Gets the Dnd sub clients of this plugin.

Specified by:
getSubClients in interface VisiblePlugin
Overrides:
getSubClients in class AbstractVisiblePlugin
Returns:
A list containing this object if it is a InteractionClient or null otherwise
See Also:
AbstractPlugin.getSubClients()

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener
See Also:
FocusListener.focusGained(java.awt.event.FocusEvent)

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener
See Also:
FocusListener.focusLost(java.awt.event.FocusEvent)

getDocumentSize

public java.awt.Dimension getDocumentSize()
Description copied from interface: Trackable
Returns the size of the document that is displayed in the view.

Specified by:
getDocumentSize in interface Trackable
See Also:
Trackable.getDocumentSize()

getVisibleArea

public java.awt.Rectangle getVisibleArea()
Description copied from interface: Trackable
Returns the area that is currently visible. For a scroll pane, this would be the view rectangle of the viewport of the scroll pane.

Specified by:
getVisibleArea in interface Trackable
Returns:
Rectangle in document coordinates
See Also:
Trackable.getVisibleArea()

setVisibleArea

public void setVisibleArea(java.awt.Rectangle r)
Description copied from interface: Trackable
Sets the area that is currently visible.

Specified by:
setVisibleArea in interface Trackable
Parameters:
r - Rectangle in document coordinates
See Also:
Trackable.setVisibleArea(Rectangle)

centerTrackerAt

public void centerTrackerAt(java.awt.Point p)
Description copied from interface: Trackable
Centers the trackable component at the specified point.

Specified by:
centerTrackerAt in interface Trackable
Parameters:
p - Point in document coordinates
See Also:
Trackable.centerTrackerAt(Point)

moveTrackerBy

public void moveTrackerBy(int x,
                          int y)
Description copied from interface: Trackable
Moves the tracker by the given distance.

Specified by:
moveTrackerBy in interface Trackable
Parameters:
x - Hor. distance in document coordinates
y - Vert. distance in document coordinates
See Also:
Trackable.moveTrackerBy(int, int)

addTrackChangedListener

public void addTrackChangedListener(javax.swing.event.ChangeListener listener)
The listener is registered for all properties as a WEAK listener, i. e. it may be garbage-collected if not referenced otherwise.
ATTENTION: Never add an automatic class (i. e new FocusListener () { ... }) or an inner class that is not referenced otherwise as a weak listener to the list. These objects will be cleared by the garbage collector during the next gc run!

Specified by:
addTrackChangedListener in interface Trackable
See Also:
Trackable.addTrackChangedListener(ChangeListener)

removeTrackChangedListener

public void removeTrackChangedListener(javax.swing.event.ChangeListener listener)
Description copied from interface: Trackable
Removes a change listener from the trackable object.

Specified by:
removeTrackChangedListener in interface Trackable
See Also:
Trackable.removeTrackChangedListener(ChangeListener)

fireTrackChangedEvent

public void fireTrackChangedEvent(javax.swing.event.ChangeEvent event)
Description copied from interface: Trackable
Fires an event indicating that the tracker position has changed to the registered track change listeners.

Specified by:
fireTrackChangedEvent in interface Trackable
Parameters:
event - Event to fire
See Also:
Trackable.fireTrackChangedEvent(ChangeEvent)

suspendTrack

public void suspendTrack()
Prevents track change events to be propagated.

Specified by:
suspendTrack in interface Trackable

resumeTrack

public void resumeTrack()
Resumes propagation of track change events.

Specified by:
resumeTrack in interface Trackable

isTrackSuspended

public boolean isTrackSuspended()
Returns true if the tracking has been suspended.

Specified by:
isTrackSuspended in interface Trackable

setScaleFactor

public void setScaleFactor(double scaleFactor)
Sets the scaling factor of the workspace.


canCopy

public boolean canCopy()
Description copied from interface: VisiblePlugin
Checks if the plugin can copy the selected data to the clipboard.

Specified by:
canCopy in interface VisiblePlugin
Overrides:
canCopy in class AbstractVisiblePlugin
Returns:
true if the plugin can provide clipboard data.

canDelete

public boolean canDelete()
Description copied from interface: VisiblePlugin
Checks if the plugin can delete the selected data.

Specified by:
canDelete in interface VisiblePlugin
Overrides:
canDelete in class AbstractVisiblePlugin
Returns:
If the data can be deleted.

canCut

public boolean canCut()
Description copied from interface: VisiblePlugin
Checks if the plugin can cut the selected data to the clipboard.

Specified by:
canCut in interface VisiblePlugin
Overrides:
canCut in class AbstractVisiblePlugin
Returns:
true if the plugin can provide clipboard data that can be deleted.

canPaste

public boolean canPaste(java.awt.datatransfer.Transferable transferable)
Description copied from interface: VisiblePlugin
Checks if the plugin can paste the data of the given transferable object.

Specified by:
canPaste in interface VisiblePlugin
Overrides:
canPaste in class AbstractVisiblePlugin
Returns:
true if the plugin accepts the given transferable.

copy

public java.awt.datatransfer.Transferable copy()
Description copied from interface: VisiblePlugin
Copies the selected data from the plugin to the clipboard.

Specified by:
copy in interface VisiblePlugin
Overrides:
copy in class AbstractVisiblePlugin
Returns:
The copied data

cut

public java.awt.datatransfer.Transferable cut()
Description copied from interface: VisiblePlugin
Cuts the selected data from the plugin to the clipboard.

Specified by:
cut in interface VisiblePlugin
Overrides:
cut in class AbstractVisiblePlugin
Returns:
The copied data

delete

public void delete()
Description copied from interface: VisiblePlugin
Deletes the selected data, if any.

Specified by:
delete in interface VisiblePlugin
Overrides:
delete in class AbstractVisiblePlugin

paste

public void paste(java.awt.datatransfer.Transferable transferable)
Description copied from interface: VisiblePlugin
Pastes the given data into the plugin.

Specified by:
paste in interface VisiblePlugin
Overrides:
paste in class AbstractVisiblePlugin
Parameters:
transferable - Content to paste

startUndo

public Undoable startUndo(java.lang.String displayName)
Creates an undoable object given the display name of the operation that can be undone with this undoable. The undoable returned will be a ModelerUndoable that contains a copy of the current process. The method will also save the returned undoable so it can be retrieved with getCurrentUndoable(). In order to provide the data after the operation and to register the undoable, call the endUndo() method.

Specified by:
startUndo in interface DrawingEditorPlugin
Parameters:
displayName - Display name or null
This text will appear after the 'undo: ' text in the edit menu.
Returns:
The new undoable

startUndoForAction

public Undoable startUndoForAction(java.lang.String eventName)
Creates an undoable object given the name of the action that initiated the operation that can be undone with this undoable. For further details, see startUndo(java.lang.String).

Parameters:
eventName - Event name of the action event
Returns:
The new undoable

startUndoForAction

public Undoable startUndoForAction(JaspiraActionEvent jae)
Creates an undoable object given the name of the action that initiated the operation that can be undone with this undoable. For further details, see startUndo(java.lang.String).

Parameters:
jae - Action event
Returns:
The new undoable

endUndo

public void endUndo()
Updates the current undoable with the current 'after operation' state and registers it with the undo manager. This method may be called only after the startUndo(java.lang.String) method has been called.

Specified by:
endUndo in interface DrawingEditorPlugin

cancelUndo

public void cancelUndo()
Cancels the current undoable. This method may be called only after the startUndo(java.lang.String) method has been called.

Specified by:
cancelUndo in interface DrawingEditorPlugin

isUndoRecording

public boolean isUndoRecording()
Checks if currently an undo operation is being recorded.

Specified by:
isUndoRecording in interface DrawingEditorPlugin
Returns:
true: startUndo(java.lang.String) was called.
false: No current undoable is present.

getCurrentUndoable

public Undoable getCurrentUndoable()
Gets the current undoable.

Returns:
The undoable or null if the method is not being called between startUndo(java.lang.String) and endUndo()/cancelUndo().

setProcessByUndoRedo

public void setProcessByUndoRedo(ProcessItem process)
Sets the process to be edited due to an undo or redo operation. The method clones the given process.

Parameters:
process - Process to be edited

getUndoMgr

public UndoMgr getUndoMgr()
Gets the undo manager.


addViewChangeListener

public void addViewChangeListener(CH.ifa.draw.framework.ViewChangeListener arg0)
Specified by:
addViewChangeListener in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.addViewChangeListener(ViewChangeListener)

figureSelectionChanged

public void figureSelectionChanged(CH.ifa.draw.framework.DrawingView arg0)
Specified by:
figureSelectionChanged in interface CH.ifa.draw.framework.DrawingEditor
Specified by:
figureSelectionChanged in interface CH.ifa.draw.framework.FigureSelectionListener
See Also:
FigureSelectionListener.figureSelectionChanged(DrawingView)

getUndoManager

public CH.ifa.draw.util.UndoManager getUndoManager()
Specified by:
getUndoManager in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.getUndoManager()

removeViewChangeListener

public void removeViewChangeListener(CH.ifa.draw.framework.ViewChangeListener arg0)
Specified by:
removeViewChangeListener in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.removeViewChangeListener(ViewChangeListener)

showStatus

public void showStatus(java.lang.String arg0)
Specified by:
showStatus in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.showStatus(String)

tool

public CH.ifa.draw.framework.Tool tool()
Specified by:
tool in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.tool()

toolDone

public void toolDone()
Specified by:
toolDone in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.toolDone()

view

public CH.ifa.draw.framework.DrawingView view()
Returns the currently active view.

Specified by:
view in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.view()

views

public CH.ifa.draw.framework.DrawingView[] views()
Specified by:
views in interface CH.ifa.draw.framework.DrawingEditor
See Also:
DrawingEditor.views()


Copyright © 2011. All Rights Reserved.