|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.group.impl.AbstractGroupMember
com.pietschy.command.group.impl.ExpansionPointMember
public class ExpansionPointMember
A GroupMember implementation for handling a groups expansion point.
| Field Summary | |
|---|---|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
protected |
ExpansionPointMember(java.lang.String name)
Creates a new instance. |
| Method Summary | |
|---|---|
void |
acceptVisitor(GroupVisitor visitor)
Visits all this expansion points commands and groups. |
void |
acceptVisitor(Visitor<GroupMember> visitor)
Visits the expansion point member objects (i.e. |
void |
add(GroupMember member)
Adds a member to the expansion point. |
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. |
void |
clear()
Removes all members from the expansion point. |
void |
configureSeparators(SeparatorMode mode)
|
java.lang.Object |
getId()
Expasion points don't represent a command to they return themselves. |
GroupMember |
getMemberFor(java.lang.String id)
Gets the member for the specified command id. |
java.util.Collection<GroupMember> |
getMembers()
Gets the expansion point members. |
java.lang.String |
getName()
Gets the name of the expansion point. |
boolean |
isEmpty()
Checks if the expansion point is empty. |
boolean |
isMemberFor(java.lang.String id)
Checks if this group member represents the specified command. |
boolean |
isSeparatorAfter()
Returns true if the expasion point should include a separator after any
of it's members. |
boolean |
isSeparatorBefore()
Returns true if the expasion point should include a separator before any
of it's members. |
boolean |
isSeparatorBetween()
Returns true if the expasion point should include a separator between each
of it's members. |
java.util.Iterator<GroupMember> |
iterator()
Returns an iterator over the expansion points members. |
void |
remove(GroupMember member)
Removes a member from the expansion point. |
void |
removeNotify()
Invoked to notify that this member has been removed from its parent group. |
void |
setSeparatorAfter(boolean separatorAfter)
Configures the expansion point to include a separator after any of it's members. |
void |
setSeparatorBefore(boolean separatorBefore)
Configures the expansion point to include a separator before any of it's members. |
void |
setSeparatorBetween(boolean separatorBetween)
Configures the expansion point to include a separator between each of it's members. |
int |
size()
Returns the sum of all the expansion point members. |
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String name
| Constructor Detail |
|---|
protected ExpansionPointMember(java.lang.String name)
name - the expansion points name.| Method Detail |
|---|
public java.lang.Object getId()
public void configureSeparators(SeparatorMode mode)
public void add(GroupMember member)
member - the member to add.public void remove(GroupMember member)
member - the member to remove.public void clear()
public java.util.Collection<GroupMember> getMembers()
public java.util.Iterator<GroupMember> iterator()
public void acceptVisitor(Visitor<GroupMember> visitor)
visitor - the visitor to accept.public void acceptVisitor(GroupVisitor visitor)
visitor - the visitor.public int size()
public GroupMember getMemberFor(java.lang.String id)
id - the command id.
null if there isn't any such member.public boolean isEmpty()
true if the expansion point has no members, false otherwise.public java.lang.String getName()
public boolean isSeparatorBefore()
true if the expasion point should include a separator before any
of it's members.
true if the expasion point should include a separator before any
of it's members, false otherwise.public void setSeparatorBefore(boolean separatorBefore)
separatorBefore - true to insert a separator before, false otherwise.public boolean isSeparatorAfter()
true if the expasion point should include a separator after any
of it's members.
true if the expasion point should include a separator after any
of it's members, false otherwise.public void setSeparatorAfter(boolean separatorAfter)
separatorAfter - true to insert a separator after, false otherwise.public boolean isSeparatorBetween()
true if the expasion point should include a separator between each
of it's members.
true if the expasion point should include a separator between each
of it's members, false otherwise.public void setSeparatorBetween(boolean separatorBetween)
separatorBetween - true to insert a separator between each member, false otherwise.public boolean isMemberFor(java.lang.String id)
false.
id - the command id.
false.
public int addComponentTo(javax.swing.JComponent parent,
Factory factory,
java.lang.String faceContext,
java.util.List<java.awt.Component> previousComponents,
int buttonIndex)
GroupMember
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.
public void addNotify()
GroupMember
public void removeNotify()
GroupMember
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||