net.clackrouter.actions
Class AbstractActionList

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.clackrouter.actions.AbstractActionDefault
          extended by net.clackrouter.actions.AbstractActionList
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, TranslatorConstants
Direct Known Subclasses:
AbstractActionListCell, WindowWindows

public abstract class AbstractActionList
extends AbstractActionDefault

See Also:
Serialized Form

Field Summary
static java.awt.Point center
           
static java.lang.String ITEM_KEY
          Item key for the user item
static int u2
           
 
Fields inherited from class net.clackrouter.actions.AbstractActionDefault
graphpad
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface net.clackrouter.jgraph.pad.resources.TranslatorConstants
PREFIX_COMPONENT, PREFIX_MESSAGE_ERROR, PREFIX_MESSAGE_INFORMATION, PREFIX_MESSAGE_WARING, SUFFIX_ACCELERATOR, SUFFIX_ACTION, SUFFIX_ICON, SUFFIX_IMAGE, SUFFIX_LABEL, SUFFIX_MENU, SUFFIX_MNEMONIC, SUFFIX_TEXT, SUFFIX_TITLE, SUFFIX_TOOL_TIP_TEXT
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractActionList(ClackFramework graphpad)
          Constructor for AbstractActionList.
AbstractActionList(ClackFramework graphpad, java.lang.String name)
          Constructor for AbstractActionList.
AbstractActionList(ClackFramework graphpad, java.lang.String name, javax.swing.Icon icon)
          Constructor for AbstractActionList.
 
Method Summary
protected  javax.swing.ListCellRenderer getItemListCellRenderer()
          Returns the List Cell Renderer for the Items.
protected  java.lang.String getItemPresentationText(java.lang.Object item)
          Returns the item presentation text (buttonEdge for the MenuItem).
protected abstract  java.lang.Object[] getItems()
          You should return a hashtable with the possible items.
protected  javax.swing.JMenu getMenuBarComponent()
           
protected  java.awt.Component getMenuComponent(java.lang.String actionCommand, java.lang.Object itemValue)
          Returns a JMenuItem with a link to this action.
 java.awt.Component[] getMenuComponents()
          Creates by default an arry with one entry.
protected  java.lang.Object getSelectedItem(java.awt.event.ActionEvent e)
           
protected  javax.swing.JComboBox getToolBarComponent()
           
 java.awt.Component[] getToolComponents()
          Returns by default a list with one JButton.
protected static java.lang.String[] tokenize(java.lang.String input)
           
 
Methods inherited from class net.clackrouter.actions.AbstractActionDefault
getCurrentDocument, getCurrentGraph, getCurrentGraphLayoutCache, getGraphpad, getMenuComponent, getName, getPresentationText, getToolComponent, setGraphpad, setSelectionAttributes, update
 
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

u2

public static int u2

center

public static java.awt.Point center

ITEM_KEY

public static final java.lang.String ITEM_KEY
Item key for the user item

See Also:
Constant Field Values
Constructor Detail

AbstractActionList

public AbstractActionList(ClackFramework graphpad)
Constructor for AbstractActionList.

Parameters:
graphpad -

AbstractActionList

public AbstractActionList(ClackFramework graphpad,
                          java.lang.String name)
Constructor for AbstractActionList.

Parameters:
graphpad -
name -

AbstractActionList

public AbstractActionList(ClackFramework graphpad,
                          java.lang.String name,
                          javax.swing.Icon icon)
Constructor for AbstractActionList.

Parameters:
graphpad -
name -
icon -
Method Detail

getMenuComponents

public java.awt.Component[] getMenuComponents()
Description copied from class: AbstractActionDefault
Creates by default an arry with one entry. The entry contains a JMenuItem which joins the instance of this Action.

Overrides:
getMenuComponents in class AbstractActionDefault
See Also:
AbstractActionDefault.getMenuComponents()

getMenuBarComponent

protected javax.swing.JMenu getMenuBarComponent()

getToolComponents

public java.awt.Component[] getToolComponents()
Description copied from class: AbstractActionDefault
Returns by default a list with one JButton. The button joints this action.

Overrides:
getToolComponents in class AbstractActionDefault
See Also:
AbstractActionDefault.getToolComponents()

getToolBarComponent

protected javax.swing.JComboBox getToolBarComponent()

getSelectedItem

protected java.lang.Object getSelectedItem(java.awt.event.ActionEvent e)

getMenuComponent

protected java.awt.Component getMenuComponent(java.lang.String actionCommand,
                                              java.lang.Object itemValue)
Returns a JMenuItem with a link to this action.


getItems

protected abstract java.lang.Object[] getItems()
You should return a hashtable with the possible items.


getItemListCellRenderer

protected javax.swing.ListCellRenderer getItemListCellRenderer()
Returns the List Cell Renderer for the Items. By default returns null.


getItemPresentationText

protected java.lang.String getItemPresentationText(java.lang.Object item)
Returns the item presentation text (buttonEdge for the MenuItem). The default Implemenation returns item.toString()


tokenize

protected static java.lang.String[] tokenize(java.lang.String input)