Main Page | Packages | Class Tree | Index | Help

xp.controls

class TabPanel

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


class TabPanel
extends TabBase

TabPanel

A TabDescriptor is any object that contains the properties label, icon, source.
The label is the text to display on the tab.
The icon is the linkageId of a graphic icon to display on the tab (Optional).
The source is the linkageId or swf/jpg url to be loaded as content. If no source is specified an empty panel is created.
Optionaly an id property can be included and this will be used as the id of the panel when created.
The TabDescriptor may contain other user defined properties and will be passed as the data object on panel events.
If the TabDescriptor contains a data property then that property will be passed on panel events instead of the full TabDescriptor.

You can set the following authoring parameters for each TabPanel component instance in the Property inspector or in the Component inspector:
tabLabels An array that specifies the text labels to use in the tab.
The default value is [] (an empty array).
tabIcons 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).
tabSources 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).

Event summary for the TabPanel class
The following table lists events of the TabPanel 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
centerPanelContent: Boolean
Should panel content be automatically centered when loaded

public static
classInfo: Object
A static class information object

public
initialPanelIndex: Number
The index of the panel that will be initialy displayed

public
itemHeight: Number
The height of the tabs/tabbar

public
itemSpacing: Number
The spacing between tabs

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

Fields inherited from class xp.controls.TabBase

ay, tabActions, tabIcons, tabIds, tabLabels, tabSources

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
activePanel: Object (read-only)
The currently displayed panel

Properties inherited from class xp.controls.TabBase

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


Method Summary

public
addTab ( params: Object ): Object
Add a tab to the tabbar array

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
showPanel ( index )
Displays a panel

public
showPanelById ( mId: String ): Void
Displays a panel

Methods inherited from class xp.controls.TabBase

addChild, addTab, createChild, getContent, getPanel, getPanelById, getTab, getTabById, getUIBuilder, loadContent

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

centerPanelContent

public var centerPanelContent: Boolean
Should panel content be automatically centered when loaded

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.

initialPanelIndex

public var initialPanelIndex: Number
The index of the panel that will be initialy displayed

itemHeight

public var itemHeight: Number
The height of the tabs/tabbar

itemSpacing

public var itemSpacing: Number
The spacing between tabs

styleClass

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


Property Documentation

activePanel

public activePanel: Object (read-only)
The currently displayed panel


Constructor Documentation

TabPanel

public function TabPanel()
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

addTab

public function addTab(params: Object): Object
Add a tab to the tabbar array

Overrides:

Parameters:
params
Object a tab descriptor object with elements label, icon, source (symbol/url to load)
Returns:
The Id of the tab/panel

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.

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.

showPanel

public function showPanel(index)
Displays a panel

show a tab

Parameters:
index
the index of the selected tab

showPanelById

public function showPanelById(mId: String): Void
Displays a panel

show a tab

Parameters:
mId
the Id of the tab to display

The documentation was generated from the following file:


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