net.sourceforge.geeboss.controller
Class EventManager

java.lang.Object
  extended by net.sourceforge.geeboss.controller.EventManager
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable

public class EventManager
extends java.lang.Object
implements org.apache.avalon.framework.activity.Initializable

The Event Manager is responsible to react on user-action. User action may for example occur when any item from the main menu is selected.


Field Summary
static int EDIT_ACTION_COPY
          Edit Menu Action: Copy
static int EDIT_ACTION_CUT
          Edit Menu Action: Cut
static int EDIT_ACTION_DELETE
          Edit Menu Action: Delete
static int EDIT_ACTION_PASTE
          Edit Menu Action: Paste
static int EDIT_ACTION_PROPERTIES
          Edit Menu Action: Properties
static int EDIT_ACTION_SELECTALL
          Edit Menu Action: Select All
 
Constructor Summary
EventManager(GeebossContainer container)
          Instantiate a new EventManager
 
Method Summary
 void actionCloseAll()
          Close all opened tabs
 void actionCloseCurrent()
          Close displayed tab
 void actionExit()
          Exit application
 void actionHandleTreeItemSelect()
          The user has selected to open a TreeItem.
 boolean actionImportSettings()
          Import settings from local file
 void actionMinimizeWindow()
          Minimize application window
 void actionOpenAbout()
          Show the about dialog
 void actionOpenPreferences()
          Show Geeboss's preferences in a dialog
 void actionOpenURL(java.lang.String url)
          Open the URL in the browser
 void actionOpenURLExternal(java.lang.String url)
          Open the URL in the external browser
 void actionShowLicense()
          Show the CPL license in a new tab
 void actionShowQuickview(boolean show)
          Show / Hide the quickview control
 void handleEditAction(int action)
          This method is called when a MenuItem from the Edit Menu is selected.
 void initEditorsFromDevice()
          Init the editors configuration according to the device
 void initialize()
          Initialize this component
 void openMidiPorts(java.lang.String inputPortName, java.lang.String outputPortName)
          Open input and output port using the MidiPortOpenner thread
 void setActiveEditor(Editor editor)
          Set the currently active editor
 void syncControls()
          Get the main controls from the maincontroller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDIT_ACTION_COPY

public static final int EDIT_ACTION_COPY
Edit Menu Action: Copy

See Also:
Constant Field Values

EDIT_ACTION_CUT

public static final int EDIT_ACTION_CUT
Edit Menu Action: Cut

See Also:
Constant Field Values

EDIT_ACTION_DELETE

public static final int EDIT_ACTION_DELETE
Edit Menu Action: Delete

See Also:
Constant Field Values

EDIT_ACTION_PASTE

public static final int EDIT_ACTION_PASTE
Edit Menu Action: Paste

See Also:
Constant Field Values

EDIT_ACTION_PROPERTIES

public static final int EDIT_ACTION_PROPERTIES
Edit Menu Action: Properties

See Also:
Constant Field Values

EDIT_ACTION_SELECTALL

public static final int EDIT_ACTION_SELECTALL
Edit Menu Action: Select All

See Also:
Constant Field Values
Constructor Detail

EventManager

public EventManager(GeebossContainer container)
Instantiate a new EventManager

Parameters:
container - the geeboss container
Method Detail

initialize

public void initialize()
                throws java.lang.Exception
Initialize this component

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

setActiveEditor

public void setActiveEditor(Editor editor)
Set the currently active editor

Parameters:
editor - the active editor

initEditorsFromDevice

public void initEditorsFromDevice()
Init the editors configuration according to the device


openMidiPorts

public void openMidiPorts(java.lang.String inputPortName,
                          java.lang.String outputPortName)
Open input and output port using the MidiPortOpenner thread

Parameters:
inputPortName - the input port name or null
outputPortName - the output port name or null

actionHandleTreeItemSelect

public void actionHandleTreeItemSelect()
The user has selected to open a TreeItem. In dependance of what kind of data the TreeItem is representating, an action is performed.


actionImportSettings

public boolean actionImportSettings()
Import settings from local file

Returns:
true if the import of settings was successfull

syncControls

public void syncControls()
Get the main controls from the maincontroller


actionCloseAll

public void actionCloseAll()
Close all opened tabs


actionCloseCurrent

public void actionCloseCurrent()
Close displayed tab


actionExit

public void actionExit()
Exit application


actionMinimizeWindow

public void actionMinimizeWindow()
Minimize application window


actionOpenAbout

public void actionOpenAbout()
Show the about dialog


actionOpenPreferences

public void actionOpenPreferences()
Show Geeboss's preferences in a dialog


actionOpenURL

public void actionOpenURL(java.lang.String url)
Open the URL in the browser

Parameters:
url - The URL to open

actionShowLicense

public void actionShowLicense()
Show the CPL license in a new tab


actionShowQuickview

public void actionShowQuickview(boolean show)
Show / Hide the quickview control

Parameters:
show - true if visible

handleEditAction

public void handleEditAction(int action)
This method is called when a MenuItem from the Edit Menu is selected. It will retrieve the current selected control and perform an action based on the given action value and the type of Control that is selected.

Parameters:
action - One of the supported actions of the edit menu

actionOpenURLExternal

public void actionOpenURLExternal(java.lang.String url)
Open the URL in the external browser

Parameters:
url - The URL to open


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.