schmitzm.geotools.gui
Class JMapEditorToolBar.EditorPaneToolBarAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by schmitzm.geotools.gui.JMapEditorToolBar.EditorPaneToolBarAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Enclosing class:
JMapEditorToolBar

public static class JMapEditorToolBar.EditorPaneToolBarAction
extends AbstractAction

Extends the AbstractAction with maintaining an ID and the JMapEditorToolBar the action controls. Additionally this class automatically calls JMapEditorToolBar.performActionButton(int, ActionEvent).

Author:
Martin Schmitz (University of Bonn/Germany)
See Also:
Serialized Form

Field Summary
protected  int id
          The ID of the action
protected  JMapEditorToolBar toolBar
          The tool bar, this action is made for.
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
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
JMapEditorToolBar.EditorPaneToolBarAction(int id, JMapEditorToolBar toolBar)
          Creates a new action with a dummy description and no icon.
JMapEditorToolBar.EditorPaneToolBarAction(int id, JMapEditorToolBar toolBar, String name)
          Creates a new action without an icon.
JMapEditorToolBar.EditorPaneToolBarAction(int id, JMapEditorToolBar toolBar, String name, Icon icon)
          Creates a new action.
 
Method Summary
 void actionPerformed(ActionEvent e)
          Calls JMapEditorToolBar.performActionButton(int, ActionEvent).
 int getID()
          Returns the (unique) id of this action.
 
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
 

Field Detail

id

protected int id
The ID of the action


toolBar

protected JMapEditorToolBar toolBar
The tool bar, this action is made for.

Constructor Detail

JMapEditorToolBar.EditorPaneToolBarAction

public JMapEditorToolBar.EditorPaneToolBarAction(int id,
                                                 JMapEditorToolBar toolBar)
Creates a new action with a dummy description and no icon.

Parameters:
id - unique ID for the action
toolBar - toolbar this action is made for

JMapEditorToolBar.EditorPaneToolBarAction

public JMapEditorToolBar.EditorPaneToolBarAction(int id,
                                                 JMapEditorToolBar toolBar,
                                                 String name)
Creates a new action without an icon.

Parameters:
id - unique ID for the action
toolBar - toolbar this action is made for
name - description used for buttons or menus

JMapEditorToolBar.EditorPaneToolBarAction

public JMapEditorToolBar.EditorPaneToolBarAction(int id,
                                                 JMapEditorToolBar toolBar,
                                                 String name,
                                                 Icon icon)
Creates a new action.

Parameters:
id - unique ID for the action
toolBar - toolbar this action is made for
name - description used for buttons or menus
icon - icon used for buttons or menus
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Calls JMapEditorToolBar.performActionButton(int, ActionEvent).


getID

public int getID()
Returns the (unique) id of this action.

Returns: