|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.ascentphase.suit.Widget
|
+--org.ascentphase.suit.PushButton
A PushButton is a button that behaves like a MutexOption.
| Field Summary | |
protected boolean |
active
|
protected int |
btnHeight
|
protected int |
btnWidth
|
protected org.ascentphase.suit.MutexOptionGroup |
group
|
protected java.lang.String |
label
|
| Fields inherited from class org.ascentphase.suit.Widget |
cmdToThrow |
| Constructor Summary | |
PushButton(java.lang.String text,
int width,
int height,
org.ascentphase.suit.MutexOptionGroup mog)
Initialize a PushButton with the given text and belongs to the given MutexOptionGroup. |
|
PushButton(java.lang.String text,
org.ascentphase.suit.MutexOptionGroup mog)
Initialize a PushButton with the given text and belongs to the given MutexOptionGroup. |
|
| Method Summary | |
boolean |
contains(int x,
int y)
Returns whether the given coordinate lies within this widget's area of interest. |
boolean |
getActive()
Returns the state of this MutexOption. |
void |
paint(Graphics g)
Draws the widget. |
Command |
pointerReleased(int x,
int y)
Method called by the widget's containing Panel when a pointer is released over the widget area. |
void |
setActive(boolean state)
Notifies whether the MutexOption is currently active or not in its group. |
| Methods inherited from class org.ascentphase.suit.Widget |
getCommand, keyPressed, keyReleased, pointerDragged, pointerPressed, setCommand |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String label
protected int btnWidth
protected int btnHeight
protected boolean active
protected org.ascentphase.suit.MutexOptionGroup group
| Constructor Detail |
public PushButton(java.lang.String text,
org.ascentphase.suit.MutexOptionGroup mog)
text - the text to display on the PushButton.mog - the MutexOptionGroup the PushButton belongs to.
public PushButton(java.lang.String text,
int width,
int height,
org.ascentphase.suit.MutexOptionGroup mog)
text - the text to display on the PushButton.width - the width in pixels.height - the height in pixels.mog - the MutexOptionGroup the PushButton belongs to.| Method Detail |
public void paint(Graphics g)
paint in class Widgetg - the Graphics object to draw with.
public boolean contains(int x,
int y)
Widget
contains in class Widgetx - the x coordinate.y - the y coordinate.
public Command pointerReleased(int x,
int y)
Widget
pointerReleased in class Widgetx - the x-coordinate relative to the widget's origin.y - the y-coordinate relative to the widget's origin.
public void setActive(boolean state)
MutexOption
setActive in interface MutexOptionstate - the active state of the MutexOption.public boolean getActive()
MutexOption
getActive in interface MutexOption
|
Ascent Phase Corp. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||