|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcontrol.ui.vole.Component jcontrol.ui.vole.Button
public class Button
VOLE user interface labeled button. The application can cause some action to happen when the button is pushed.
(c) Copyright 2003-2007 DOMOLOGIC GmbH
Field Summary |
---|
Fields inherited from class jcontrol.ui.vole.Component |
---|
eventQueue, focusOwner, font, g, height, listener, parent, visible, width, x, y |
Constructor Summary | |
---|---|
Button(Object label,
int x,
int y,
int width,
int height)
Constructs a new button with text or an image. |
|
Button(String label,
int x,
int y)
Constructs a new text-labeled button. |
Method Summary | |
---|---|
boolean |
onKeyEvent(KeyEvent e)
If a KeyEvent accurs, this method is called. |
void |
paint()
Paint the button. |
void |
press()
Press the button. |
void |
setActionListener(ActionListener listener)
Add an ActionListener to the button. |
void |
setLabel(Object label)
Change the button's label |
void |
validate()
Compute this component's preferred size and assign internal values width and height. |
Methods inherited from class jcontrol.ui.vole.Component |
---|
getBounds, getParent, isVisible, onActionEvent, remove, removeFocus, requestFocus, setBounds, setFont, setGraphics, setParent, setVisible, transferFocus |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notifyAll, toString, wait |
Constructor Detail |
---|
public Button(String label, int x, int y)
text
- The text to display on the button.x
- the x-coordinate of the button's top-left cornery
- the y-coordinate of the button's top-left cornerpublic Button(Object label, int x, int y, int width, int height)
label
- the label to display on the buttonx
- the x-coordinate of the button's top-left cornery
- the y-coordinate of the button's top-left cornerwidth
- the width of the buttonheight
- the height of the buttonMethod Detail |
---|
public void setLabel(Object label)
label
- the new label or null if the button has no m_label.public void press()
public void paint()
paint
in class Component
public void validate()
validate
in class Component
public boolean onKeyEvent(KeyEvent e)
onKeyEvent
in class Component
e
- the KeyEvent.
Container
.public void setActionListener(ActionListener listener)
listener
- The new ActionListener or null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |