Class Button

A generic button component.

Button()

Creates a new push button. The value of the push button is allways false and they are immediate by default.

Button(String)

Parameters

caption

Button caption

Creates a new push button. The value of the push button is allways false and they are immediate by default.

Button(String, boolean)

Parameters

state

Initial state of the switch-button.

Creates new switch button with initial value.

Button(String, Button.ClickListener)

Parameters

caption

Button caption

listener

Button click listener

Creates a new push button with click listener.

Button(String, Object, String)

Parameters

caption

Button caption

target

Object having the method for listening button clicks

methodName

The name of the method in target object, that receives button click events.

Creates a new push button with a method listening button clicks. The method must have either no parameters, or only one parameter of Button.ClickEvent type.

Button(String, Property)

Parameters

state

Initial state of the switch-button.

Creates new switch button that is connected to a boolean property.

addListener(Button.ClickListener)

Parameters

listener

Listener to be added.

Add button click listener

changeVariables(Object, Map)

Parameters

event

Variable change event.

Invoked when the value of a variable has changed. Button listeners are notified if the button is clicked.

getTag()

Parameters

return

Component UIDL tag as string.

Get component UIDL tag.

getType()

See Also
getType()

The type of the button as a property.

isSwitchMode()

Parameters

return

boolean

Returns the switchMode.

paintContent(PaintTarget)

Parameters

event

PaintEvent.

Exceptions

IOException

Passed from the UIDLStream.

PaintException

The paint operation failed.

Paint the content of this component.

removeListener(Button.ClickListener)

Parameters

listener

Listener to be removed.

Remove button click listener

setImmediate(boolean)

Set immediate mode.

setSwitchMode(boolean)

Parameters

switchMode

The switchMode to set

Sets the switchMode.