|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.westofj.wui.Widget
org.westofj.wui.WAbstractButton
Implements base functionality for button like objects including buttons, links and menu items.
Constructor Summary | |
protected |
WAbstractButton()
Contructs a button. |
protected |
WAbstractButton(String text)
Constructs a button labelled with the specified text. |
protected |
WAbstractButton(WDisplayable text)
Constructs a button labelled with the specified text. |
Method Summary | |
void |
addActionListener(WActionListener l)
Adds a WActionListener to the button. |
String |
getActionCommand()
Returns the action command of the button. |
WDisplayable |
getText()
Returns the button label. |
String |
getText(WRunner runner)
Returns the label of the button as a String. |
protected void |
handleParams(WRunner runner,
String[] values)
|
boolean |
hasActionListeners()
Returns true if the list has action listeners, false otherwise. |
boolean |
isEnabled()
Returns true if the button is enabled, false otherwise. |
void |
press()
Presses the button. |
WActionListener |
removeActionListener(WActionListener l)
Removes an WActionListener from the button. |
void |
setActionCommand(String actionCommand)
Sets the action command of the button. |
void |
setEnabled(boolean enabled)
Enables or disables the button. |
void |
setText(String text)
Sets the label of the button. |
void |
setText(WDisplayable text)
Sets the label of the button. |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, hasChangeListeners, removeChangeListener, render, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected WAbstractButton()
protected WAbstractButton(String text)
text
- the label of the button.protected WAbstractButton(WDisplayable text)
text
- the label of the button.Method Detail |
public void addActionListener(WActionListener l)
WActionListener
to the button. The specific listener is invoked when
an action occurs on the button.
l
- the listener to be added the the button.protected void handleParams(WRunner runner, String[] values)
handleParams
in class Widget
public void press()
public String getActionCommand()
public WDisplayable getText()
public final String getText(WRunner runner)
runner
- the runner context.
public boolean isEnabled()
public WActionListener removeActionListener(WActionListener l)
WActionListener
from the button.
l
- the WActionListener
to remove.public void setActionCommand(String actionCommand)
actionCommand
- the new action command.public void setEnabled(boolean enabled)
enabled
- true if the button is enabled, false otherwise.public void setText(String text)
text
- the label of the button.public void setText(WDisplayable text)
text
- the label of the button.public boolean hasActionListeners()
|
Copyright (c) 2003 West of J - All rights reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |