class org.aswing.JLayeredPane extends Container

Class Fields

static var DEFAULT_LAYER:Int

Convenience object defining the Default layer. Equivalent to new Integer(0).

static var DRAG_LAYER:Int

Convenience object defining the Drag layer. Equivalent to new Integer(400).

static var FRAME_CONTENT_LAYER:Int

Convenience object defining the Frame Content layer. This layer is normally only use to positon the contentPane and menuBar components of JFrame. Equivalent to new Integer(-30000). @see JFrame

static var LAYER_PROPERTY:String

Bound property

static var MODAL_LAYER:Int

Convenience object defining the Modal layer. Equivalent to new Integer(200).

static var PALETTE_LAYER:Int

Convenience object defining the Palette layer. Equivalent to new Integer(100).

static var POPUP_LAYER:Int

Convenience object defining the Popup layer. Equivalent to new Integer(300).

static function getLayerProperty(c:Component): Int

Gets the layer property for a JComponent, it does not cause any side effects like setLayer(). (painting, add/remove, etc) Normally you should use the instance method getLayer().

c

the JComponent to check

returns

an int specifying the component's layer

static function getLayeredPaneAbove(c:Component): JLayeredPane

Convenience method that returns the first JLayeredPane which contains the specified component. Note that all JFrames have a JLayeredPane at their root, so any component in a JFrame will have a JLayeredPane parent.

@see JFrame @see JRootPane

c

the Component to check

returns

the JLayeredPane that contains the component, or null if no JLayeredPane is found in the component hierarchy

static function putLayerProperty(c:Component, layer:Int): Void

Sets the layer property on a JComponent. This method does not cause any side effects like setLayer() (painting, add/remove, etc). Normally you should use the instance method setLayer(), in order to get the desired side-effects (like repainting).

@see #setLayer

c

the JComponent to move

layer

an int specifying the layer to move it to

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

function new(): Void

Create a new JLayeredPane

function getComponentCountInLayer(layer:Int): Int

Returns the number of children currently in the specified layer.

layer

an int specifying the layer to check

returns

an int specifying the number of components in that layer

function getComponentsInLayer(layer:Int): Array<Component>

Returns an array of the components in the specified layer.

layer

an int specifying the layer to check

returns

an array of Components contained in that layer

function getIndexOf(c:Component): Int

Returns the index of the specified Component. This is the absolute index, ignoring layers. Index numbers, like position numbers, have the topmost component at index zero. Larger numbers are closer to the bottom.

c

the Component to check

returns

an int specifying the component's index

function getLayer(c:Component): Int

Returns the layer attribute for the specified Component.

c

the Component to check

returns

an int specifying the component's current layer

function getPosition(c:Component): Int

Get the relative position of the component within its layer.

@see #getComponentCountInLayer

c

the Component to check

returns

an int giving the component's position, where 0 is the topmost position and the highest index value = the count count of components at that layer, minus 1

function highestLayer(): Int

Returns the highest layer value from all current children. Returns 0 if there are no children.

returns

an int indicating the layer of the topmost component in the pane, or zero if there are no children

function isOptimizedDrawingEnabled(): Bool

Returns false if components in the pane can overlap, which makes optimized drawing impossible. Otherwise, returns true.

@see JComponent#isOptimizedDrawingEnabled

returns

false if components can overlap, else true

function lowestLayer(): Int

Returns the lowest layer value from all current children. Returns 0 if there are no children.

returns

an int indicating the layer of the bottommost component in the pane, or zero if there are no children

function moveToBack(c:Component): Void

Moves the component to the bottom of the components in its current layer (position -1).

@see #setPosition(Component, int)

c

the Component to move

function moveToFront(c:Component): Void

Moves the component to the top of the components in its current layer (position 0).

@see #setPosition(Component, int)

c

the Component to move

function removeAll(): Void

Removes all the components from this container.

function removeAt(index:Int): Component

Remove the indexed component from this pane. This is the absolute index, ignoring layers.

@see #getIndexOf

index

an int specifying the component to remove

function setLayer(c:Component, layer:Int, ?position:Int = -1): Void

Sets the layer attribute for the specified component and also sets its position within that layer.

c

the Component to set the layer for

layer

an int specifying the layer to set, where lower numbers are closer to the bottom

position

an int specifying the position within the layer, where 0 is the topmost position and -1 is the bottommost position

function setPosition(c:Component, position:Int): Void

Moves the component to position within its current layer, where 0 is the topmost position within the layer and -1 is the bottommost position.

Note: Position numbering is defined by java.awt.Container, and is the opposite of layer numbering. Lower position numbers are closer to the top (0 is topmost), and higher position numbers are closer to the bottom.

c

the Component to move

position

an int in the range -1..N-1, where N is the number of components in the component's current layer