Button


Inheritance Button View Module hilo/view/Button Requires hilo/core/Hilo, hilo/core/Class, hilo/view/View, hilo/view/Drawable Source Button.js
Button class is a simple button class, contains four kinds of state: 'up', 'over', 'down', 'disabled'

Properties

Show Inherited Properties
Property Defined
disabledState:Object
The property of button 'disabled' state or collections of its drawable properties.
Button
downState:Object
The property of button 'down' state or collections of its drawable properties.
Button
enabled:Boolean
Is button enabled.
Button
overState:Object
The property of button 'over' state or collections of its drawable properties.
Button
state:String
the state name of button, could be one of Button.UP|OVER|DOWN|DISABLED, readonly!
Button
upState:Object
The property of button 'up' state or collections of its drawable properties.
Button
useHandCursor:Boolean
If true, cursor over the button will become a pointer cursor, default value is true.
Button
OVER:String
static
Button
DISABLED:String
static
Button
DOWN:String
static
Button
UP:String
static
Button

Methods

Show Inherited Methods
Method Defined
Button(properties:Object)
Constructor
Button
setEnabled(enabled:Boolean):Button
Button
setState(state:String):Button
Button

Property Detail

[Static] DISABLED:String
disabledState:Object
The property of button 'disabled' state or collections of its drawable properties.
[Static] DOWN:String
downState:Object
The property of button 'down' state or collections of its drawable properties.
enabled:Boolean
Is button enabled. default value is true, readonly!
[Static] OVER:String
overState:Object
The property of button 'over' state or collections of its drawable properties.
state:String
the state name of button, could be one of Button.UP|OVER|DOWN|DISABLED, readonly!
[Static] UP:String
upState:Object
The property of button 'up' state or collections of its drawable properties.
useHandCursor:Boolean
If true, cursor over the button will become a pointer cursor, default value is true.

Constructor

Button(properties:Object)
parameters
properties:Object — create object properties. Contains all writable properties. Also contains:
  • image - the image element that button image is in

Method Detail

setEnabled(enabled:Boolean):Button
parameters
enabled:Boolean — Show whether the button is enabled.
return
Button — Return the button itself.
setState(state:String):Button
parameters
state:String — New state of the button.
return
Button — Return the button itself.