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
Class InlineMember

    java.lang.Object
      com.pietschy.command.group.impl.AbstractGroupMember
          com.pietschy.command.group.impl.AbstractCommandMember
              com.pietschy.command.group.impl.InlineMember

All Implemented Interfaces:
  GroupMember

    public class InlineMember

extends AbstractCommandMember

A `GroupMember` implementation for adding one group as an inline member of another.

Constructor Summary
`InlineMember(CommandGroup parentGroup, CommandGroup childGroup)` Creates a new instance.

Method Summary
`void` | `acceptVisitor(GroupVisitor visitor)` Accepts a visitor to the members command or commands.
`int` | `addComponentTo(javax.swing.JComponent container, Factory factory, java.lang.String defaultFaceId, 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.
`boolean` | `isMemberFor(java.lang.String id)` Checks if this group is dependant on the specified command.
`void` | `removeNotify()` Invoked to notify that this member has been removed from its parent group.
`int` | `size()` Gets the size of this member.
`java.lang.String` | `toString()` Returns a string representation of the object.

Methods inherited from class com.pietschy.command.group.impl.AbstractCommandMember
`getCommand, getId, getParent`

Methods inherited from class com.pietschy.command.group.impl.AbstractGroupMember
`addChangeListener, fireChanged, notifyCommandContainerHierarchyChanged, removeChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### InlineMember

    public InlineMember(CommandGroup parentGroup,
                        CommandGroup childGroup)

  Creates a new instance.

  Parameters:
    `parentGroup` - the parent group.
    `childGroup` - the group to inline into the parent.

Method Detail

### addComponentTo

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

  Description copied from interface: `GroupMember`
  Invoked to add this members content to the specified component.

  Parameters:
    `container` - the component to add the component to.
    `factory` - the factory to be used, either a `ButtonFactory` or `MenuFactory`.
    `defaultFaceId` - 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

    public boolean isMemberFor(java.lang.String id)

  Checks if this group is dependant on the specified command.

  Parameters:
    `id` -
  Returns:
    `true` if this member

### addNotify

    public void addNotify()

  Description copied from interface: `GroupMember`
  Invoked to notify that this member has been added to its parent group.

  Specified by:
    `addNotify` in interface `GroupMember`
  Overrides:
    `addNotify` in class `AbstractCommandMember`

### removeNotify

    public void removeNotify()

  Description copied from interface: `GroupMember`
  Invoked to notify that this member has been removed from its parent group.

  Specified by:
    `removeNotify` in interface `GroupMember`
  Overrides:
    `removeNotify` in class `AbstractCommandMember`

### acceptVisitor

    public void acceptVisitor(GroupVisitor visitor)

  Description copied from interface: `GroupMember`
  Accepts a visitor to the members command or commands.

  Parameters:
    `visitor` - the visitor.

### size

    public int size()

  Description copied from interface: `GroupMember`
  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.

  Specified by:
    `size` in interface `GroupMember`
  Overrides:
    `size` in class `AbstractCommandMember`
  Returns:
    the number of components this member represents.

### toString

    public java.lang.String toString()

  Returns a string representation of the object. In general, the `toString` method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

  The `toString` method for class `Object` returns a string consisting of the name of the class of which the object is an instance, the at-sign character ``@`', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

  >      getClass().getName() + '@' + Integer.toHexString(hashCode())

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of the object.

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