com.pietschy.command.delegate
Class DelegatingToggleGroupCommand

java.lang.Object
  extended by com.pietschy.command.Command
      extended by com.pietschy.command.ActionCommand
          extended by com.pietschy.command.delegate.DelegatingCommand
              extended by com.pietschy.command.delegate.DelegatingToggleCommand
                  extended by com.pietschy.command.delegate.DelegatingToggleGroupCommand
All Implemented Interfaces:
ActionCommandExecutor, Bindable, Identifiable

 class DelegatingToggleGroupCommand
extends DelegatingToggleCommand

A custom DelegatingToggleCommand used internally by DelegatingToggleGroups. This implementation track the parent groups DelegateMediator and ensures that menu items are always created as radio buttons.


Field Summary
 
Fields inherited from class com.pietschy.command.delegate.DelegatingToggleCommand
PROPERTY_SELECTED
 
Fields inherited from class com.pietschy.command.ActionCommand
PARAMETER_ACTION_EVENT, PARAMETER_INVOKER, PARAMETER_INVOKER_WINDOW, PARAMETER_MODIFIERS
 
Fields inherited from class com.pietschy.command.Command
internalLog, PROPERTY_ENABLED, PROPERTY_VISIBLE
 
Constructor Summary
DelegatingToggleGroupCommand(java.lang.String id)
           
 
Method Summary
 void addNotify(CommandGroup parent)
          Invoked whenever a command is added to a group.
 javax.swing.JMenuItem createMenuItem(MenuFactory factory, java.lang.String faceId)
          Creates a new JCheckBoxMenuItem that is bound to this command.
 void removeNotify(CommandGroup parent)
          Invoked whenever a command is remvoved from a group.
 
Methods inherited from class com.pietschy.command.delegate.DelegatingToggleCommand
bindAll, bindAll, bindAll, configureButtonStates, createButton, createCheckBox, createCheckBox, createCheckBox, createCheckBox, getDelegate, isSelected, requestDefaultIn, setDelegate, setSelected, setSelectedInternal, updateDelegate, updateState
 
Methods inherited from class com.pietschy.command.delegate.DelegatingCommand
getDelegateMediator, handleExecute, nullIfEqualsThis, setDelegateMediator
 
Methods inherited from class com.pietschy.command.ActionCommand
addActionCommandListener, addInterceptor, bindToContainer, createButton, createButton, createButton, createButton, createMenuItem, createMenuItem, createMenuItem, createMenuItem, doButtonAttachments, doButtonDetachments, execute, execute, getActionAdapter, getActionAdapter, getActionEvent, getInvoker, getInvokerWindow, getModifiers, getParameter, getParameter, getParameters, installShortCut, installShortCut, postExecute, preExecute, putParameter, putParameters, removeActionCommandListener, removeInterceptor, unbindFromContainer, uninstallShortCut, uninstallShortCut
 
Methods inherited from class com.pietschy.command.Command
addContainerPropertyListener, addFace, addHoverListener, addPropertyChangeListener, addPropertyChangeListener, attach, bind, bind, bind, buttonIterator, configureAppearance, configureAppearances, configureButtonAppearances, configureButtonStates, createButton, createButton, createButton, createComponent, createMenuItem, createMenuItem, createMenuItem, detach, faceExists, findBestFace, fireHoverEnded, fireHoverStarted, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlternativeFaceContexts, getButtonFactory, getButtonIn, getCommandContainer, getContainerProperty, getDefaultFace, getDefaultFace, getFace, getFace, getId, getMenuFactory, getProperty, getProperty, getPropertyNames, getToolbarFactory, isAnonymous, isAttachedTo, isBound, isEnabled, isVisible, loadConfiguration, notifyCommandContainerHierarchyChanged, putProperties, putProperty, rebind, removeContainerPropertyListener, removeHoverListener, removePropertyChangeListener, removePropertyChangeListener, requestFocusIn, setButtonFactory, setEnabled, setMenuFactory, setToolbarFactory, setVisible, toString, unbind, validateId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.pietschy.command.ActionCommandExecutor
addPropertyChangeListener, addPropertyChangeListener, isEnabled, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.pietschy.command.Identifiable
getId
 

Constructor Detail

DelegatingToggleGroupCommand

public DelegatingToggleGroupCommand(java.lang.String id)
Method Detail

addNotify

public void addNotify(CommandGroup parent)
Description copied from class: Command
Invoked whenever a command is added to a group. Commands may belong to more than one group at any given time. This method does nothing by default, subclasses may override to perform special configuration if needed.

Overrides:
addNotify in class Command
Parameters:
parent - the parent group to which the command was added.

removeNotify

public void removeNotify(CommandGroup parent)
Description copied from class: Command
Invoked whenever a command is remvoved from a group. Commands may belong to more than one group at any given time. This method does nothing by default, subclasses may override to perform special configuration if needed.

Overrides:
removeNotify in class Command
Parameters:
parent - the parent from which the command was removed.

createMenuItem

public javax.swing.JMenuItem createMenuItem(MenuFactory factory,
                                            java.lang.String faceId)
Description copied from class: DelegatingToggleCommand
Creates a new JCheckBoxMenuItem that is bound to this command.

Overrides:
createMenuItem in class DelegatingToggleCommand
Parameters:
factory - the menu factory to use.
faceId - the face context to use.
Returns:
a new JCheckBoxMenuItem for this command.


Copyright © 2006 - 2007 Andrew Pietsch