class org.aswing.AbstractTabbedPane extends Container

An abstract class for all Container pane class that have title, icon, tip for every sub pane.

For example JAccordion, JTabbedPane.

@author paling

Class Fields

static var BOTTOM:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var CENTER:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var HORIZONTAL:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var LEFT:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var RIGHT:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var TOP:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

static var VERTICAL:Int

A fast access to AsWingConstants Constant @see org.aswing.AsWingConstants

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from Container

var layout:LayoutManager
function append(com:Component, ?constraints:Dynamic):Void
function appendAll(coms:Array<Dynamic>):Void
function doLayout():Void
function getComponent(index:Int):Component
function getComponentCount():Int
function getComponents():Array<Dynamic>
function getFocusTraversalPolicy():FocusTraversalPolicy
function getIndex(com:Component):Int
function getLayout():LayoutManager
function insert(i:Int, com:Component, ?constraints:Dynamic):Void
function insertAll(index:Int, coms:Array<Dynamic>):Void
function invalidate():Void
function isAncestorOf(c:Component):Bool
function reAppendChildren():Void
function remove(com:Component):Component
function removeAll():Void
function removeAt(i:Int):Component
function removeChild(child:DisplayObject):DisplayObject
function removeChildAt(index:Int):DisplayObject
function setFocusTraversalPolicy(ftp:FocusTraversalPolicy):Void
function setLayout(layout:LayoutManager):Void
function validate():Void

Inherited from Component

var __fieldBindings__:FieldsBindSignal
var __methodBindings__:MethodsBindSignal
var alignmentX:Float
var alignmentY:Float
var background:ASColor
var backgroundDecorator:GroundDecorator
var border:Border
var bounds:IntRectangle
var clipBounds:IntRectangle
var constraints:Dynamic
var currentSize:IntDimension
var dragEnabled:Bool
var dropTrigger:Bool
var enabled:Bool
var focusable:Bool
var focusableSet:Bool
var font:ASFont
var foreground:ASColor
var foregroundDecorator:GroundDecorator
var location:IntPoint
var maximumSize:IntDimension
var mideground:ASColor
var minimumSize:IntDimension
var opaque:Bool
var opaqueSet:Bool
var preferredSize:IntDimension
var resizerMargin:Insets
var styleProxy:Component
var styleTune:StyleTune
var toolTipText:String
var transitFocusFactor:Float
var ui:ComponentUI
var uiElement:Bool
var visibility:Bool
function addDragAcceptableInitiator(com:Component):Void
function componentToGlobal(p:IntPoint):IntPoint
function getClientProperty(key:String, ?defaultValue:Dynamic):Dynamic
function getDefaultBasicUIClass():Class<Dynamic>
function getFocusManager():FocusManager
function getGlobalLocation(?rv:IntPoint):IntPoint
function getInsets():Insets
function getInternalFocusObject():InteractiveObject
function getKeyboardManager():KeyboardManager
function getMousePosition():IntPoint
function getPaintBounds():IntRectangle
function getParent():Container
function getRootPaneAncestor():JRootPane
function getUIClassID():String
function globalToComponent(p:IntPoint):IntPoint
function hitTestMouse():Bool
function invalidate():Void
function invalidatePreferSizeCaches():Void
function isCachePreferSizes():Bool
function isDragAcceptableInitiator(com:Component):Bool
function isFocusOwner():Bool
function isFontValidated():Bool
function isOnStage():Bool
function isShowing():Bool
function isValid():Bool
function isValidateRoot():Bool
function makeFocus():Void
function pack():Void
function paintFocusRect(?force:Bool):Void
function paintImmediately():Void
function parentReAppendChildren():Void
function putClientProperty(key:String, value:Dynamic):Void
function reAppendToParent(?constraints:Dynamic):Void
function removeDragAcceptableInitiator(com:Component):Void
function removeFromContainer():Void
function repaint():Void
function repaintAndRevalidate():Void
function requestFocus():Bool
function revalidate():Void
function setCachePreferSizes(b:Bool):Void
function setClipSize(size:IntDimension):Void
function setDragAcceptableInitiatorAppraiser(func:Dynamic ->Bool):Void
function setFontValidated(b:Bool):Void
function setGlobalLocation(gp:IntPoint):Void
function transferFocus():Bool
function transferFocusBackward():Bool
function updateUI():Void
function validate():Void

Inherited from AWSprite

function bringToBottom(child:DisplayObject):Void
function bringToTop(child:DisplayObject):Void
function containsChild(child:DisplayObject):Bool
function getHighestIndexUnderForeground():Int
function getLowestIndexAboveBackground():Int
function isClipMasked():Bool
function setChildIndex(child:DisplayObject, index:Int):Void
function setClipMaskRect(b:IntRectangle):Void
function setClipMasked(m:Bool):Void
function toString():String

