com.pepper.platform.program.actions
Class ProgramAbstractAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.pepper.platform.program.actions.ProgramAbstractAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
DeepRefreshAction, com.pepper.platform.program.actions.DelegatedAction, DeletePageAction, DeleteSectionAction, ExportAction, ImportFilesAction, NewPageAction, NewSectionAction, PackageQuitAction, com.pepper.platform.program.actions.PageAction, RefreshAction, RenameSectionAction, ShowPageAction, ShowPepperPageAction, ShowTabContentsAction, SortPageAction, StopAction, ViewNavAction

public abstract class ProgramAbstractAction
extends AbstractAction

Abstract base class used by most common actions in the Keeper Framework.

See Also:
Serialized Form

Field Summary
static String IMAGE_DIR
          Image Dir
static String LARGE_ICON
          Large Icon
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ProgramAbstractAction()
          Creates a new ProgramAbstractAction instance.
ProgramAbstractAction(String packageId)
          Create a new action associated with a particular package ID
ProgramAbstractAction(String actionName, Icon icon)
          Create a new action with a name and icon
ProgramAbstractAction(String packageId, String actionName)
          Create a new action associated with a particular package ID with the specified actionName
 
Method Summary
 String getActionCommand()
          Gets the value from the key Action.ACTION_COMMAND_KEY.
 PepperProgramConfig getConfig()
          Returns the PepperProgramConfig instance for this action.
 GuiServicesProvider getGSP()
          Returns the GuiServicesProvider instance for the keeper
 ImageIcon getIcon(String name)
          Returns the Icon associated with the name from the resources.
 String getLongDescription()
          Gets the value from the key Action.LONG_DESCRIPTION.
 Integer getMnemonicKey()
          Gets the value from the key Action.MNEMONIC_KEY.
 String getName()
          Gets the value from the key Action.NAME.
 String getPackageId()
          Get the packageId that this action is associated with
 PepperProgramProcess getProcess()
          Returns the PepperProgramProcess associated with this action, or the currently displayed PepperProgramProcess
 AbstractPepperProgram getProgram()
          Returns the PepperProgram associated with this action, or the currently displayed PepperProgram
 String getShortDescription()
          Gets the value from the key Action.SHORT_DESCRIPTION
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Field Detail

IMAGE_DIR

public static final String IMAGE_DIR
Image Dir

See Also:
Constant Field Values

LARGE_ICON

public static final String LARGE_ICON
Large Icon

See Also:
Constant Field Values

log

protected static org.apache.commons.logging.Log log
Constructor Detail

ProgramAbstractAction

public ProgramAbstractAction()
Creates a new ProgramAbstractAction instance.


ProgramAbstractAction

public ProgramAbstractAction(String packageId)
Create a new action associated with a particular package ID

Parameters:
packageId - a String value

ProgramAbstractAction

public ProgramAbstractAction(String packageId,
                             String actionName)
Create a new action associated with a particular package ID with the specified actionName

Parameters:
packageId - The packageId of the package
actionName - The name of the action

ProgramAbstractAction

public ProgramAbstractAction(String actionName,
                             Icon icon)
Create a new action with a name and icon

Parameters:
actionName - a String value
icon - an Icon value
Method Detail

getPackageId

public String getPackageId()
Get the packageId that this action is associated with

Returns:
a String value

getProgram

public AbstractPepperProgram getProgram()
Returns the PepperProgram associated with this action, or the currently displayed PepperProgram

Returns:
An AbstractPepperProgram instance.

getProcess

public PepperProgramProcess getProcess()
Returns the PepperProgramProcess associated with this action, or the currently displayed PepperProgramProcess

Returns:
a PepperProgramProcess value

getConfig

public PepperProgramConfig getConfig()
Returns the PepperProgramConfig instance for this action.

Returns:
an PepperProgramConfig value

getGSP

public GuiServicesProvider getGSP()
Returns the GuiServicesProvider instance for the keeper

Returns:
The Keeper's GuiServicesProvider

getActionCommand

public String getActionCommand()
Gets the value from the key Action.ACTION_COMMAND_KEY.

Returns:
A String containing the action's command key.

getShortDescription

public String getShortDescription()
Gets the value from the key Action.SHORT_DESCRIPTION

Returns:
A String containing the action's short description.

getLongDescription

public String getLongDescription()
Gets the value from the key Action.LONG_DESCRIPTION.

Returns:
A String containing the action's long description.

getName

public String getName()
Gets the value from the key Action.NAME.

Returns:
A String containing the action's name.

getMnemonicKey

public Integer getMnemonicKey()
Gets the value from the key Action.MNEMONIC_KEY.

Returns:
An Integer value containing the action's mnemonic key number.

getIcon

public ImageIcon getIcon(String name)
Returns the Icon associated with the name from the resources. The resouce should be in the path.

Parameters:
name - name of the icon file i.e., help16.gif
Returns:
The name of the image or null if the icon is not found.


Copyright © 2006-2007 Pepper Computer, Inc. All Rights Reserved.