Class org.aswing.ButtonGroup

Description

Method Index

new ButtonGroup()
append(), getButtonCount(), getElements(), getSelection(), isSelected(), remove(), setSelected()

Constructor Detail

ButtonGroup

public function ButtonGroup()

Creates a new ButtonGroup.

Method Detail

append

public function append(b:AbstractButton):Void

Adds the button to the group.

Parameters

bthe button to be added

remove

public function remove(b:AbstractButton):Void

Removes the button from the group.

Parameters

bthe button to be removed

getElements

public function getElements():Array

Returns all the buttons that are participating in this group.

Return

an Array of the buttons in this group

getSelection

public function getSelection():ButtonModel

Returns the model of the selected button.

Return

the selected button model

setSelected

public function setSelected(m:ButtonModel, b:Boolean):Void

Sets the selected value for the ButtonModel. Only one button in the group may be selected at a time.

Parameters

mthe ButtonModel
btrue if this button is to be selected, otherwise false

isSelected

public function isSelected(m:ButtonModel):Boolean

Returns whether a ButtonModel is selected.

Return

true if the button is selected, otherwise returns false

getButtonCount

public function getButtonCount():Number

Returns the number of buttons in the group.

Return

the button count