Inherited from Sprite

var buttonMode:Bool
var dropTarget:DisplayObject
var graphics:Graphics
var hitArea:Sprite
var soundTransform:SoundTransform
var useHandCursor:Bool
function startDrag(?lockCenter:Bool, ?bounds:Rectangle):Void
function startTouchDrag(touchPointID:Int, ?lockCenter:Bool, ?bounds:Rectangle):Void
function stopDrag():Void
function stopTouchDrag(touchPointID:Int):Void

Inherited from DisplayObjectContainer

var mouseChildren:Bool
var numChildren:Int
var tabChildren:Bool
var textSnapshot:TextSnapshot
function addChild(child:DisplayObject):DisplayObject
function addChildAt(child:DisplayObject, index:Int):DisplayObject
function areInaccessibleObjectsUnderPoint(point:Point):Bool
function contains(child:DisplayObject):Bool
function getChildAt(index:Int):DisplayObject
function getChildByName(name:String):DisplayObject
function getChildIndex(child:DisplayObject):Int
function getObjectsUnderPoint(point:Point):Array<DisplayObject>
function removeChild(child:DisplayObject):DisplayObject
function removeChildAt(index:Int):DisplayObject
function setChildIndex(child:DisplayObject, index:Int):Void
function swapChildren(child1:DisplayObject, child2:DisplayObject):Void
function swapChildrenAt(index1:Int, index2:Int):Void

Inherited from InteractiveObject

var accessibilityImplementation:AccessibilityImplementation
var contextMenu:ContextMenu
var doubleClickEnabled:Bool
var focusRect:Dynamic
var mouseEnabled:Bool
var tabEnabled:Bool
var tabIndex:Int

Inherited from DisplayObject

var accessibilityProperties:AccessibilityProperties
var alpha:Float
var blendMode:BlendMode
var blendShader:Shader
var cacheAsBitmap:Bool
var filters:Array<BitmapFilter>
var height:Float
var loaderInfo:LoaderInfo
var mask:DisplayObject
var mouseX:Float
var mouseY:Float
var name:String
var opaqueBackground:Null<UInt>
var parent:DisplayObjectContainer
var root:DisplayObject
var rotation:Float
var rotationX:Float
var rotationY:Float
var rotationZ:Float
var scale9Grid:Rectangle
var scaleX:Float
var scaleY:Float
var scaleZ:Float
var scrollRect:Rectangle
var stage:Stage
var transform:Transform
var visible:Bool
var width:Float
var x:Float
var y:Float
var z:Float
function getBounds(targetCoordinateSpace:DisplayObject):Rectangle
function getRect(targetCoordinateSpace:DisplayObject):Rectangle
function globalToLocal(point:Point):Point
function globalToLocal3D(point:Point):Vector3D
function hitTestObject(obj:DisplayObject):Bool
function hitTestPoint(x:Float, y:Float, ?shapeFlag:Bool):Bool
function local3DToGlobal(point3d:Vector3D):Point
function localToGlobal(point:Point):Point

Inherited from EventDispatcher

function addEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool, ?priority:Int, ?useWeakReference:Bool):Void
function dispatchEvent(event:Event):Bool
function hasEventListener(type:String):Bool
function removeEventListener(type:String, listener:Dynamic ->Void?useCapture:Bool):Void
function toString():String
function willTrigger(type:String):Bool

var horizontalAlignment:Int

The horizontal alignment of the icon and text.

One of the following values:

  • AsWingConstants.RIGHT (the default)
  • AsWingConstants.LEFT
  • AsWingConstants.CENTER

var horizontalTextPosition:Int

The horizontal position of the text relative to the icon.

  • AsWingConstants.RIGHT (the default)
  • AsWingConstants.LEFT
  • AsWingConstants.CENTER

var iconTextGap:Int

If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

var margin:Insets

The space for the margin between the tab border and the tab label.

var verticalAlignment:Int

The vertical alignment of the icon and text.

One of the following values:

  • AsWingConstants.CENTER (the default)
  • AsWingConstants.TOP
  • AsWingConstants.BOTTOM

var verticalTextPosition:Int

The vertical position of the text relative to the icon.

One of the following values:

  • AsWingConstants.CENTER (the default)
  • AsWingConstants.TOP
  • AsWingConstants.BOTTOM

function new(): Void

function addStateListener(listener:Dynamic ->Void?priority:Int = 0, ?useWeakReference:Bool = false): Void

