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.group.impl
Interface GroupMember

All Known Implementing Classes:
  AbstractCommandMember, AbstractGroupMember, AbstractNonCommandMember, DebugDynamicMember, DynamicMember, ExpansionPointMember, GlueMember, InlineMember, SeparatorMember, StaticMember

    public interface GroupMember

GroupMembers are responsible for managing the children of a `CommandGroup`. Members provide a layer of abstraction that allows for the lazy addition of children to a group as well as providing customized control over how children are rendered within the groups container, for example `InlineMember`s are used to manage inline groups.

Version:
  $Revision: 1.11 $
Author:
  andrewp

Method Summary
`void` | `acceptVisitor(GroupVisitor visitor)` Accepts a visitor to the members command or commands.
`void` | `addChangeListener(javax.swing.event.ChangeListener changeListener)` Adds a change listener to the member.
`int` | `addComponentTo(javax.swing.JComponent parent, Factory factory, java.lang.String faceContext, java.util.List<java.awt.Component> previousComponents, int buttonIndex)` Invoked to add this members content to the specified component.
`void` | `addNotify()` Invoked to notify that this member has been added to its parent group.
`java.lang.Object` | `getId()` Gets this members id.
`boolean` | `isMemberFor(java.lang.String id)` Checks if this member represents the command with the specified id.
`void` | `notifyCommandContainerHierarchyChanged()` Invoked to notify the member that the parent groups container hierarchy has changed.
`void` | `removeChangeListener(javax.swing.event.ChangeListener changeListener)` Removes a change listener from the member.
`void` | `removeNotify()` Invoked to notify that this member has been removed from its parent group.
`int` | `size()` Gets the size of this member.

Method Detail

### getId

    java.lang.Object getId()

  Gets this members id. This is typcially the id of the command the member represents.

  Returns:
    this members id.

### addComponentTo

    int addComponentTo(javax.swing.JComponent parent,
                       Factory factory,
                       java.lang.String faceContext,
                       java.util.List<java.awt.Component> previousComponents,
                       int buttonIndex)

  Invoked to add this members content to the specified component.

  Parameters:
    `parent` - the component to add the component to.
    `factory` - the factory to be used, either a `ButtonFactory` or `MenuFactory`.
    `faceContext` - the context to use when adding the component.
    `previousComponents` - the list of previsous components built by the parent. The member should reuse and components in preference to creating new ones.
    `buttonIndex` - the index that of the member in the parent group.
  Returns:
    the number of components added by this member.

### isMemberFor

    boolean isMemberFor(java.lang.String id)

  Checks if this member represents the command with the specified id.

  Parameters:
    `id` - the command id.
  Returns:
    `true` if this member represents the specified command, `false` otherwise.

### notifyCommandContainerHierarchyChanged

    void notifyCommandContainerHierarchyChanged()

  Invoked to notify the member that the parent groups container hierarchy has changed.

### addNotify

    void addNotify()

  Invoked to notify that this member has been added to its parent group.

### removeNotify

    void removeNotify()

  Invoked to notify that this member has been removed from its parent group.

### acceptVisitor

    void acceptVisitor(GroupVisitor visitor)

  Accepts a visitor to the members command or commands.

  Parameters:
    `visitor` - the visitor.

### size

    int size()

  Gets the size of this member. This should return the number of components that will be added by the next call to `#addComponentTo(JComponent, Factory, String, List, int)`.

  This method should only include real members, i.e. not dynamic members that haven't been resolved.

  Returns:
    the number of components this member represents.

### addChangeListener

    void addChangeListener(javax.swing.event.ChangeListener changeListener)

  Adds a change listener to the member. This listener will be notified when ever the members content changes and the parent should be rebuilt.

  Parameters:
    `changeListener` - the change listener to add.

### removeChangeListener

    void removeChangeListener(javax.swing.event.ChangeListener changeListener)

  Removes a change listener from the member.

  Parameters:
    `changeListener` - the listener to remove.

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