de.jreality.ui.viewerapp.actions
Class AbstractJrAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by de.jreality.ui.viewerapp.actions.AbstractJrAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AbstractCameraAction, AbstractJrToggleAction, AbstractSelectionListenerAction, ExportImage, ExportPDF, ExportPS, ExportRIB, ExportScreenshot, ExportSTL, ExportSVG, ExportU3D, ExportVRML, LoadFile, LoadScene, LoadSkyBox, Maximize, Quit, RotateSkyboxSides, SaveScene, SetViewerSize, SwitchBackgroundColor, ToggleBeanShell, ToggleExternalBeanShell, ToggleExternalNavigator, ToggleMenu, ToggleNavigator, ToggleRenderSelection, ToggleShowCursor, ToggleViewerFullScreen, ViewerAspect4To3

public abstract class AbstractJrAction
extends AbstractAction

Abstract class for actions used in jReality applications.

Author:
msommer
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractJrAction(String name)
          Default constructor.
AbstractJrAction(String name, Component parentComp)
          Constructor for actions which need a parent component e.g.
 
Method Summary
abstract  void actionPerformed(ActionEvent e)
           
 JMenuItem createMenuItem()
           
 AbstractButton createToolboxItem()
           
 Icon getIcon()
           
 void setAcceleratorKey(KeyStroke key)
          Set the accelerator key for this action.
 void setIcon(Icon icon)
           
 void setName(String name)
          Set the action's name.
 void setShortDescription(String desc)
          Set the action's short description.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJrAction

public AbstractJrAction(String name)
Default constructor.

Parameters:
name - the name of the action

AbstractJrAction

public AbstractJrAction(String name,
                        Component parentComp)
Constructor for actions which need a parent component e.g. for displaying dialogs.

Parameters:
name - the name of the action
parentComp - the parent component
Method Detail

actionPerformed

public abstract void actionPerformed(ActionEvent e)

setName

public void setName(String name)
Set the action's name.

Parameters:
name - the name of this action

setShortDescription

public void setShortDescription(String desc)
Set the action's short description.

Parameters:
name - the short description of this action

setAcceleratorKey

public void setAcceleratorKey(KeyStroke key)
Set the accelerator key for this action.

Parameters:
key - the accelerator keystroke

createMenuItem

public JMenuItem createMenuItem()

createToolboxItem

public AbstractButton createToolboxItem()

setIcon

public void setIcon(Icon icon)

getIcon

public Icon getIcon()