SRJRCFrames
v0.1.296

de.schwarzrot.ui.action
Class DesktopActionHandler

java.lang.Object
  extended by de.schwarzrot.ui.action.support.AbstractActionHandler
      extended by de.schwarzrot.ui.action.DesktopActionHandler
All Implemented Interfaces:
ActionHandler

public class DesktopActionHandler
extends AbstractActionHandler

the ActionHandler for user-actions common to all applications, like opening an application, or terminate the game ...

Author:
Reinhard Mantey

Field Summary
protected  Desktop desktop
           
protected static MessageSource msgSource
           
 
Constructor Summary
DesktopActionHandler(String name)
           
 
Method Summary
 JMenu createSubMenu(String cmd)
          will be called for any enum, that has the suffix '_sub'.
 boolean doLogin()
           
 void doPreferences(ActionEvent e)
           
 Enum<?>[] getCommands()
          return the (sub-)set of action-enums, that should go into the menuebar.
 RootWindowHandler getDesktop()
           
 Enum<?>[] getPopupCommands(Object context)
          return the (sub-)set of action-enums, that should form the popup context menue
 String[] getSwitchCmds()
           
 Enum<?>[] getToolBarCommands()
          return the (sub-)set of action-enums, that should be accessible by toolbar buttons
 void init()
          used to setup all handled actions
 void init(Collection<Application<?>> apps)
           
 void setDesktop(Desktop desktop)
           
 
Methods inherited from class de.schwarzrot.ui.action.support.AbstractActionHandler
createExtraToolBar, createPopup, createPopup, createSubMenu, createToolBar, enableAction, enableAction, findAction, findAction, findAction, getAction, getExtraToolBarCommands, getName, init, putAction, setEnabled, setName, setupAction, setupAction, setupAction, setupAction, setupAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

msgSource

protected static MessageSource msgSource

desktop

protected Desktop desktop
Constructor Detail

DesktopActionHandler

public DesktopActionHandler(String name)
Method Detail

createSubMenu

public JMenu createSubMenu(String cmd)
Description copied from interface: ActionHandler
will be called for any enum, that has the suffix '_sub'. It's up to the handler, to create and return a menue for the given enum.

Specified by:
createSubMenu in interface ActionHandler
Overrides:
createSubMenu in class AbstractActionHandler
Parameters:
cmd - the string representation of the enum that triggered the submenu creation
Returns:
the created submenu or null in case of denied creation

doLogin

public boolean doLogin()

doPreferences

public void doPreferences(ActionEvent e)

getDesktop

public final RootWindowHandler getDesktop()

getPopupCommands

public Enum<?>[] getPopupCommands(Object context)
Description copied from interface: ActionHandler
return the (sub-)set of action-enums, that should form the popup context menue

Parameters:
context - the context object to create the popup for. May be null.
Returns:
a set of action enums

getSwitchCmds

public final String[] getSwitchCmds()

getToolBarCommands

public Enum<?>[] getToolBarCommands()
Description copied from interface: ActionHandler
return the (sub-)set of action-enums, that should be accessible by toolbar buttons

Returns:
a set of action enums

init

public void init()
Description copied from interface: ActionHandler
used to setup all handled actions

Specified by:
init in interface ActionHandler
Overrides:
init in class AbstractActionHandler

init

public void init(Collection<Application<?>> apps)

setDesktop

public final void setDesktop(Desktop desktop)

getCommands

public Enum<?>[] getCommands()
Description copied from interface: ActionHandler
return the (sub-)set of action-enums, that should go into the menuebar.

Returns:
a set of action enums

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.