|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.group.impl.MemberManager
public class MemberManager
Manages members on behalf of CommandGroup.
| Field Summary | |
|---|---|
(package private) static java.lang.String |
_ID_
|
| Constructor Summary | |
|---|---|
MemberManager(CommandGroup parent)
Creates a new instance for the specified parent. |
|
| Method Summary | |
|---|---|
void |
acceptVisitor(GroupVisitor visitor)
Accepts the visitor to this managers members commands and groups. |
(package private) void |
acceptVisitor(Visitor<GroupMember> visitor)
Accepts the visitor to this managers members. |
(package private) void |
add(GroupMember member)
Adds the specified member to the manager. |
void |
addGroupListener(GroupListener l)
Adds a GroupListener to the group. |
(package private) void |
applyExpansionPointBuilderChanges(java.util.ArrayList<Contribution> newContributions)
Applies the changes made by the current expansion point builder. |
(package private) void |
applyGroupBuilderChanges(java.util.Collection<GroupMember> newMembers)
Applies the changes made by the current group builder. |
void |
commandAdded(CommandContainerEvent e)
CommandContainerListener implementation. |
void |
commandRemoved(CommandContainerEvent e)
CommandContainerListener implementation. |
void |
containerPropertyChanged(java.beans.PropertyChangeEvent e)
CommandContainerListener implementation. |
(package private) void |
discardGroupBuilder()
Discards the current group builder. |
(package private) void |
fireMembersChanged()
Notifies all group listeners that this managers contents has changed. |
GroupBuilder |
getBuilder()
Gets the current builder instance. |
(package private) CommandContainer |
getCommandContainer()
Returns the CommandContainer this manager is to use. |
(package private) java.util.List<Contribution> |
getContributions()
Get all the expansion point contributions of this manager. |
ExpansionPointBuilder |
getExpansionPointBuilder()
Gets the current expansion point builder. |
int |
getMemberCount()
Gets the number of realised memebers in the group. |
(package private) GroupMember |
getMemberFor(java.lang.String id)
Gets the member that represents the command with the specified id. |
(package private) java.util.Collection<GroupMember> |
getMembers()
Gets all the members of this manager. |
(package private) void |
installContributions()
Iterates over the current expansion point contributions and installs them. |
java.util.Iterator<GroupMember> |
iterator()
Returns an iterator over this managers members. |
(package private) void |
notifyParentHeirarchyChangedAndRebuild()
Notifies all members that the container hierarchy has changed, rebuilds all the group containers and notifies any listeners that our membership has changed. |
void |
parentHierarchyChanged(CommandContainerEvent e)
CommandContainerListener implementation. |
void |
populateContainer(javax.swing.JComponent container,
ButtonFactory factory,
java.lang.String context)
Populates the specified container with buttons for each group member. |
void |
populateContainer(javax.swing.JComponent container,
MenuFactory factory,
java.lang.String context)
Populates the specified container with a menu item for each group member. |
protected void |
rebuildContainersAndNotifyListeners()
Invoked whenever this groups membership changes. |
(package private) void |
remove(GroupMember member)
Removes the specified member from the manager. |
void |
removeGroupListener(GroupListener l)
Removes a GroupListener from the group. |
(package private) void |
resetDynamicMember(java.lang.String id)
Finds the DynamicMember for the specified command and resets it. |
void |
setCommandContainer(CommandContainer commandContainer)
Sets the CommandContainer this manager is to use. |
java.lang.String |
toString()
Returns a string representation of this manager. |
(package private) void |
uninstallContributions()
Iterates over the current expansion point contributions and uninstalls them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final java.lang.String _ID_
| Constructor Detail |
|---|
public MemberManager(CommandGroup parent)
parent - the parent group.| Method Detail |
|---|
CommandContainer getCommandContainer()
CommandContainer this manager is to use. May be null.
CommandContainer this manager is to use.public void setCommandContainer(CommandContainer commandContainer)
CommandContainer this manager is to use. May be null.
commandContainer - the container this manager is to use.public GroupBuilder getBuilder()
public ExpansionPointBuilder getExpansionPointBuilder()
public void populateContainer(javax.swing.JComponent container,
MenuFactory factory,
java.lang.String context)
container - the container to hold the groups members.factory - the menu factory to use.context - the face context to use.
public void populateContainer(javax.swing.JComponent container,
ButtonFactory factory,
java.lang.String context)
container - the container to hold the groups members.factory - the button factory to use.context - the face context to use.protected void rebuildContainersAndNotifyListeners()
public void commandAdded(CommandContainerEvent e)
CommandContainerListener implementation.
commandAdded in interface CommandContainerListenere - the eventpublic void commandRemoved(CommandContainerEvent e)
CommandContainerListener implementation.
commandRemoved in interface CommandContainerListenere - the eventvoid resetDynamicMember(java.lang.String id)
DynamicMember for the specified command and resets it.
id - the command that changed.public void parentHierarchyChanged(CommandContainerEvent e)
CommandContainerListener implementation.
parentHierarchyChanged in interface CommandContainerListenere - the eventpublic void containerPropertyChanged(java.beans.PropertyChangeEvent e)
CommandContainerListener implementation.
containerPropertyChanged in interface CommandContainerListenere - the eventvoid notifyParentHeirarchyChangedAndRebuild()
void add(GroupMember member)
member - the member to add.void remove(GroupMember member)
member - the member to remove.java.util.Collection<GroupMember> getMembers()
java.util.List<Contribution> getContributions()
public java.util.Iterator<GroupMember> iterator()
void acceptVisitor(Visitor<GroupMember> visitor)
visitor - the visitor.public void acceptVisitor(GroupVisitor visitor)
visitor - the visitor.public int getMemberCount()
GroupMember getMemberFor(java.lang.String id)
id - the command id.
public void addGroupListener(GroupListener l)
GroupListener to the group.
l - the listener to installFace.public void removeGroupListener(GroupListener l)
GroupListener from the group.
l - the listener to remove.void fireMembersChanged()
void applyGroupBuilderChanges(java.util.Collection<GroupMember> newMembers)
newMembers - the new member list.void discardGroupBuilder()
void applyExpansionPointBuilderChanges(java.util.ArrayList<Contribution> newContributions)
newContributions - the new contribution list.void installContributions()
void uninstallContributions()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||