Main Page | Packages | Class Tree | Index | Help

xp.controls

class ButtonList

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.ButtonList

All Known Subclasses: CheckBoxList, RadioButtonList

class ButtonList
extends UIControl

ButtonList

Base class for button list controls
All ButtonList can operate in two modes; either bydirectly creating component within it own container or by managing an exisiting set of controls on the parent container.
At run time when the ButtonList loads if a valid items or itemsSource exists then it will search its parent container for groupItems.
Whether a control is part of this lists group is determined by comparing the name of the control to the lists group name
For example a ButtonList called creditCards would match with group items called creditCards01,creditCards02,creditCards03


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary


__itemStyle


public static
classInfo: Object
A static class information object


dataItems: Array
Authoring Parameter - Data for list items


labels: Array
Authoring Parameter - Labels for list items

public
selectedItem: Object
Gets or sets the selected item of the group

public
selectedValue: Object
Gets or sets the selected value of the group

public
tabStop: Boolean
Gets or sets whether a control should be included in tab navigation.

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
columns: Number (read, write)
The number of columns to use in laying out the controls

public
flowOrientation: String (read, write)
Gets or sets a value that indicates the direction that elements flow within the container

public
groupName: String (read-only)
Gets the group name for this button group.
The groupName is an alias for the _name of the control.


public
items: Array (read, write)
Gets or sets an array of tab descriptors

public
itemsSource: ListDataSource (read, write)
Gets or sets an itemsSource

public
itemStyle: (write)
A component descriptor for items in the list

public
itemStyle: Object (read)


public
labelPosition: Object (read, write)
Controls the placement of the label

public
labelText: String (read, write)
The text content of the label

public
selectedIndex: Number (read, write)
The index of a selection in a single-selection list.

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
ButtonList ( )
Constructor - This should not be called directly.


Method Summary

public
addItem ( item: Object ): Void
Adds an item to the end of the list.

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

public
setGroupItems ( items: Array, selectedIndex: Number ): Void
Adds an array of pre-created items to the list

public
setNext ( inc: Number ): Void
Moves the selection and focus to the next item in the group.

public
setSelectedItem ( item: Object ): Void
Sets the selected item in the list

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

__itemStyle

var __itemStyle

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.

dataItems

var dataItems: Array
Authoring Parameter - Data for list items

An array that specifies the data to use in the list. The default value is [] (an empty array).

labels

var labels: Array
Authoring Parameter - Labels for list items

An array that specifies the text labels to use in the list. The default value is [] (an empty array).

selectedItem

public var selectedItem: Object
Gets or sets the selected item of the group

selectedValue

public var selectedValue: Object
Gets or sets the selected value of the group

tabStop

public var tabStop: Boolean
Gets or sets whether a control should be included in tab navigation.

All XPComponents use TabStop in place of TabEnabled.(tabEnabled MUST NOT be set)
By default this control is a TabStop


Property Documentation

columns

public columns: Number (read, write)
The number of columns to use in laying out the controls

flowOrientation

public flowOrientation: String (read, write)
Gets or sets a value that indicates the direction that elements flow within the container

groupName

public groupName: String (read-only)
Gets the group name for this button group.
The groupName is an alias for the _name of the control.

items

public items: Array (read, write)
Gets or sets an array of tab descriptors

When this property is set, internaly the array is wrapped in a ListDataSource and passed to the itemsSource property

itemsSource

public itemsSource: ListDataSource (read, write)
Gets or sets an itemsSource

The datasource object that will be used to populate the list.
It consist of an array of Tab desriptors.

itemStyle

public itemStyle: (write)
A component descriptor for items in the list

itemStyle

public itemStyle: Object (read)

labelPosition

public labelPosition: Object (read, write)
Controls the placement of the label

labelText

public labelText: String (read, write)
The text content of the label

selectedIndex

public selectedIndex: Number (read, write)
The index of a selection in a single-selection list.

The selected index of a single-selection list.
The value is undefined if nothing is selected.
If you assign a value to selectedIndex, any current selection is cleared and the indicated item is selected.


Constructor Documentation

ButtonList

public function ButtonList()
Constructor - This should not be called directly.

If you want to dynamically create a new instance of this control use the static newInstance method


Method Documentation

addItem

public function addItem(item: Object): Void
Adds an item to the end of the list.

Adds a new item to the end of the list.

Parameters:
item
An item object that usually has label and data properties.

getClass

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

Overrides:

setGroupItems

public function setGroupItems(items: Array,
 selectedIndex: Number): Void
Adds an array of pre-created items to the list

The list can be used to manage a group of items that already exist on a Form
In this mode the list will usually not be responisble for laying the controls

Parameters:
items
The array of references to existing controls
selectedIndex
The index of the item that will initially be selected.
Use -1 if no item should be selected.

setNext

public function setNext(inc: Number): Void
Moves the selection and focus to the next item in the group.

Parameters:
inc
The number of items to move; can be positve or negative.

setSelectedItem

public function setSelectedItem(item: Object): Void
Sets the selected item in the list

Parameters:
item
A reference to an item control in the list

The documentation was generated from the following file:


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