java.lang.Object | ||||||
↳ | com.google.gwt.user.client.ui.UIObject | |||||
↳ | com.google.gwt.user.client.ui.Widget | |||||
↳ | com.google.gwt.user.client.ui.FocusWidget | |||||
↳ | com.google.gwt.user.client.ui.ButtonBase | |||||
↳ | com.google.gwt.user.client.ui.CustomButton | |||||
↳ | com.google.gwt.user.client.ui.ToggleButton |
A ToggleButton
is a stylish stateful button which allows the
user to toggle between up
and down
states.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.google.gwt.user.client.ui.UIObject
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructor for
ToggleButton . | |||||||||||
Constructor for
ToggleButton . | |||||||||||
Constructor for
ToggleButton . | |||||||||||
This constructor is deprecated.
Use
ToggleButton(Image, ClickHandler) instead
| |||||||||||
Constructor for
ToggleButton . | |||||||||||
Constructor for
ToggleButton . | |||||||||||
This constructor is deprecated.
Use
ToggleButton(Image, Image, ClickHandler) instead
| |||||||||||
Constructor for
ToggleButton . | |||||||||||
Constructor for
ToggleButton . | |||||||||||
This constructor is deprecated.
Use
ToggleButton(String, ClickHandler) instead
| |||||||||||
Constructor for
ToggleButton . | |||||||||||
Constructor for
ToggleButton . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the Editor encapsulated by the view object.
| |||||||||||
Determines whether this button is currently down.
| |||||||||||
Is this button down?
| |||||||||||
Sets whether this button is down. Does not fire
ValueChangeEvent . | |||||||||||
Sets whether this button is down, firing
ValueChangeEvent if
appropriate. | |||||||||||
Sets whether this button is down.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when the user finishes clicking on this button.
|
Constructor for ToggleButton
.
Constructor for ToggleButton
. The supplied image is used to
construct the default face.
upImage | image for the default face of the button |
---|
Constructor for ToggleButton
. The supplied image is used to
construct the default face of the button.
upImage | image for the default (up) face of the button |
---|---|
handler | the click handler |
This constructor is deprecated.
Use ToggleButton(Image, ClickHandler)
instead
Constructor for ToggleButton
. The supplied image is used to
construct the default face of the button.
upImage | image for the default (up) face of the button |
---|---|
listener | the click listener |
Constructor for ToggleButton
.
upImage | image for the default(up) face of the button |
---|---|
downImage | image for the down face of the button |
Constructor for ToggleButton
.
upImage | image for the default(up) face of the button |
---|---|
downImage | image for the down face of the button |
handler | the click handler |
This constructor is deprecated.
Use ToggleButton(Image, Image, ClickHandler)
instead
Constructor for ToggleButton
.
upImage | image for the default(up) face of the button |
---|---|
downImage | image for the down face of the button |
listener | clickListener |
Constructor for ToggleButton
. The supplied text is used to
construct the default face of the button.
upText | the text for the default (up) face of the button. |
---|
Constructor for ToggleButton
. The supplied text is used to
construct the default face of the button.
upText | the text for the default (up) face of the button |
---|---|
handler | the click handler |
This constructor is deprecated.
Use ToggleButton(String, ClickHandler)
instead
Constructor for ToggleButton
. The supplied text is used to
construct the default face of the button.
upText | the text for the default (up) face of the button |
---|---|
listener | the click listener |
Constructor for ToggleButton
.
upText | the text for the default (up) face of the button |
---|---|
downText | the text for down face of the button |
Constructor for ToggleButton
.
upText | the text for the default (up) face of the button |
---|---|
downText | the text for down face of the button |
handler | the click handler |
Returns the Editor encapsulated by the view object.
Editor
of type E
Determines whether this button is currently down.
true
if the button is pressed, false otherwise. Will
not return null
Is this button down?
true
if the button is down
Sets whether this button is down. Does not fire ValueChangeEvent
. (If you want the
event to fire, use setValue(Boolean, boolean)
)
down | true to press the button, false
otherwise
|
---|
Sets whether this button is down, firing ValueChangeEvent
if
appropriate.
value | true to press the button, false otherwise; null value implies false |
---|---|
fireEvents | If true, and value has changed, fire a
ValueChangeEvent
|
Sets whether this button is down.
value | true to press the button, false otherwise; null value implies false |
---|
Called when the user finishes clicking on this button. The default behavior
is to fire the click event to listeners. Subclasses that override
onClickStart()
should override this method to restore the normal
widget display.