com.virtuosotechnologies.lib.basiccommand
Class BasicDecoratingCommandNode
java.lang.Object
com.virtuosotechnologies.lib.container.PseudoModifiablePropertySet
com.virtuosotechnologies.lib.container.BasicModifiablePropertySet
com.virtuosotechnologies.lib.command.AbstractCommandNode
com.virtuosotechnologies.lib.basiccommand.BasicCommandNode
com.virtuosotechnologies.lib.basiccommand.BasicDecoratingCommandNode
- All Implemented Interfaces:
- CommandListener, CommandNode, EventListener, ModifiablePropertySet, PropertySet
- public class BasicDecoratingCommandNode
- extends BasicCommandNode
A command node that decorates another one. It shares the same flavor and invocation behavior
as its delegate, and normally shares the same properties, but the properties can be overridden.
This is useful in cases where there are multiple ways to invoke a particular command, with
potentially different titles (for example, a menu command and a button with different text).
Fields inherited from class com.virtuosotechnologies.lib.basiccommand.BasicCommandNode |
ACCELERATOR_KEYSTROKE_PROPERTY, ACTIONITEM_FLAVOR, APPEARANCECHANGING_TOGGLEITEM_FLAVOR, CONTAINER_FLAVOR, DISABLED_PROPERTY, GROUP_FLAVOR, HIDDEN_PROPERTY, LONG_DESCRIPTION_PROPERTY, MNEMONIC_CODE_PROPERTY, NAME_PROPERTY, NULL_FLAVOR, RADIOCONTAINER_FLAVOR, RADIOGROUP_FLAVOR, RADIOMUTEX_FLAVOR, SELECTED_CHILD_PROPERTY, SELECTED_NAME_PROPERTY, SELECTED_SHORT_DESCRIPTION_PROPERTY, SELECTED_SMALL_ICON_PROPERTY, SELECTION_STATE_PROPERTY, SEPARATOR_FLAVOR, SHORT_DESCRIPTION_PROPERTY, SMALL_ICON_PROPERTY, TOGGLEITEM_FLAVOR |
Methods inherited from class com.virtuosotechnologies.lib.basiccommand.BasicCommandNode |
dump, getAcceleratorKeystrokeProperty, getDefaultProperties, getDisabledProperty, getHiddenProperty, getLongDescriptionProperty, getMnemonicCodeProperty, getNameProperty, getSelectedChildProperty, getSelectedNameProperty, getSelectedShortDescriptionProperty, getSelectedSmallIconProperty, getSelectionStateProperty, getShortDescriptionProperty, getSmallIconProperty, setAcceleratorKeystrokeProperty, setDisabledProperty, setHiddenProperty, setLongDescriptionProperty, setMnemonicCodeProperty, setNameProperty, setSelectedChildProperty, setSelectedNameProperty, setSelectedShortDescriptionProperty, setSelectedSmallIconProperty, setSelectionStateProperty, setShortDescriptionProperty, setSmallIconProperty |
Methods inherited from class com.virtuosotechnologies.lib.command.AbstractCommandNode |
addChild, addNodeListener, fireAllChildrenRemovedEvent, fireChildAddedEvent, fireChildRemovedEvent, getIndexOfChild, getNthChild, getNumChildren, insertChild, invoke, isChild, removeAllChildren, removeNodeListener, removeNthChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicDecoratingCommandNode
public BasicDecoratingCommandNode(CommandNode delegate)
- Constructor.
- Parameters:
delegate
- node to decorate
getFlavor
public CommandNodeFlavor getFlavor()
- Get the flavor of CommandNode
- Returns:
- the flavor of the decorated delegate
putValue
public void putValue(ConstrainedKey key,
Object value)
- Set a property. Normally, this will result in the decorator's properties being set,
overriding the delegate's properties, but in a few cases (such as state), it doesn't
make sense to decorate the property, so the original delegate will have its property set.
- Specified by:
putValue
in interface ModifiablePropertySet
- Overrides:
putValue
in class PseudoModifiablePropertySet
- Parameters:
key
- key object for the property.value
- new value for the property.
commandInvoked
public void commandInvoked(CommandEvent ev)
- Invoke the command. Delegates to the original node.
- Parameters:
ev
- event
getDelegate
public CommandNode getDelegate()
- Get delegate
- Returns:
- the delegate CommandNode