ButtonModel
The default implementation of a Button component's data model.
public function isPressed():Boolean
Indicates that the button has been pressed the and not be released yet.
This is not same as Java Swing's, this is some like Java Swing's Armed
public function isReleased():Boolean
Indicates if button has been released. This is some like java Swing's pressed when released inside.
public function isSelected():Boolean
Indicates if the button has been selected. Only needed for certain types of buttons - such as RadioButton or Checkbox.
true if the button is selected
public function isEnabled():Boolean
Indicates whether the button can be selected or pressed by an input device (such as a mouse pointer). (Checkbox-buttons are selected, regular buttons are "pressed".)
true if the button is enabled, and therefore selectable (or pressable)
public function isRollOver():Boolean
Indicates that the mouse is over the button.
true if the mouse is over the button
public function setEnabled(b:Boolean):Void
Enables or disables the button.
b | true to enable the button |
setEnabled() in org.aswing.ButtonModel
public function setSelected(b:Boolean):Void
Selects or deselects the button.
b | true selects the button, false deselects the button |
public function setPressed(b:Boolean):Void
Sets the button to pressed or unpressed.
b | true to set the button to "pressed" |
setPressed() in org.aswing.ButtonModel
public function setRollOver(b:Boolean):Void
Sets or clears the button's rollover state
b | true to turn on rollover |
setRollOver() in org.aswing.ButtonModel
public function setGroup(group:ButtonGroup):Void
Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.
group | the ButtonGroup this button belongs to
|
public function getGroup():ButtonGroup
Returns the group that this button belongs to. Normally used with radio buttons, which are mutually exclusive within their group.
a ButtonGroup
that this button belongs to
public function addChangeListener(func:Function, obj:Object):Object
Description copied from ButtonModel
Add a listener to listen the Model's change event.
When the button's state changed, the state is all about:
public function addSelectionListener(func:Function, obj:Object):Object
Description copied from ButtonModel
Add a listener to listen the Model's selection change event.
When the button's selection changed, fired when diselected or selected.
onSelectionChanged Event{source:ButtonModel}