org.openbp.cockpit.modeler
Class ModelerEventModule

java.lang.Object
  extended by org.openbp.jaspira.plugin.EventModule
      extended by org.openbp.jaspira.plugin.ExternalEventModule
          extended by org.openbp.cockpit.modeler.ModelerEventModule
All Implemented Interfaces:
JaspiraEventListener

public class ModelerEventModule
extends ExternalEventModule

Event module of the Modeler class.

Author:
Heiko Erhardt

Field Summary
 
Fields inherited from class org.openbp.jaspira.plugin.EventModule
EVENT_CONSUMED, EVENT_HANDLED, EVENT_IGNORED, MODULE_POST_GLOBAL, MODULE_PRE_GLOBAL, MODULE_TREE
 
Constructor Summary
ModelerEventModule(Plugin modeler)
          Default constructor.
 
Method Summary
 JaspiraEventHandlerCode displayobject_changed_titlemode(JaspiraEvent event)
          Called after the titlemode option of the role manager (DisplayObjectPlugin) has been changed.
 JaspiraEventHandlerCode editor_autoconnector_datalink(JaspiraEvent je)
          Event handler: The data link auto connector mode has been changed.
 JaspiraEventHandlerCode editor_color_workspace(JaspiraEvent je)
          Event handler: The workspace color has been changed.
 JaspiraEventHandlerCode editor_grid_display(JaspiraEvent je)
          Event handler: The grid display option has been changed.
 JaspiraEventHandlerCode editor_grid_type(JaspiraEvent je)
          Event handler: The grid layout option has been changed.
 JaspiraEventHandlerCode editor_shadow(JaspiraEvent je)
          Event handler: The shadow type option has been changed.
 JaspiraEventHandlerCode getbyqualifier(AskEvent ae)
          Event handler: Gets a process element by its model qualifier.
 java.lang.String getName()
          The name of this module like "editor.file".
 JaspiraEventHandlerCode getselection(AskEvent ae)
          Event handler: Gets the selected elements.
 JaspiraEventHandlerCode getselectioncount(AskEvent ae)
          Event handler: Gets the number of selected elements.
 JaspiraEventHandlerCode global_clipboard_updatestatus(JaspiraEvent je)
          Event handler: Uses the update clipboard status event to enable/disable various edit actions.
 JaspiraEventHandlerCode global_edit_geteditedinstance(AskEvent ae)
          Returns the edited instance of the given process if edited by this modeler.
 JaspiraEventHandlerCode global_edit_geteditor(AskEvent ae)
          Returns this modeler if it edits the given process.
 JaspiraEventHandlerCode global_frame_activated(JaspiraEvent je)
          Event handler: A Jaspira page container has been activated.
 JaspiraEventHandlerCode importtoselection(JaspiraEvent je)
          Event handler: Tries to import the event object into each currently selected element.
 JaspiraEventHandlerCode invalidate(QualifierEvent je)
          Event handler: Invalidates a process element container identified by a given model qualifier into view.
 JaspiraEventHandlerCode miniview_created(MiniViewEvent mve)
          Event handler: Miniview initialization.
 JaspiraEventHandlerCode modechange(JaspiraEvent je)
          Event handler: View mode change was performed.
 JaspiraEventHandlerCode modeler_drawing_figureadded(JaspiraEvent je)
          Event handler: A figure was added to the workspace.
 JaspiraEventHandlerCode modeler_drawing_paramadded(JaspiraEvent je)
          Event handler: Socket autoconnector.
 JaspiraEventHandlerCode modeler_drawing_socketadded(JaspiraEvent je)
          Event handler: Socket autoconnector.
 JaspiraEventHandlerCode modeler_edit_fliporientation(JaspiraActionEvent jae)
          Event handler: Normalizes the drawing.
 JaspiraEventHandlerCode modeler_edit_normalize(JaspiraActionEvent jae)
          Event handler: Normalizes the drawing.
 JaspiraEventHandlerCode modeler_edit_selectall(JaspiraActionEvent jae)
          Event handler: Select all elements of the drawing.
 JaspiraEventHandlerCode modeler_process_modified(JaspiraEvent je)
          Event handler: Modification flag.
 JaspiraEventHandlerCode open_modeler(OpenEvent oe)
          Catches the open event, check if the object to open is the currently edited process and if so, cause it to request the focus.
 JaspiraEventHandlerCode plugin_propertybrowser_executesave(PropertyBrowserSaveEvent oee)
          Event handler: Save the object currently edited by the property browser.
 JaspiraEventHandlerCode redraw(JaspiraEvent je)
          Event handler: Redraws the workspace.
 JaspiraEventHandlerCode refresh(JaspiraEvent je)
          Event handler: Refreshes the workspace view.
 JaspiraEventHandlerCode select(QualifierEvent je)
          Event handler: Scrolls a process element container identified by a given model qualifier into view and selects it.
 JaspiraEventHandlerCode setzoomfactor(JaspiraEvent je)
          Event handler: Sets the zoom factor of the currently visible view.
 JaspiraEventHandlerCode show(QualifierEvent je)
          Event handler: Scrolls a process element container identified by a given model qualifier into view.
 JaspiraEventHandlerCode showexact(QualifierEvent je)
          Event handler: Scrolls a process element container identified by a given model qualifier into view.
 JaspiraEventHandlerCode snaptogrid(JaspiraActionEvent jae)
          Toggles snap to grid mode.
 JaspiraEventHandlerCode standard_file_askdelete(VetoableEvent ve)
          Event handler: A process is about to be deleted.
 JaspiraEventHandlerCode standard_file_save(JaspiraActionEvent jae)
          Event handler: Save the current process if visible.
 JaspiraEventHandlerCode standard_file_saveall(JaspiraActionEvent jae)
          Event handler: Save all processes.
 JaspiraEventHandlerCode undo_history(JaspiraEvent je)
          Receiver for the undo history size option event.
 JaspiraEventHandlerCode updatedrawing(JaspiraEvent je)
          Event handler: Synchronizes the display model with the process model.
 
