|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjcontrol.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-2005 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, notifyAll, wait |
| Constructor Detail |
|---|
public 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 button
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 corner| Method Detail |
|---|
public boolean onKeyEvent(KeyEvent e)
onKeyEvent in class Componente - the KeyEvent.
Container.public void paint()
paint in class Componentpublic void press()
public void setActionListener(ActionListener listener)
listener - The new ActionListener or null.public void setLabel(Object label)
label - the new label or null if the button has no m_label.public void validate()
validate in class Component
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||