|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--waba.ui.Control
|
+--extra.ui.Pushbutton
This is a standard palm pushbutton.
| Constructor Summary | |
Pushbutton(String name)
Constructs a new unconnected, unselected push button. |
|
Pushbutton(String name,
boolean state)
Construct a new unconnected push button with the given selection status. |
|
Pushbutton(String name,
boolean state,
Pushbutton connection)
Construct a new push button with the given selection status in the same group as the given pushbutton. |
|
Pushbutton(String name,
Pushbutton connection)
Constructs a new unselected push button in the same group as the given pushbutton. |
|
| Method Summary | |
void |
connect(Pushbutton pb)
Connects this Pushbutton with a group. |
static Pushbutton[] |
createGroup(String[] names,
int selected)
|
void |
disconnect()
Removes this pushbutton from it's current group. |
int |
getPreferredHeight(FontMetrics fm)
|
int |
getPreferredWidth(FontMetrics fm)
|
Pushbutton |
getSelected()
Gets the pushbutton that is selected in the current group |
String |
getText()
Returns the text of this Button |
boolean |
isSelected()
Is this pushbutton selected? |
void |
onEvent(Event event)
Process pen and key events to this component |
void |
onPaint(Graphics g)
Paints the push button to the screen |
void |
setSelected(boolean b)
Sets whether the push button is pressed down or not |
| Methods inherited from class waba.ui.Control |
addTimer, contains, createGraphics, getFontMetrics, getNext, getParent, getRect, postEvent, removeTimer, repaint, setRect |
| Methods inherited from class java.lang.Object |
equals, hashCode, toString |
| Constructor Detail |
public Pushbutton(String name)
name - the text to go on the button
public Pushbutton(String name,
Pushbutton connection)
name - the text to go on the buttonconnection - the pushbutton to connect to
public Pushbutton(String name,
boolean state)
name - the text to go on the buttonstate - the state of the button
public Pushbutton(String name,
boolean state,
Pushbutton connection)
name - the text to go on the buttonstate - the state of the buttonconnection - the pushbutton to connect to| Method Detail |
public static Pushbutton[] createGroup(String[] names,
int selected)
public void connect(Pushbutton pb)
pb - the group to connect topublic void disconnect()
public Pushbutton getSelected()
public boolean isSelected()
public void setSelected(boolean b)
b - true if selected, false otherwisepublic String getText()
public int getPreferredWidth(FontMetrics fm)
getPreferredWidth in interface PreferredSizepublic int getPreferredHeight(FontMetrics fm)
getPreferredHeight in interface PreferredSizepublic void onPaint(Graphics g)
onPaint in class Controlwaba.ui.Controlg - the graphics object for drawingGraphicspublic void onEvent(Event event)
onEvent in class Controlevent - the event to process
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||