org.pietschy.command
Class GroupContainerManager
java.lang.Object
org.pietschy.command.GroupContainerManager
public abstract class GroupContainerManager
extends java.lang.Object
A helper class that GroupCommands use to populate and manages its popup/command
Container
s.
Typcially this class is repsonsible for rebuilding it's container when the GroupCommands members change.
GroupCommands can provide their own implementation by providing a custom implementation of
GroupMemberFactory
.
void | configure(JComponent container, ButtonFactory factory, String faceId) - Configures this instance to manage the specified button container using the factory and faceid provided.
|
protected String | getFaceId() - The face id to use when creating new buttons or menus.
|
protected Object | getFactory() - The factory to use when createing new buttons or menus.
|
protected JComponent | getItemContainer() - Gets the container this instance is managing.
|
void | initialise(JComponent container, MenuFactory factory, String faceId) - Configures this instance to manage the specified menu container using the factory and faceid provided.
|
abstract void | rebuildPopupUsing(Collection members) - Called to trigger the manager to rebuild its container using the specified collection of
GroupMember s.
|
String | toString()
|
GroupContainerManager
public GroupContainerManager()
configure
public void configure(JComponent container,
ButtonFactory factory,
String faceId)
Configures this instance to manage the specified button container using the factory and faceid provided.
container
- the container to manage.factory
- the factory to use when creating buttons.faceId
- the face id to use.
getFaceId
protected String getFaceId()
The face id to use when creating new buttons or menus.
- the face id to use when creating new buttons or menus.
getFactory
protected Object getFactory()
- the factory to use when createing new buttons or menus.
getItemContainer
protected JComponent getItemContainer()
Gets the container this instance is managing.
- the container this instance is managing.
initialise
public void initialise(JComponent container,
MenuFactory factory,
String faceId)
Configures this instance to manage the specified menu container using the factory and faceid provided.
container
- the container to manage.factory
- the factory to use when creating menu items.faceId
- the face id to use.
rebuildPopupUsing
public abstract void rebuildPopupUsing(Collection members)
Called to trigger the manager to rebuild its container using the specified collection of
GroupMember
s.
members
- the current members of the group.
toString
public String toString()