Methods inherited from class org.openbp.jaspira.plugin.ExternalEventModule
getPlugin
 
Methods inherited from class org.openbp.jaspira.plugin.EventModule
eventFired, getEventActionNames, getForeignEventNames, getModuleType, getPriority, handleUnaccountedEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelerEventModule

public ModelerEventModule(Plugin modeler)
Default constructor.

Parameters:
modeler - Modeler we are associated with
Method Detail

getName

public java.lang.String getName()
Description copied from class: EventModule
The name of this module like "editor.file". Decides which events will be received.

Specified by:
getName in class EventModule

global_frame_activated

public JaspiraEventHandlerCode global_frame_activated(JaspiraEvent je)
Event handler: A Jaspira page container has been activated.

Parameters:
je - Event
Returns:
The event status code

global_clipboard_updatestatus

public JaspiraEventHandlerCode global_clipboard_updatestatus(JaspiraEvent je)
Event handler: Uses the update clipboard status event to enable/disable various edit actions.

Parameters:
je - Event
Returns:
EVENT_HANDLED

open_modeler

public JaspiraEventHandlerCode open_modeler(OpenEvent oe)
Catches the open event, check if the object to open is the currently edited process and if so, cause it to request the focus.

Parameters:
oe - Event
Returns:
The event status code

global_edit_geteditedinstance

public JaspiraEventHandlerCode global_edit_geteditedinstance(AskEvent ae)
Returns the edited instance of the given process if edited by this modeler.

Parameters:
ae - Event; The answer of this event will be the ProcessItem that is being edited currently
Returns:
The event status code

global_edit_geteditor

public JaspiraEventHandlerCode global_edit_geteditor(AskEvent ae)
Returns this modeler if it edits the given process.

Parameters:
ae - Event; The answer of this event will be the ProcessItem that is being edited currently
Returns:
The event status code

standard_file_save

public JaspiraEventHandlerCode standard_file_save(JaspiraActionEvent jae)
Event handler: Save the current process if visible.

Parameters:
jae - Event
Returns:
The event status code

standard_file_saveall

public JaspiraEventHandlerCode standard_file_saveall(JaspiraActionEvent jae)
Event handler: Save all processes.

Parameters:
jae - Event
Returns:
The event status code

standard_file_askdelete

public JaspiraEventHandlerCode standard_file_askdelete(VetoableEvent ve)
Event handler: A process is about to be deleted. Tries to close this view, along wih its editor. If the process has been modified, offers to cancel.

Parameters:
ve - Event
Returns:
The event status code

invalidate

public JaspiraEventHandlerCode invalidate(QualifierEvent je)
Event handler: Invalidates a process element container identified by a given model qualifier into view. Call refresh(org.openbp.jaspira.event.JaspiraEvent) to update the invalidated elements.

Parameters:
je - Event
Returns:
The event status code

refresh

public JaspiraEventHandlerCode refresh(JaspiraEvent je)
Event handler: Refreshes the workspace view. Checks damage of the workspace display and updates the workspace accordingly. This will redraw all objects that have been invalidated using the modeler.view.invalidate event.

Parameters:
je - Event
Returns:
The event status code

redraw

public JaspiraEventHandlerCode redraw(JaspiraEvent je)
Event handler: Redraws the workspace. Performs a complete redraw of the workspace.

Parameters:
je - Event
Returns:
The event status code

setzoomfactor

public JaspiraEventHandlerCode setzoomfactor(JaspiraEvent je)
Event handler: Sets the zoom factor of the currently visible view.

Parameters:
je - Event
Returns:
The event status code

modechange

public JaspiraEventHandlerCode modechange(JaspiraEvent je)
Event handler: View mode change was performed.

Parameters:
je - Event
Returns:
The event status code

updatedrawing

public JaspiraEventHandlerCode updatedrawing(JaspiraEvent je)
Event handler: Synchronizes the display model with the process model.

Parameters:
je - Event
Returns:
The event status code

show

public JaspiraEventHandlerCode show(QualifierEvent je)
Event handler: Scrolls a process element container identified by a given model qualifier into view. Adds an enlargement offset of 100 to the display box of the element to prevent it from hanging in the corner.

Parameters:
je - Event
Returns:
The event status code

showexact

public JaspiraEventHandlerCode showexact(QualifierEvent je)
Event handler: Scrolls a process element container identified by a given model qualifier into view. Does not add an enlargement offset to the display box of the element.

Parameters:
je - Event
Returns:
The event status code

select

public JaspiraEventHandlerCode select(QualifierEvent je)
Event handler: Scrolls a process element container identified by a given model qualifier into view and selects it.

Parameters:
je - Event
Returns:
The event status code

getselectioncount

public JaspiraEventHandlerCode getselectioncount(AskEvent ae)
Event handler: Gets the number of selected elements. This modeler instance will respond to the event (and consume it) only when it is currently visible, so the target of the event will be the currently active modeler.

Parameters:
ae - Event; The answer of this event will be an Integer specifying the number of currently selected elements.
Returns:
The event status code

getselection

public JaspiraEventHandlerCode getselection(AskEvent ae)
Event handler: Gets the selected elements. This modeler instance will respond to the event (and consume it) only when it is currently visible, so the target of the event will be the currently active modeler.

Parameters:
ae - Event; The answer of this event will be a List containing the selected figures
Returns:
The event status code

getbyqualifier

public JaspiraEventHandlerCode getbyqualifier(AskEvent ae)
Event handler: Gets a process element by its model qualifier.

Parameters:
ae - Event; The answer of this event will be the ProcessElementContainer specified by the event object or null if the view does not contain such an element or the view is not currently visible.
Returns:
The event status code

importtoselection

public JaspiraEventHandlerCode importtoselection(JaspiraEvent je)
Event handler: Tries to import the event object into each currently selected element.

Parameters:
je - Event
Returns:
EVENT_HANDLED

modeler_edit_selectall

