Main Page | Packages | Class Tree | Index | Help

xp.controls

class TabBase

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

All Known Subclasses: CollapsiblePanel, TabPanel

class TabBase
extends UIControl

Tabs and Panels content type component.

Base class for TabPanel, CollapsiblePanel, MenuPanel
Although subclasses may be visually quite different the underlying structure is the same.
Each consists of a TabBar object and a TabPanels object.
TabBar contains Tabs, a series of Buttons which control which panels are viewable.
TabPanels contains panels, which are Frame objects wich contains the actual content, accesed via its content property.
The getTab and getTabPanel and getContent give you access to the relevant objects.

The control is usually setup by assigning an array of TabDescriptors to its items or itemsSource property.
The TabDescriptor is defined by each subclass but commonly consists of label, icon, source, action and id properties.
The label is the text to display in the tab.
The icon is a linkageId of a graphical object to display in the tab.
The source is the linkageId or swf/jpg url to be loaded as content into the panel.
The action is the action or command to execute when a tab is clicked. If not set this is by default "expand".
The id is the instance id property that can be used with the getTabById and getPanelById properties.
All properties except label are optional.

Event summary for the TabBase class
The following table lists events of the TabBase class.


EventTypeDescription
xp.events.ProgressEventprogressTriggered while content is loading.
xp.events.PanelEventpanelBroadcast when a panel event occurs


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
ay



tabActions: Array
Authoring Parameter - Action's to execute when the tab is clicked (optional)


tabIcons: Array
Authoring Parameter - Icons for tabs (optional)


tabIds: Array
Authoring Parameter - Id's for tabs (optional)


tabLabels: Array
Authoring Parameter - Labels for tabs (optional)


tabSources: Array
Authoring Parameter - Source for panel content (optional)

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
dataProvider: Object (read, write)
Gets or sets an array of tab descriptors

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

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


Method Summary

public
addChild ( compDesc: Object ): Object
Adds a child control to a container

public
addTab ( params: Object ): String
Add a Tab

public
createChild ( className: Object, instanceName: String, initProps: Object ): Object
Adds a child control to a container

public
getContent ( index: Number ): MovieClip
Returns a reference to the content in the specified panel

public
getPanel ( index: Number ): Object
Get a reference to the tab panel using the tabs index

public
getPanelById ( pId: String ): Object
Get a reference to the tab panel using the tabs Id

public
getTab ( index: Number ): Object
Get a reference to the tab button using the tabs index

public
getTabById ( mId: String ): Object
Get a reference to the tab button using the tabs Id

public
getUIBuilder ( )
Reference to the UIBuilder object

public
loadContent ( src: String, index: Number ): Void
Loads or attaches the content

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

ay

public var ay

tabActions

var tabActions: Array
Authoring Parameter - Action's to execute when the tab is clicked (optional)

An array that specifies the action to execute when a tab is clicked. If a value is set the behavor when the tab is clicked is to not open the panel but to raise a PanelEvent with the action property set to this value. If a value is empty the default value expand will be used with the behavior to expand the panel. The default value is [] (an empty array).

tabIcons

var tabIcons: Array
Authoring Parameter - Icons for tabs (optional)

An array that specifies the linkage identifiers of the library symbols to be used as the icons in the tab. The default value is [] (an empty array).

tabIds

var tabIds: Array
Authoring Parameter - Id's for tabs (optional)

An array that specifies the instance Id's of the panels. The values you enter will be the instance id property for the panels and can be used in the getTabById/getPanelById. The default value is [] (an empty array).

tabLabels

var tabLabels: Array
Authoring Parameter - Labels for tabs (optional)

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

tabSources

var tabSources: Array
Authoring Parameter - Source for panel content (optional)

An array that specifies the linkage identifiers of the library symbols or the url of an external swf or jpg to be loaded into the panel content. The default value is [] (an empty array).


Property Documentation

dataProvider

public dataProvider: Object (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 tabs. It consist of an array of Tab desriptors.


Constructor Documentation

TabBase

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

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


Method Documentation

addChild

public function addChild(compDesc: Object): Object
Adds a child control to a container

Adds a child as defined in the component descriptor parameter to this container.

Parameters:
compDesc
A descriptor object defining the component to be added xp.system.CompDesc
Returns:
The newly added child

addTab

public function addTab(params: Object): String
Add a Tab

Parameters:
params
A Tab descriptor
Returns:
The Id of the tab

createChild

public function createChild(className: Object,
 instanceName: String,
 initProps: Object): Object
Adds a child control to a container

Adds a child as defined in the component descriptor parameter to this container.

Parameters:
className
compDesc A descriptor object defining the component to be added xp.system.CompDesc
instanceName
initProps
Returns:
The newly added child

getContent

public function getContent(index: Number): MovieClip
Returns a reference to the content in the specified panel

Parameters:
index
The index of the panel
Returns:
A reference to the content of the panel

getPanel

public function getPanel(index: Number): Object
Get a reference to the tab panel using the tabs index

Parameters:
index
The panels index in the tabpanels array
Returns:
A reference to the panel

getPanelById

public function getPanelById(pId: String): Object
Get a reference to the tab panel using the tabs Id

Parameters:
pId
The panels id
Returns:
A reference to the panel

getTab

public function getTab(index: Number): Object
Get a reference to the tab button using the tabs index

Parameters:
index
The tab buttons index in the tabbar array
Returns:
A reference to the tab

getTabById

public function getTabById(mId: String): Object
Get a reference to the tab button using the tabs Id

Parameters:
mId
The tab buttons id
Returns:
A reference to the tab

getUIBuilder

public function getUIBuilder()
Reference to the UIBuilder object

loadContent

public function loadContent(src: String,
 index: Number): Void
Loads or attaches the content

Parameters:
src
either a clip library symbol or the url of an external swf or jpg
index
the index of the tab panel to load the content into

The documentation was generated from the following file:


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