org.openbp.jaspira.action
Class JaspiraProxyAction

java.lang.Object
  extended by org.openbp.common.generic.description.DescriptionObjectImpl
      extended by org.openbp.common.generic.description.DisplayObjectImpl
          extended by org.openbp.jaspira.action.JaspiraAction
              extended by org.openbp.jaspira.action.JaspiraProxyAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, javax.swing.Action, Copyable, DescriptionObject, Displayable, DisplayObject, Validatable

public class JaspiraProxyAction
extends JaspiraAction

A Jaspira Proxy action can be used to insert arbitary JComponent elements into a toolbar (and later a menu).

Author:
Stephan Moritz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openbp.jaspira.action.JaspiraAction
DFLT_PRIORITY, KEY_SEQUENCE_DELIM, MENU_ROOT, MNEMONIC_DELIMITER, PROPERTY_CONDITION, PROPERTY_DESCRIPTION, PROPERTY_DISABLED_ICON, PROPERTY_DISPLAY_NAME, PROPERTY_ENABLED, PROPERTY_ICON, PROPERTY_MENU_PARENT, PROPERTY_NAME, PROPERTY_PAGE_NAMES, PROPERTY_PRIO, PROPERTY_SCOPE, PROPERTY_SELECTED, PROPERTY_SEQUENCE, PROPERTY_TOOLBAR_PARENT, PROPERTY_TYPE, TOOLBAR_ROOT, TYPE_ACTION, TYPE_COMBO, TYPE_GROUP, TYPE_MENU
 
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
 
Fields inherited from interface org.openbp.common.generic.Copyable
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW
 
Constructor Summary
JaspiraProxyAction(java.lang.String name, javax.swing.JComponent component, int priority)
          Constructor.
 
Method Summary
 javax.swing.JComponent toComponent()
          Constructs a component from this action.
 javax.swing.JMenuItem toMenuItem()
          Always returns null.
 javax.swing.JMenuItem toMenuItem(java.lang.String currentPageName)
          Always returns null.
 javax.swing.JComponent toToolBarComponent()
          Returns the component.
 javax.swing.JComponent toToolBarComponent(java.lang.String currentPageName)
          Returns the component.
 
Methods inherited from class org.openbp.jaspira.action.JaspiraAction
actionPerformed, addMenuChild, addPropertyChangeListener, addToolbarChild, checkForMnemonic, clearValues, decreaseCounter, firePropertyChange, getActionProperty, getActionPropertyBoolean, getActionPropertyInt, getActionPropertyString, getActionPropertyString, getActionResource, getCondition, getCounter, getDisabledIcon, getIcon, getKeySequences, getMenuchildren, getMnemonicChar, getMnemonicPos, getPageNames, getPriority, getToolbarchildren, getType, getValue, increaseCounter, isEnabled, isMnemonic, isSelected, matchesPageName, putValue, removeMenuChild, removePropertyChangeListener, removeToolbarChild, setDescription, setDisabledIcon, setDisplayName, setEnabled, setIcon, setPageNames, setPriority, setSelected
 
Methods inherited from class org.openbp.common.generic.description.DisplayObjectImpl
copyFrom, getDisplayName, getDisplayText
 
Methods inherited from class org.openbp.common.generic.description.DescriptionObjectImpl
clone, compareTo, getDescription, getDescriptionEscape, getDescriptionText, getName, setDescriptionEscape, setName, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.openbp.common.generic.description.DescriptionObject
clone, getDescription, getDescriptionText, getName, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

JaspiraProxyAction

public JaspiraProxyAction(java.lang.String name,
                          javax.swing.JComponent component,
                          int priority)
Constructor.

Parameters:
name - The internal name of the object
component - Component to wrap by this proxy action
priority - Priority
Method Detail

toComponent

public javax.swing.JComponent toComponent()
Description copied from class: JaspiraAction
Constructs a component from this action.

Overrides:
toComponent in class JaspiraAction
Returns:
Null
See Also:
JaspiraAction.toComponent()

toMenuItem

public javax.swing.JMenuItem toMenuItem()
Always returns null.

Overrides:
toMenuItem in class JaspiraAction
Returns:
A JaspiraMenuItem if the action is a regular action, a JaspiraMenu if the action is a menu action and has menu children, null otherwise
See Also:
JaspiraAction.toMenuItem()

toMenuItem

public javax.swing.JMenuItem toMenuItem(java.lang.String currentPageName)
Always returns null.

Overrides:
toMenuItem in class JaspiraAction
Parameters:
currentPageName - Name of the Jaspira page to check against or null
Returns:
A JaspiraMenuItem if the action is a regular action, a JaspiraMenu if the action is a menu action and has menu children, null otherwise
See Also:
JaspiraAction.toMenuItem(String currentPageName)

toToolBarComponent

public javax.swing.JComponent toToolBarComponent()
Returns the component.

Overrides:
toToolBarComponent in class JaspiraAction
Returns:
A JaspiraToolbarButton if the action is a regular action, a JaspiraToolbar if the action has toolbar children, null otherwise
See Also:
JaspiraAction.toToolBarComponent()

toToolBarComponent

public javax.swing.JComponent toToolBarComponent(java.lang.String currentPageName)
Returns the component.

Overrides:
toToolBarComponent in class JaspiraAction
Parameters:
currentPageName - Name of the Jaspira page to check against or null
Returns:
A JaspiraToolbarButton if the action is a regular action, a JaspiraToolbar if the action has toolbar children, null otherwise
See Also:
JaspiraAction.toToolBarComponent(String currentPageName)


Copyright © 2011. All Rights Reserved.