Main Page | Packages | Class Tree | Index | Help

xp.controls

class Button

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.TextBase
              |
              +--xp.controls.Label
                    |
                    +--xp.controls.Button

Implemented Interfaces: IButtonControl
All Known Subclasses: IconButton

class Button
extends Label

Standard Graphic Button

Operates in three modes Push/Toggle/Repeat


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public static
classInfo: Object
A static class information object

public
delay: Number
Repeater delay to first repeat in ms

public
interval: Number
Repeater interval in ms

public
offset: Object
The amount (x and y values) to displace the Text and Icon when the button is in its down state.

public
styleClass: String
The name of the style class this instance will use.

public
tabStop: Boolean
Is this control a tabstop

Fields inherited from class xp.controls.Label

classInfo, styleClass

Fields inherited from class xp.controls.TextBase

leading, leftMargin, rightMargin, textIndent

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
dialogResult (read, write)
Sets the buttons dialogResult

public
isCancel: Boolean (read, write)
Controls whther this is the cancel button that will be fire when escape is pressed*

public
isDefault: Boolean (read, write)
Controls whther this is the default button that will be fire when enter is pressed*

public
mode: String (read, write)
Controls the button behavior

Properties inherited from class xp.controls.Label

autoEllipsis, hAnchorPoint, html, icon, iconIndex, styleSheet, vAnchorPoint

Properties inherited from class xp.controls.TextBase

font, fontBold, fontColor, fontEmbed, fontFamily, fontItalic, fontName, fontSize, fontStyle, fontUnderline, fontWeight, text, textAlign, textDecoration, textWrap

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

public
Button ( )
expose enable property

Method Summary

public
getClass ( ): Function
Returns a reference to the components static class

public static
newInstance ( owner, instanceId, depth, initObj )
Creates a new Instance of this class

public
notifyDefault ( v: Boolean )
Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. This method is called by a parent form to make a control the default button. Default buttons are set to have an extra thick border.

public
performClick ( )
Generates a Click event for the control.

public
performPress ( )
Generates a Press event for the control.

Methods inherited from class xp.controls.Label

drawComponent, getClass, newInstance

Methods inherited from class xp.controls.TextBase

getTextEllipsis, getTextExtent

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

classInfo

public static var classInfo: Object
A static class information object

Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance.

delay

public var delay: Number
Repeater delay to first repeat in ms

set the time delay from first press to when the press event will begin fireing repeatedly. The default is 300 ms.

interval

public var interval: Number
Repeater interval in ms

Set the time interval between repeated firing of the press event. The default is 50 ms.

offset

public var offset: Object
The amount (x and y values) to displace the Text and Icon when the button is in its down state.

styleClass

public var styleClass: String
The name of the style class this instance will use.

tabStop

public var tabStop: Boolean
Is this control a tabstop


Property Documentation

dialogResult

public dialogResult (read, write)
Sets the buttons dialogResult

If set this value will be used when the button is clicked to set the parent windows dialogResult property

isCancel

public isCancel: Boolean (read, write)
Controls whther this is the cancel button that will be fire when escape is pressed*

isDefault

public isDefault: Boolean (read, write)
Controls whther this is the default button that will be fire when enter is pressed*

mode

public mode: String (read, write)
Controls the button behavior

The button can have one of three behaviors Push,Toggle,Repeat. The default is Push.


Constructor Documentation

Button

public function Button()
expose enable property


Method Documentation

getClass

public function getClass(): Function
Returns a reference to the components static class

Overrides:

newInstance

public static function newInstance(owner,
 instanceId,
 depth,
 initObj)
Creates a new Instance of this class

Creates an instance of a component at runtime. You need to use the import statement and specify the class package name before calling this method. In addition, the component must be in the FLA file’s library.

Overrides:

Parameters:
owner
A reference to the movie clip or object that will contains the new Instance.
instanceId
A string indicating the instance name of the new instance.(optional)
depth
A number indicating the depth of the new instance.(optional)
initObj
An object containing initialization properties for the new instance.(optional)
Returns:
A object that is an instance of the specified class.

notifyDefault

public function notifyDefault(v: Boolean)
Notifies a control that it is the default button so that its appearance and behavior is adjusted accordingly. This method is called by a parent form to make a control the default button. Default buttons are set to have an extra thick border.

Specified by:

performClick

public function performClick()
Generates a Click event for the control.

If the button is not enabled this does nothing.
This method is called for the button that has focus, or for the default button (if no other button has focus) when the user presses the ENTER key.
This method is also called when the user presses the ESC key if the button is set as the cancel button

Specified by:

performPress

public function performPress()
Generates a Press event for the control.

If the button is not enabled this does nothing.
This method is called by the repeater when firing.


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc