static public ON_SET_FOCUS:String
static public ON_KILL_FOCUS:String
static public ON_STATE_CHANGED:String
static public ON_SELECTION_CHANGED:String
static public CENTER:Number
static public TOP:Number
static public LEFT:Number
static public BOTTOM:Number
static public RIGHT:Number
static public HORIZONTAL:Number
static public VERTICAL:Number
public function setUI(ui:ButtonUI):Void
Sets the L&F object that renders this component.
ui | the ButtonUI L&F object
|
setUI() in org.aswing.Component
public function updateUI():Void
Resets the UI property to a value from the current look
and feel. Subtypes of AbstractButton
should override this to update the UI. For
example, JButton
might do the following:
setUI(ButtonUI(UIManager.getUI(this)));
public function addActionListener(fuc:Function, obj:Object):Object
addActionListener(fuc:Function, obj:Object)
addActionListener(fuc:Function)
Adds a action listener to this button. Buttons fire a action event when user released on it.
fuc | the listener function. |
the listener just added.
public function addSelectionListener(func:Function, obj:Object):Object
addSelectionListener(fuc:Function, obj:Object)
addSelectionListener(fuc:Function)
Adds a action listener to this button's selection change event.
the listener just added.
public function setEnabled(b:Boolean):Void
Enabled (or disabled) the button.
b | true to enable the button, otherwise false |
public function isSelected():Boolean
Returns the state of the button. True if the toggle button is selected, false if it's not.
true if the toggle button is selected, otherwise false
public function setSelected(b:Boolean):Void
Sets the state of the button. Note that this method does not
trigger an Event for users.
Call doClick
to perform a programatic action change.
b | true if the button is selected, otherwise false |
public function setRollOverEnabled(b:Boolean):Void
Sets the rolloverEnabled
property, which
must be true
for rollover effects to occur.
The default value for the rolloverEnabled
property is false
.
Some look and feels might not implement rollover effects;
they will ignore this property.
b | if true , rollover effects should be painted
|
public function isRollOverEnabled():Boolean
Gets the rolloverEnabled
property.
the value of the rolloverEnabled
property
public function setMargin(m:Insets):Void
Sets space for margin between the button's border and
the label. Setting to null
will cause the button to
use the default margin. The button's default Border
object will use this value to create the proper margin.
However, if a non-default border is set on the button,
it is that Border
object's responsibility to create the
appropriate margin space (else this property will
effectively be ignored).
m | the space between the border and the label |
public function setPressedIcon(pressedIcon:Icon):Void
Sets the pressed icon for the button.
pressedIcon | the icon used as the "pressed" image |
public function getSelectedIcon():Icon
Returns the selected icon for the button.
the selectedIcon
property
public function setSelectedIcon(selectedIcon:Icon):Void
Sets the selected icon for the button.
selectedIcon | the icon used as the "selected" image |
public function getRollOverIcon():Icon
Returns the rollover icon for the button.
the rolloverIcon
property
public function setRollOverIcon(rolloverIcon:Icon):Void
Sets the rollover icon for the button.
rolloverIcon | the icon used as the "rollover" image |
public function getRollOverSelectedIcon():Icon
Returns the rollover selection icon for the button.
the rolloverSelectedIcon
property
public function setRollOverSelectedIcon(rolloverSelectedIcon:Icon):Void
Sets the rollover selected icon for the button.
rolloverSelectedIcon | the icon used as the "selected rollover" image |
public function getDisabledIcon():Icon
Returns the icon used by the button when it's disabled. If no disabled icon has been set, the button constructs one from the default icon.
The disabled icon really should be created (if necessary) by the L&F.-->
the disabledIcon
property
public function setDisabledIcon(disabledIcon:Icon):Void
Sets the disabled icon for the button.
disabledIcon | the icon used as the disabled image |
public function getDisabledSelectedIcon():Icon
Returns the icon used by the button when it's disabled and selected. If not no disabled selection icon has been set, the button constructs one from the selection icon.
The disabled selection icon really should be created (if necessary) by the L&F. -->
the disabledSelectedIcon
property
public function setDisabledSelectedIcon(disabledSelectedIcon:Icon):Void
Sets the disabled selection icon for the button.
disabledSelectedIcon | the icon used as the disabled selection image |
public function getVerticalAlignment():Number
Returns the vertical alignment of the text and icon.
the verticalAlignment
property, one of the
following values:
public function setVerticalAlignment(alignment:Number):Void
Sets the vertical alignment of the icon and text.
alignment | one of the following values:
|
public function getHorizontalAlignment():Number
Returns the horizontal alignment of the icon and text.
the horizontalAlignment
property,
one of the following values:
public function setHorizontalAlignment(alignment:Number):Void
Sets the horizontal alignment of the icon and text.
alignment | one of the following values:
|
public function getVerticalTextPosition():Number
Returns the vertical position of the text relative to the icon.
the verticalTextPosition
property,
one of the following values:
public function setVerticalTextPosition(textPosition:Number):Void
Sets the vertical position of the text relative to the icon.
public function getHorizontalTextPosition():Number
Returns the horizontal position of the text relative to the icon.
the horizontalTextPosition
property,
one of the following values:
public function setHorizontalTextPosition(textPosition:Number):Void
Sets the horizontal position of the text relative to the icon.
textPosition | one of the following values:
|
public function getIconTextGap():Number
Returns the amount of space between the text and the icon displayed in this button.
an int equal to the number of pixels between the text and the icon.