Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.toggle
Class ToggleGroup

    java.lang.Object
      com.pietschy.command.Command
          com.pietschy.command.group.CommandGroup
              com.pietschy.command.toggle.ToggleGroup

All Implemented Interfaces:
  Bindable, Identifiable, ToggleContainer

    public class ToggleGroup

extends CommandGroup
implements ToggleContainer

A CommandGroup for `ToggleCommand` instances. ToggleGroups support exclusive selection of the commands they contain.

Field Summary

Fields inherited from class com.pietschy.command.Command
`internalLog, PROPERTY_ENABLED, PROPERTY_VISIBLE`

Constructor Summary
`ToggleGroup()` Creates a new anonymous command group with the specified id.
`ToggleGroup(java.lang.String groupId)` Creates a new command groups with the specified id.

Method Summary
`protected ToggleGroupController` | `getController()` Gets the `ToggleGroupController` managing this group.
`boolean` | `isAllowableMember(Command prospectiveMember)` Ensures that only `ToggleCommand` instances are added to this group.
`boolean` | `isEmptySelectionAllowed()` Checks if this group allows the last selected command to be deselected.
`boolean` | `isExclusive()` Checks if this group is in exclusive mode.
`void` | `setEmptySelectionAllowed(boolean emptySelectionAllowed)` Configures if this group allows the last selected command to be deselected.
`void` | `setExclusive(boolean exclusive)` Configures the exclusive mode of this group.

Methods inherited from class com.pietschy.command.group.CommandGroup
`addGroupListener, bindToContainer, createButton, createButton, createMemberManager, createMenuBar, createMenuBar, createMenuBar, createMenuBar, createMenuItem, createMenuItem, createPopupMenu, createPopupMenu, createPopupMenu, createToolBar, createToolBar, createToolBar, createToolBar, getBuilder, getExpansionPointBuilder, getMemberCount, getMemberListSpec, getMemberManager, getPopupContext, memberIterator, rebuildMembersFromSpec, removeGroupListener, setMemberListSpec, unbindFromContainer, visit, visitMembers`

Methods inherited from class com.pietschy.command.Command
`addContainerPropertyListener, addFace, addHoverListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, attach, bind, bind, bind, buttonIterator, configureAppearance, configureAppearances, configureButtonAppearances, configureButtonStates, configureButtonStates, createButton, createButton, createButton, createComponent, createMenuItem, createMenuItem, createMenuItem, detach, doButtonAttachments, doButtonDetachments, 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, removeNotify, 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`

Constructor Detail

### ToggleGroup

    public ToggleGroup()

  Creates a new anonymous command group with the specified id.

### ToggleGroup

    public ToggleGroup(java.lang.String groupId)

  Creates a new command groups with the specified id.

  Parameters:
    `groupId` - this groups unique id.

Method Detail

### getController

    protected ToggleGroupController getController()

  Gets the `ToggleGroupController` managing this group.

  Returns:
    this groups `ToggleGroupController`.

### isAllowableMember

    public boolean isAllowableMember(Command prospectiveMember)

  Ensures that only `ToggleCommand` instances are added to this group.

  Overrides:
    `isAllowableMember` in class `CommandGroup`
  Parameters:
    `prospectiveMember` - the `Command` being added.
  Returns:
    `true` if the prospective member is an instance of `ToggleCommand`, `false` otherwise.
  See Also:
    `isAllowableMember(com.pietschy.command.Command)`

### setEmptySelectionAllowed

    public void setEmptySelectionAllowed(boolean emptySelectionAllowed)

  Configures if this group allows the last selected command to be deselected.

  Parameters:
    `emptySelectionAllowed` - `true` to allow the last selected command to be deslected, `false` to ensure at least one command is always selected.

### isEmptySelectionAllowed

    public boolean isEmptySelectionAllowed()

  Checks if this group allows the last selected command to be deselected.

  Returns:
    `true` if the last selected command can be deslected, `false` if at least one command must always be selected.

### isExclusive

    public boolean isExclusive()

  Checks if this group is in exclusive mode.

  Returns:
    `true` if the group is in exclusive mode, `false` otherwise.

### setExclusive

    public void setExclusive(boolean exclusive)

  Configures the exclusive mode of this group.

  Parameters:
    `exclusive` - `true` to make the group exclusive, `false` to allow multiple members to be simultaneously selected.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch