Class org.aswing.DefaultButtonModel

Implemented Interfaces

ButtonModel

Description

The default implementation of a Button component's data model.

Field Index

Inherited from EventDispatcher

Method Index

new DefaultButtonModel()
addChangeListener(), addSelectionListener(), getGroup(), isEnabled(), isPressed(), isReleased(), isRollOver(), isSelected(), setEnabled(), setGroup(), setPressed(), setReleased(), setRollOver(), setSelected(), toString()

Inherited from EventDispatcher

Constructor Detail

DefaultButtonModel

public function DefaultButtonModel()

Method Detail

isPressed

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

Specified By

isPressed() in org.aswing.ButtonModel

isReleased

public function isReleased():Boolean

Indicates if button has been released. This is some like java Swing's pressed when released inside.

Specified By

isReleased() in org.aswing.ButtonModel

isSelected

public function isSelected():Boolean

Indicates if the button has been selected. Only needed for certain types of buttons - such as RadioButton or Checkbox.

Return

true if the button is selected

Specified By

isSelected() in org.aswing.ButtonModel

isEnabled

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".)

Return

true if the button is enabled, and therefore selectable (or pressable)

Specified By

isEnabled() in org.aswing.ButtonModel

isRollOver

public function isRollOver():Boolean

Indicates that the mouse is over the button.

Return

true if the mouse is over the button

Specified By

isRollOver() in org.aswing.ButtonModel

setReleased

public function setReleased(b:Boolean):Void

Sets the button to released or unreleased.

Specified By

setReleased() in org.aswing.ButtonModel

setEnabled

public function setEnabled(b:Boolean):Void

Enables or disables the button.

Parameters

btrue to enable the button

Specified By

setEnabled() in org.aswing.ButtonModel

See Also

setSelected

public function setSelected(b:Boolean):Void

Selects or deselects the button.

Parameters

btrue selects the button, false deselects the button

Specified By

setSelected() in org.aswing.ButtonModel

setPressed

public function setPressed(b:Boolean):Void

Sets the button to pressed or unpressed.

Parameters

btrue to set the button to "pressed"

Specified By

setPressed() in org.aswing.ButtonModel

See Also

setRollOver

public function setRollOver(b:Boolean):Void

Sets or clears the button's rollover state

Parameters

btrue to turn on rollover

Specified By

setRollOver() in org.aswing.ButtonModel

See Also

setGroup

public function setGroup(group:ButtonGroup):Void

Identifies the group this button belongs to -- needed for radio buttons, which are mutually exclusive within their group.

Parameters

groupthe ButtonGroup this button belongs to

Specified By

setGroup() in org.aswing.ButtonModel

getGroup

public function getGroup():ButtonGroup

Returns the group that this button belongs to. Normally used with radio buttons, which are mutually exclusive within their group.

Return

a ButtonGroup that this button belongs to

addChangeListener

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:

  • enabled
  • rollOver
  • pressed
  • released
  • selected

onStateChanged Event{source:ButtonModel}

Specified By

addChangeListener() in org.aswing.ButtonModel

addSelectionListener

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}

Specified By

addSelectionListener() in org.aswing.ButtonModel

toString

public function toString():String