|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.UIItem
The class UIItem represents a basic user interface item. Such an item consists of a state, text and an identifier (id).
| Field Summary | |
static int |
DISABLED
Disabled state constant. |
static int |
HIDDEN
Hidden state constant |
protected java.lang.String |
ID
The field to store Items ID. |
protected int |
state
the field to store the current state. |
java.lang.String |
text
Some text for this Item. |
| Constructor Summary | |
UIItem()
Default constructor for a UIItem. |
|
UIItem(java.lang.String ID,
int state,
java.lang.String text)
Creates a new UIItem with the given ID
and text. |
|
UIItem(java.lang.String ID,
java.lang.String text)
Creates a new UIItem with the given ID
and text. |
|
| Method Summary | |
boolean |
disabled()
Determines whether this items state is DISABLED. |
boolean |
enabled()
Determines whether this items state is DISABLED. |
boolean |
equals(java.lang.Object ID)
|
boolean |
equals(UIItem other)
Compares this item id with the id of the given item. |
java.lang.String |
getID()
Returns this item's identifier. |
int |
getState()
Returns the current state of this item. |
boolean |
hidden()
Checks if this item state is HIDDEN. |
void |
set(int state,
java.lang.String text)
Sets the state and text for this item. |
void |
set(UIItem other)
Copies the state and text values from the passed UIItem. |
java.lang.String |
toString()
Returns a formatted String representing this objects id, state and text. |
boolean |
visible()
Checks if this item state is not HIDDEN. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DISABLED
public static final int HIDDEN
public java.lang.String text
protected int state
protected java.lang.String ID
| Constructor Detail |
public UIItem()
-1, state 0 and a zero-length text.
public UIItem(java.lang.String ID,
java.lang.String text)
UIItem with the given ID
and text.
ID - the id to use.text - the textual resource to bind the ID too.
public UIItem(java.lang.String ID,
int state,
java.lang.String text)
UIItem with the given ID
and text.
ID - the id to use.state - the state of the item.text - the textual resource to bind the ID too.DISABLED,
HIDDEN| Method Detail |
public java.lang.String getID()
public int getState()
DISABLED,
HIDDENpublic boolean disabled()
DISABLED.
true if this item is disabled,
otherwise false.DISABLEDpublic boolean enabled()
DISABLED.
false if this item is disabled,
otherwise false.DISABLEDpublic boolean hidden()
HIDDEN.
true if this item is hidden.HIDDEN
public void set(int state,
java.lang.String text)
state - the state which should be represented by this item.text - the text for this item.public void set(UIItem other)
other - The item from which state and text are copied.public boolean equals(UIItem other)
other - the item to compare with.
other items fields.public boolean equals(java.lang.Object ID)
public java.lang.String toString()
id [state=X, text= Abc]
public boolean visible()
HIDDEN.
true if this item is visible.HIDDEN
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||