|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.face.RenderContext
public class RenderContext
Contains information the commands and groups that created specific buttons.
This information is then used by FaceRenderer to configure the button.
| Method Summary | |
|---|---|
static void |
bind(javax.swing.JComponent component,
Command parent,
java.lang.String faceName)
Binds this context to the specified component. |
static RenderContext |
get(java.awt.Component component)
Gets the rendering context for the specified component, or null if it doesn't have one. |
Face |
getBestFace()
Gets the best face to use for this render context. |
Command |
getCommand()
Gets the command that created the context. |
java.lang.String |
getFaceContext()
Gets the face context. |
CommandGroup |
getGroup()
Gets the group associated with this context. |
boolean |
isFirstMember()
Checks if this context is for the first member of the group. |
boolean |
isLastMember()
Checks if this context is for the last member of the group. |
void |
setGroupContext(CommandGroup group,
int groupIndex)
Configures the group information of the context. |
static void |
unbind(javax.swing.JComponent component,
Command command)
Removes the context of the specified command from the specified component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static RenderContext get(java.awt.Component component)
JComponent support render contexts.
component - the component with the renderering context.
public static void bind(javax.swing.JComponent component,
Command parent,
java.lang.String faceName)
component - the component to bind to.get(Component)
public static void unbind(javax.swing.JComponent component,
Command command)
component - the component.command - the command.
java.lang.IllegalStateException - if the command is not attached to the component.
public void setGroupContext(CommandGroup group,
int groupIndex)
group - the to which the button belongs.groupIndex - the index of the button within the group.public Command getCommand()
public java.lang.String getFaceContext()
public Face getBestFace()
throws FaceNotFoundException
FaceNotFoundExceptionpublic CommandGroup getGroup()
null if
this is a stand alone button.public boolean isFirstMember()
true if this context is for the first member of the
group, false otherwise.public boolean isLastMember()
true if this context is for the last member of the
group, false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||