Adds a listener to listen the tab selection change event. @see org.aswing.event.InteractiveEvent#STATE_CHANGED

listener

the listener

priority

the priority

useWeakReference

Determines whether the reference to the listener is strong or weak.

function append(com:Component, ?constraints:Dynamic = null): Void

Adds a component to the tabbedpane. 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). @see Container#append() @see #insert() @see #insertTab()

com

the component to be displayed when this tab is clicked

constraints

the object to be displayed in the tab

function appendTab(com:Component, ?title:String = '', ?icon:Icon = null, ?tip:String = null): 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)

com

The component to be displayed when this tab is clicked

title

the title to be displayed in this tab

icon

the icon to be displayed in this tab

tip

the tooltip to be displayed for this tab, can be null means no tool tip.

function appendTabInfo(t:TabInfo): Void

Adds a tab by TabInfo

function getIconAt(i:Int): Icon

Returns the tab icon at specified index.

i

the index

returns

the tab icon

function getSelectedIndex(): Int

function getTabCount(): Int

Returns the count of tabs.

function getTipAt(i:Int): String

Returns the tab tool tip text at specified index.

i

the index

returns

the tab tool tip text

function getTitleAt(i:Int): String

Returns the tab title at specified index.

i

the index

returns

the tab title

function indexOfIcon(icon:Icon): Int

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

title

the title for the tab

returns

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

function indexOfTip(tip:String): Int

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

title

the title for the tab

returns

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

function indexOfTitle(title:String): Int

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

title

the title for the tab

returns

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

function insert(i:Int, com:Component, ?constraints:Dynamic = null): Void

Adds a component to the tabbedpane 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. @see Container#insert() @see #insertTab()

i

index the position at which to insert the component, or less than 0 value to append the component to the end

com

the component to be added

constraints

the object to be displayed in the tab

function insertTab(i:Int, com:Component, ?title:String = '', ?icon:Icon = null, ?tip:String = null): Void

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

i

the index position to insert this new tab, less than 0 means append to the end.

com

The component to be displayed when this tab is clicked

title

the title to be displayed in this tab

icon

the icon to be displayed in this tab

tip

the tooltip to be displayed for this tab, can be null means no tool tip.

function isEnabledAt(index:Int): Bool

Returns whether or not the tab at index is currently enabled. false will be returned if there is no tab at that index.

index

the index of the item being queried

returns

if the tab at index is enabled; false otherwise.

function isVisibleAt(index:Int): Bool

Returns whether or not the tab at index is currently visible. false will be returned if there is no tab at that index.

index

the index of the item being queried

returns

if the tab at index is visible; false otherwise.

function removeStateListener(listener:Dynamic ->Void): Void

Removes a state listener. @see org.aswing.event.InteractiveEvent#STATE_CHANGED

listener

the listener to be removed.

function removeTabAt(i:Int): 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.

i

the index of component.

returns

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

function setEnabledAt(index:Int, enabled:Bool): Void

Sets whether or not the tab at index is enabled. Nothing will happen if there is no tab at that index.

index

the tab index which should be enabled/disabled

enabled

whether or not the tab should be enabled

function setIconAt(i:Int, icon:Icon): Void

Sets the icon at index to tab icon which can be null. Nothing will happen if there is no tab at that index.

i

the index

icon

the tab icon

function setIconTextGap(iconTextGap:Int): Void

If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

@see #getIconTextGap()

function setSelectedComponent(com:Component, ?programmatic:Bool = true): Void

Sets the selected component for this tabbedpane. This will automatically set the selectedIndex to the index corresponding to the specified component.

@see #getSelectedComponent()

com

the component to be selected

programmatic

indicate if this is a programmatic change.

function setSelectedIndex(i:Int, ?programmatic:Bool = true): Void

Sets the selected index for this tabbedpane. The index must be a valid tab index or -1, which indicates that no tab should be selected (can also be used when there are no tabs in the tabbedpane). If a -1 value is specified when the tabbedpane contains one or more tabs, then the results will be implementation defined.

index

the index to be selected

programmatic

indicate if this is a programmatic change.

function setTipAt(i:Int, t:String): Void

Sets the tool tip at index to tab tooltip which can be null. Nothing will happen if there is no tab at that index.

i

the index

t

the tab tool tip

function setTitleAt(i:Int, t:String): Void

Sets the title at index to title which can be null. Nothing will happen if there is no tab at that index.

i

the index

t

the tab title

function setVisibleAt(index:Int, visible:Bool): Void

Sets whether or not the tab at index is visible. Nothing will happen if there is no tab at that index.

index

the tab index which should be shown/hidden

shown

whether or not the tab should be visible