public JaspiraEventHandlerCode modeler_edit_selectall(JaspiraActionEvent jae)
Event handler: Select all elements of the drawing.

Parameters:
jae - Action event
Returns:
The event status code

modeler_edit_normalize

public JaspiraEventHandlerCode modeler_edit_normalize(JaspiraActionEvent jae)
Event handler: Normalizes the drawing.

Parameters:
jae - Action event
Returns:
The event status code

snaptogrid

public JaspiraEventHandlerCode snaptogrid(JaspiraActionEvent jae)
Toggles snap to grid mode.

Parameters:
jae - Action event
Returns:
The event status code

modeler_edit_fliporientation

public JaspiraEventHandlerCode modeler_edit_fliporientation(JaspiraActionEvent jae)
Event handler: Normalizes the drawing.

Parameters:
jae - Action event
Returns:
The event status code

editor_shadow

public JaspiraEventHandlerCode editor_shadow(JaspiraEvent je)
Event handler: The shadow type option has been changed.

Parameters:
je - Event
Returns:
The event status code

editor_grid_type

public JaspiraEventHandlerCode editor_grid_type(JaspiraEvent je)
Event handler: The grid layout option has been changed.

Parameters:
je - Event
Returns:
The event status code

editor_grid_display

public JaspiraEventHandlerCode editor_grid_display(JaspiraEvent je)
Event handler: The grid display option has been changed.

Parameters:
je - Event
Returns:
The event status code

editor_color_workspace

public JaspiraEventHandlerCode editor_color_workspace(JaspiraEvent je)
Event handler: The workspace color has been changed.

Parameters:
je - Event
Returns:
The event status code

editor_autoconnector_datalink

public JaspiraEventHandlerCode editor_autoconnector_datalink(JaspiraEvent je)
Event handler: The data link auto connector mode has been changed.

Parameters:
je - Event
Returns:
The event status code

displayobject_changed_titlemode

public JaspiraEventHandlerCode displayobject_changed_titlemode(JaspiraEvent event)
Called after the titlemode option of the role manager (DisplayObjectPlugin) has been changed.

Parameters:
event - Event
Returns:
The event status code

miniview_created

public JaspiraEventHandlerCode miniview_created(MiniViewEvent mve)
Event handler: Miniview initialization. A new mini view was created and wants to know which editors are present - return our editor to it.

Parameters:
mve - Event
Returns:
The event status code

plugin_propertybrowser_executesave

public JaspiraEventHandlerCode plugin_propertybrowser_executesave(PropertyBrowserSaveEvent oee)
Event handler: Save the object currently edited by the property browser. Saves the object if it is a process object of our current process.

Parameters:
oee - Event
Returns:
The event status code

modeler_drawing_figureadded

public JaspiraEventHandlerCode modeler_drawing_figureadded(JaspiraEvent je)
Event handler: A figure was added to the workspace. Called after a node has been added to the drawing. Invokes the node autoconnector if the figure is a node and selects the figure. If a node is currently selected, connect the selected and the new node via their default sockets.

Parameters:
je - Event
Returns:
The event status code

modeler_drawing_socketadded

public JaspiraEventHandlerCode modeler_drawing_socketadded(JaspiraEvent je)
Event handler: Socket autoconnector. Called after a socket has been added to a node. If a node is currently selected, connect the selected and the new node via their default sockets.

Parameters:
je - Event
Returns:
The event status code

modeler_drawing_paramadded

public JaspiraEventHandlerCode modeler_drawing_paramadded(JaspiraEvent je)
Event handler: Socket autoconnector. Called after a parameter has been added to a socket.

Parameters:
je - Event
Returns:
The event status code

modeler_process_modified

public JaspiraEventHandlerCode modeler_process_modified(JaspiraEvent je)
Event handler: Modification flag. Notifies the modeler that the process has been modified.

Parameters:
je - Event
Returns:
The event status code

undo_history

public JaspiraEventHandlerCode undo_history(JaspiraEvent je)
Receiver for the undo history size option event.



Copyright © 2011. All Rights Reserved.