net.clackrouter.actions
Class ClackAddComponent
java.lang.Object
javax.swing.AbstractAction
net.clackrouter.actions.AbstractActionDefault
net.clackrouter.actions.ClackAddComponent
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, TranslatorConstants
public class ClackAddComponent
- extends AbstractActionDefault
Action to implement component addition (via the Router Graph popup menu).
Uses reflection to create a new component. We use the command string
plus an integer to assure that the name is unqiue within the router.
The class to create is based on mappings from command to fully-qualified classname that are stored in the
net/clackrouter/jgraph/pad/resources/Clack.properties file.
- See Also:
- Serialized Form
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 |
Methods inherited from class net.clackrouter.actions.AbstractActionDefault |
getCurrentDocument, getCurrentGraph, getCurrentGraphLayoutCache, getGraphpad, getMenuComponent, getMenuComponents, getName, getPresentationText, getToolComponent, getToolComponents, 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 |
ClackAddComponent
public ClackAddComponent(ClackFramework graphpad)
addMapping
public void addMapping(java.lang.String menuName,
java.lang.String className)
getMenuNames
public java.lang.String[] getMenuNames()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)