Class org.aswing.JAccordion

Description

Field Index

ON_STATE_CHANGED

Inherited from Container

Inherited from Component

Inherited from EventDispatcher

Method Index

new JAccordion()
append(), appendTab(), getIconAt(), getSelectedComponent(), getSelectedIndex(), getTabCount(), getTipAt(), getTitleAt(), getUI(), getUIClassID(), indexOfIcon(), indexOfTip(), indexOfTitle(), insert(), insertTab(), remove(), removeAll(), removeAt(), removeTabAt(), setLayout(), setSelectedComponent(), setSelectedIndex(), setUI(), updateUI()

Inherited from Container

Inherited from Component

Inherited from EventDispatcher

Constructor Detail

JAccordion

public function JAccordion()

JAccordion()

Field Detail

ON_STATE_CHANGED

static public ON_STATE_CHANGED:String

Method Detail

updateUI

public function updateUI():Void

Description copied from Component

Resets the UI property to a value from the current look and feel. Component subclasses must override this method like this:

   public void updateUI() {
      setUI((SliderUI)UIManager.getUI(this);
   }
  

Overrides

updateUI() in org.aswing.Component

setUI

public function setUI(newUI:AccordionUI):Void

Description copied from Component

Sets the look and feel delegate for this component. Component subclasses generally override this method to narrow the argument type. For example, in JSlider:

 public void setUI(SliderUI newUI) {
     super.setUI(newUI);
 }
  

Additionally Component subclasses must provide a getUI method that returns the correct type. For example:

 public SliderUI getUI() {
     return (SliderUI)ui;
 }
 

Overrides

setUI() in org.aswing.Component

getUI

public function getUI():AccordionUI

getUIClassID

public function getUIClassID():String

Description copied from Component

Returns the UIDefaults key used to look up the name of the org.aswing.plaf.ComponentUI class that defines the look and feel for this component. Most applications will never need to call this method. Subclasses of Component that support pluggable look and feel should override this method to return a UIDefaults key that maps to the ComponentUI subclass that defines their look and feel.

Overrides

getUIClassID() in org.aswing.Component

setLayout

public function setLayout(layout:LayoutManager):Void

Generally you should not set layout to JAccordion.

Parameters

layoutlayoutManager for JAccordion

Throws

Errorwhen you set a non-AccordionUI layout to JAccordion.

Overrides

setLayout() in org.aswing.Container

append

public function append(com:Component, constraints:Object):Void

Adds a component to the accordion. If constraints is a String or an Icon or an Object(object.toString() as a title), it will be used for the tab title, otherwise the component's name will be used as the tab title. Shortcut of insert(-1, com, constraints).

Parameters

comthe component to be displayed when this tab is clicked
constraintsthe object to be displayed in the tab

Overrides

append() in org.aswing.Container

See Also

insert

public function insert(i:Number, com:Component, constraints:Object):Void

Adds a component to the accordion with spesified index. If constraints is a String or an Icon or an Object(object.toString() as a title), it will be used for the tab title, otherwise the component's name will be used as the tab title. Cover method for insertTab.

Parameters

iindex the position at which to insert the component, or less than 0 value to append the component to the end
comthe component to be added
constraintsthe object to be displayed in the tab

Overrides

insert() in org.aswing.Container

See Also

appendTab

public function appendTab(com:Component, title:String, icon:Icon, tip:String):Void

Adds a component and tip represented by a title and/or icon, either of which can be null. Shortcut of insertTab(-1, com, title, icon, tip)

Parameters

comThe component to be displayed when this tab is clicked
titlethe title to be displayed in this tab
iconthe icon to be displayed in this tab
tipthe tooltip to be displayed for this tab, can be null means no tool tip.

insertTab

public function insertTab(i:Number, com:Component, title:String, icon:Icon, tip:String):Void

Inserts a component, at index, represented by a title and/or icon, either of which may be null.

Parameters

ithe index position to insert this new tab
comThe component to be displayed when this tab is clicked
titlethe title to be displayed in this tab
iconthe icon to be displayed in this tab
tipthe tooltip to be displayed for this tab, can be null means no tool tip.

Throws

Errorwhen index > children count

removeTabAt

public function removeTabAt(i):Component

Removes the specified child component. After the component is removed, its visibility is reset to true to ensure it will be visible if added to other containers.

Parameters

ithe index of component, less than 0 mean the component in the end of children list.

Return

the component just removed, or null there is not component at this position.

remove

public function remove(com:Component):Component

Removes the specified child component. After the component is removed, its visibility is reset to true to ensure it will be visible if added to other containers. Cover method for removeTabAt.

Overrides

remove() in org.aswing.Container

See Also

removeAt

public function removeAt(index:Number):Component

Removes the specified index child component. After the component associated with index is removed, its visibility is reset to true to ensure it will be visible if added to other containers. Cover method for removeTabAt.

Overrides

removeAt() in org.aswing.Container

See Also

removeAll

public function removeAll():Void

Remove all child components. After the component is removed, its visibility is reset to true to ensure it will be visible if added to other containers.

Overrides

removeAll() in org.aswing.Container

See Also

getTabCount

public function getTabCount():Number

Returns the count of tabs.

getTitleAt

public function getTitleAt(i:Number):String

Returns the tab title at specified index.

Parameters

ithe index

Return

the tab title

getIconAt

public function getIconAt(i:Number):Icon

Returns the tab icon at specified index.

Parameters

ithe index

Return

the tab icon

getTipAt

public function getTipAt(i:Number):String

Returns the tab tool tip text at specified index.

Parameters

ithe index

Return

the tab tool tip text

indexOfTitle

public function indexOfTitle(title:String):Number

Returns the first tab index with a given title, or -1 if no tab has this title.

Parameters

titlethe title for the tab

Return

the first tab index which matches title, or -1 if no tab has this title

indexOfIcon

public function indexOfIcon(icon:Icon):Number

Returns the first tab index with a given icon, or -1 if no tab has this icon.

Parameters

Return

the first tab index which matches icon, or -1 if no tab has this icon

indexOfTip

public function indexOfTip(tip:String):Number

Returns the first tab index with a given tip, or -1 if no tab has this tip.

Parameters

Return

the first tab index which matches tip, or -1 if no tab has this tip

setSelectedIndex

public function setSelectedIndex(i:Number):Void

setSelectedComponent

public function setSelectedComponent(com:Component):Void

getSelectedIndex

public function getSelectedIndex():Number

getSelectedComponent

public function getSelectedComponent():Component