|
|||||||||
| 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.AbstractCommandMember
com.pietschy.command.group.impl.StaticMember
public class StaticMember
The standard GroupMember implementation for commands and groups.
| Constructor Summary | |
|---|---|
StaticMember(CommandGroup parent,
Command command)
Creates a new instance that adds the specified command to the parent. |
|
| 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 faceContext,
java.util.List<java.awt.Component> previousComponents,
int buttonIndex)
Invoked to add this members content to the specified component. |
protected java.lang.String |
getCommandId()
|
boolean |
isMemberFor(java.lang.String id)
Checks if this member represents the command with the specified id. |
protected java.awt.Component |
prepareComponent(java.util.List<java.awt.Component> previous,
Factory factory,
java.lang.String faceContext)
Prepares the component to add to the parent. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class com.pietschy.command.group.impl.AbstractCommandMember |
|---|
addNotify, getCommand, getId, getParent, removeNotify, size |
| 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 |
|---|
public StaticMember(CommandGroup parent,
Command command)
parent - the parent group.command - the command to add.| Method Detail |
|---|
protected java.lang.String getCommandId()
public int addComponentTo(javax.swing.JComponent container,
Factory factory,
java.lang.String faceContext,
java.util.List<java.awt.Component> previousComponents,
int buttonIndex)
GroupMember
container - 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.
protected java.awt.Component prepareComponent(java.util.List<java.awt.Component> previous,
Factory factory,
java.lang.String faceContext)
previous - the components that were previously added.factory - the factory to create the component.faceContext - the context to use.
public boolean isMemberFor(java.lang.String id)
GroupMember
id - the command id.
true if this member represents the specified command, false otherwise.public void acceptVisitor(GroupVisitor visitor)
GroupMember
visitor - the visitor.public java.lang.String toString()
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())
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||