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
Interface ExpansionPointBuilder

All Known Implementing Classes:
  AbstractExpansionPointBuilder

    public interface ExpansionPointBuilder

Interface for managing the members of an expasion point.

Method Summary
`void` | `add(ActionCommand command)` Adds the specified command to the expansion point.
`void` | `add(CommandGroup group)` Adds the specified group to the expansion point.
`void` | `addEmbedded(CommandGroup group, java.util.Comparator<CommandGroup> comparator)` Adds the specified group as an embedded member of the parent group.
`void` | `addEmbedded(CommandGroup group, java.lang.String context)` Adds the specified group as an embedded member of the parent group.
`void` | `addInline(CommandGroup group)` Adds the specified group as an inline member of the expansion point.
`void` | `applyChanges()` Applies the current builder state to the group and discards the builder.
`void` | `clear()` Clears the expansion point.
`void` | `discard()` Discards the builder without updating the expansion point.
`void` | `remove(ActionCommand command)` Removes the specified command from the expansion point.
`void` | `remove(CommandGroup group)` Removes the specified group from the expansion point.

Method Detail

### add

    void add(ActionCommand command)

  Adds the specified command to the expansion point. The command can be anonymous and does not need to be bound.

  Parameters:
    `command` - the command to add.

### add

    void add(CommandGroup group)

  Adds the specified group to the expansion point. The group can be anonymous and does not need to be bound.

  Parameters:
    `group` - the group to add.

### addInline

    void addInline(CommandGroup group)

  Adds the specified group as an inline member of the expansion point. Inline members have thier contents embedded directly in the expansion point instead of as a sub menu. The added group can be anonymous and does not need to be bound.

  The group will use it's current binding to locate the actual group instance.

  Parameters:
    `group` - the group to add.

### addEmbedded

    void addEmbedded(CommandGroup group,
                     java.lang.String context)

  Adds the specified group as an embedded member of the parent group. Before adding to the expansion point the parents existing members are searched to find a match with the specified group. If found, the new member is added inline to the expasion point of the matching member. Groups are deemed to match if they have the same face text for the specified context. If no match is found, the group is added to the expansion point as per `add(CommandGroup)`.

  Parameters:
    `group` - the group to be embedded.
  See Also:
    `#addEmbedded(CommandGroup, Comparator)`

### addEmbedded

    void addEmbedded(CommandGroup group,
                     java.util.Comparator<CommandGroup> comparator)

  Adds the specified group as an embedded member of the parent group. Before adding to the expansion point the parents existing members are searched to find a match with the specified group. If found, the new member is added inline to the expasion point of the matching member. The specified comparator is used to determine a match. If no match is found, the group is added to the expansion point as per `add(CommandGroup)`.

  Parameters:
    `group` - the group to be embedded.
  See Also:
    `#addEmbedded(CommandGroup, Comparator)`

### remove

    void remove(ActionCommand command)

  Removes the specified command from the expansion point.

  Parameters:
    `command` - the command to remove.

### remove

    void remove(CommandGroup group)

  Removes the specified group from the expansion point.

  Parameters:
    `group` - the group to remove.

### clear

    void clear()

  Clears the expansion point.

### applyChanges

    void applyChanges()

  Applies the current builder state to the group and discards the builder. Further changes to the expansion point will require a new builder instance.

### discard

    void discard()

  Discards the builder without updating the expansion point. Any future changes to the expansion point will require a new builder instance.

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