Main Page | Packages | Class Tree | Index | Help

xp.controls

class CollapsiblePanel

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

All Known Subclasses: MenuPanel

class CollapsiblePanel
extends TabBase

OutlookBar/Accordion type component


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public
allowHideAll: Boolean
Controls whether all panels can be closed or at least one must always be open.

public static
classInfo: Object
A static class information object

public
expandMode: String
Controls whether only a single panel can be displayed at once or multiple panels

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

public
itemHeight: Number
The height of the tabs/tabbar

public
orientation: String
Controls whether the panels are orientated and expand vrtically or horizontally

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

public
expandDir: String (read, write)
Controls the direction the in which the control expands when a tab is opened

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


Method Summary

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

public
collapsePanel ( index: Number ): Void
Collapse a panel identified by its index

public
collapsePanelById ( Id: String ): Void
Collapse a panel identified by its Id

public
expandPanel ( index: Number ): Void
Expand a panel specified by its index

public
expandPanelById ( Id: String ): Void
Expands a panel

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

public
hidePanel ( Id: String )
Hides the panel and the tab so they are not visible

public
internalMeasure ( ): Void
The preferred size of the component

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

public
showPanel ( Id: String )


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

allowHideAll

public var allowHideAll: Boolean
Controls whether all panels can be closed or at least one must always be open.

The MSOutlookBar control always keeps a panel open, the MM Accordion control allows all panels to be closed.

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.

expandMode

public var expandMode: String
Controls whether only a single panel can be displayed at once or multiple panels

In single mode clicking on a new tab closes the previously open tab. In multiple mode panels can be independently opened and closed.

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

orientation

public var orientation: String
Controls whether the panels are orientated and expand vrtically or horizontally

The default is vertical

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

expandDir

public expandDir: String (read, write)
Controls the direction the in which the control expands when a tab is opened

Only effective if the control is set to autosize


Constructor Documentation

CollapsiblePanel

public function CollapsiblePanel()
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 param object with element label, icon, src symbol/url to load
Returns:
The Id of the tab

collapsePanel

public function collapsePanel(index: Number): Void
Collapse a panel identified by its index

If in single expandMode and allowHideAll is false this call will fail

Parameters:
index
The Tab index

collapsePanelById

public function collapsePanelById(Id: String): Void
Collapse a panel identified by its Id

If in single expandMode and allowHideAll is false this call will fail.

Parameters:
Id
The panel Id

expandPanel

public function expandPanel(index: Number): Void
Expand a panel specified by its index

Parameters:
index
The index of the panel to expand

expandPanelById

public function expandPanelById(Id: String): Void
Expands a panel

Expand the panel specified

Parameters:
Id
The Id of the panel to expand

getClass

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

Overrides:

hidePanel

public function hidePanel(Id: String)
Hides the panel and the tab so they are not visible

Parameters:
Id
The panel Id

internalMeasure

public function internalMeasure(): Void
The preferred size of the component

This forces the component to calculate its current preferred size. It does not update the preferredSize property. returns a Dimension obejct See preferrredSize property for the cached size

Overrides:

Returns:
xp.system.Dimension object with properties height and width

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(Id: String)

The documentation was generated from the following file:


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