ButtonModel The default implementation of a Button component's data model.
public function isPressed():BooleanIndicates 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():BooleanIndicates if button has been released. This is some like java Swing's pressed when released inside.
public function isSelected():BooleanIndicates 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():BooleanIndicates 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():BooleanIndicates that the mouse is over the button.
true if the mouse is over the button
public function setEnabled(b:Boolean):VoidEnables or disables the button.
b | true to enable the button |
setEnabled() in org.aswing.ButtonModel
public function setSelected(b:Boolean):VoidSelects or deselects the button.
b | true selects the button, false deselects the button |
public function setPressed(b:Boolean):VoidSets the button to pressed or unpressed.
b | true to set the button to "pressed" |
setPressed() in org.aswing.ButtonModel
public function setRollOver(b:Boolean):VoidSets or clears the button's rollover state
b | true to turn on rollover |
setRollOver() in org.aswing.ButtonModel
public function setGroup(group:ButtonGroup):VoidIdentifies 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():ButtonGroupReturns 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):ObjectDescription 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):ObjectDescription 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}