net.sf.doolin.gui.action
Class AbstractTextAction

java.lang.Object
  extended by net.sf.doolin.gui.action.AbstractGUIAction
      extended by net.sf.doolin.gui.action.AbstractTextAction
All Implemented Interfaces:
GUIAction
Direct Known Subclasses:
AbstractDialogAction, AbstractWizardAction

public abstract class AbstractTextAction
extends AbstractGUIAction

Abstract implementation for an action is based on a text key.

Author:
Damien Coraboeuf

Constructor Summary
AbstractTextAction(String id, String text, boolean textKey)
          Constructor for the action
 
Method Summary
 GUIExpression getIconIDExpression(ActionContext actionContext)
          Icon for the action
 String getId()
          ID for the action
protected abstract  String getShortcut()
          Gets the shortcut for this action
 GUIExpression getShortcutExpression(ActionContext actionContext)
          Shortcut for the action
protected  String getText()
          Gets the plain title for the action
 GUIExpression getTextExpression(ActionContext actionContext)
          Text for the action
 GUIExpression getTipExpression(ActionContext actionContext)
          Tip for the action
 
Methods inherited from class net.sf.doolin.gui.action.AbstractGUIAction
doExecute, execute, getActionContextData, getActionContextDataExtractor, getDisplayStateHandler, getIcon, getIconService, setActionContextDataExtractor, setDisplayStateHandler, setIconService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTextAction

public AbstractTextAction(String id,
                          String text,
                          boolean textKey)
Constructor for the action

Parameters:
id - Action id
text - Key for the text
Method Detail

getIconIDExpression

public GUIExpression getIconIDExpression(ActionContext actionContext)
Description copied from interface: GUIAction
Icon for the action

Parameters:
actionContext - Context for the action
Returns:
Icon model

getId

public String getId()
Description copied from interface: GUIAction
ID for the action

Returns:
ID

getShortcut

protected abstract String getShortcut()
Gets the shortcut for this action

Returns:
Shortcut definition
See Also:
KeyStroke.getKeyStroke(String)

getShortcutExpression

public GUIExpression getShortcutExpression(ActionContext actionContext)
Description copied from interface: GUIAction
Shortcut for the action

Parameters:
actionContext - Context for the action
Returns:
Shortcut model

getText

protected String getText()
Gets the plain title for the action

Returns:
Displayable text

getTextExpression

public GUIExpression getTextExpression(ActionContext actionContext)
Description copied from interface: GUIAction
Text for the action

Parameters:
actionContext - Context for the action
Returns:
Text model

getTipExpression

public GUIExpression getTipExpression(ActionContext actionContext)
Description copied from interface: GUIAction
Tip for the action

Parameters:
actionContext - Context for the action
Returns:
Tip model


Copyright © 2011. All Rights Reserved.