Packagejp.nium.display
Classpublic class ChildIndexer
InheritanceChildIndexer Inheritance Object

ChildIndexer クラスは、DisplayObjectContainer を拡張して、より高度な表示リスト操作を行うためのクラスです。 ChildIndexer class is a class that extends the DisplayObjectContainer to do a more advanced display list operation.

View the examples



Public Properties
 PropertyDefined By
  children : Array
[read-only] 子ディスプレイオブジェクトが保存されている配列です。 インデックス値が断続的に指定可能である為、getChildAt() ではなくこのプロパティを使用して子ディスプレイオブジェクト走査を行います。 この配列を操作することで元の配列を変更することはできません。 The array that saves child display objects.
ChildIndexer
  _childrenToIndex : Dictionary
ディスプレイオブジェクトをキーとしてインデックスを保存した Dictionary インスタンスを取得します。
ChildIndexer
  _indexesToChild : Dictionary
インデックスをキーとしてディスプレイオブジェクトを保存した Dictionary インスタンスを取得します。
ChildIndexer
  numChildren : int
[read-only] 子ディスプレイオブジェクトの数を取得します。 Returns the number of children of this object.
ChildIndexer
Public Methods
 MethodDefined By
  
ChildIndexer(container:DisplayObjectContainer)
新しい ChildIndexer インスタンスを作成します。 Creates a new ChildIndexer object.
ChildIndexer
  
addChild(child:DisplayObject):DisplayObject
この DisplayObjectContainer インスタンスに子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ChildIndexer
  
addChildAt(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ChildIndexer
  
addChildAtAbove(child:DisplayObject, index:int):DisplayObject
この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.
ChildIndexer
  
contains(child:DisplayObject):Boolean
指定された表示オブジェクトが DisplayObjectContainer インスタンスの子であるか、オブジェクト自体であるかを指定します。 Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
ChildIndexer
  
getChildAt(index:int):DisplayObject
指定のインデックス位置にある子表示オブジェクトオブジェクトを返します。 Returns the child display object instance that exists at the specified index.
ChildIndexer
  
getChildByName(name:String):DisplayObject
指定された名前に一致する子表示オブジェクトを返します。 Returns the child display object that exists with the specified name.
ChildIndexer
  
getChildIndex(child:DisplayObject):int
子 DisplayObject インスタンスのインデックス位置を返します。 Returns the index position of a child DisplayObject instance.
ChildIndexer
  
DisplayObjectContainer に追加されている全ての子 DisplayObject インスタンスを削除します。 Remove the whole child DisplayObject instance which added to the DisplayObjectContainer.
ChildIndexer
  
removeChild(child:DisplayObject):DisplayObject
DisplayObjectContainer インスタンスの子リストから指定の DisplayObject インスタンスを削除します。 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
ChildIndexer
  
removeChildAt(index:int):DisplayObject
DisplayObjectContainer の子リストの指定されたインデックス位置から子 DisplayObject インスタンスを削除します。 Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
ChildIndexer
  
setChildIndex(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ChildIndexer
  
setChildIndexAbove(child:DisplayObject, index:int):void
表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.
ChildIndexer
  
swapChildren(child1:DisplayObject, child2:DisplayObject):void
指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the two specified child objects.
ChildIndexer
  
swapChildrenAt(index1:int, index2:int):void
子リスト内の指定されたインデックス位置に該当する 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
ChildIndexer
  
toString():String
指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.
ChildIndexer
Property Detail
_childrenToIndexproperty
public var _childrenToIndex:Dictionary

ディスプレイオブジェクトをキーとしてインデックスを保存した Dictionary インスタンスを取得します。

_indexesToChildproperty 
public var _indexesToChild:Dictionary

インデックスをキーとしてディスプレイオブジェクトを保存した Dictionary インスタンスを取得します。

childrenproperty 
children:Array  [read-only]

子ディスプレイオブジェクトが保存されている配列です。 インデックス値が断続的に指定可能である為、getChildAt() ではなくこのプロパティを使用して子ディスプレイオブジェクト走査を行います。 この配列を操作することで元の配列を変更することはできません。 The array that saves child display objects. Because the index value can specify intermittently, it scans the child display object by not using getChildAt() but using this property. It can not change the original array by operating this array.


Implementation
    public function get children():Array
numChildrenproperty 
numChildren:int  [read-only]

子ディスプレイオブジェクトの数を取得します。 Returns the number of children of this object.


Implementation
    public function get numChildren():int
Constructor Detail
ChildIndexer()Constructor
public function ChildIndexer(container:DisplayObjectContainer)

新しい ChildIndexer インスタンスを作成します。 Creates a new ChildIndexer object.

Parameters
container:DisplayObjectContainer関連付けたい DisplayObjectContainer インスタンスです。 The DisplayObjectContainer instance that want to relate.
Method Detail
addChild()method
public function addChild(child:DisplayObject):DisplayObject

この DisplayObjectContainer インスタンスに子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters

child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
addChildAt()method 
public function addChildAt(child:DisplayObject, index:int):DisplayObject

この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters

child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.
 
index:int子を追加するインデックス位置です。 The index position to which the child is added. If you specify a currently occupied index position, the child object that exists at that position and all higher positions are moved up one position in the child list.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
addChildAtAbove()method 
public function addChildAtAbove(child:DisplayObject, index:int):DisplayObject

この DisplayObjectContainer インスタンスの指定されたインデックス位置に子 DisplayObject インスタンスを追加します。 Adds a child DisplayObject instance to this DisplayObjectContainer instance.

Parameters

child:DisplayObject対象の DisplayObjectContainer インスタンスの子として追加する DisplayObject インスタンスです。 The DisplayObject instance to add as a child of this DisplayObjectContainer instance.
 
index:int子を追加するインデックス位置です。 The index position to which the child is added. If you specify a currently occupied index position, the child object that exists at that position and all higher positions are moved up one position in the child list.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
contains()method 
public function contains(child:DisplayObject):Boolean

指定された表示オブジェクトが DisplayObjectContainer インスタンスの子であるか、オブジェクト自体であるかを指定します。 Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

Parameters

child:DisplayObjectテストする子 DisplayObject インスタンスです。 The child object to test.

Returns
Booleanchild インスタンスが DisplayObjectContainer の子であるか、コンテナ自体である場合は true となります。そうでない場合は false となります。 true if the child object is a child of the DisplayObjectContainer or the container itself; otherwise false.
getChildAt()method 
public function getChildAt(index:int):DisplayObject

指定のインデックス位置にある子表示オブジェクトオブジェクトを返します。 Returns the child display object instance that exists at the specified index.

Parameters

index:int子 DisplayObject インスタンスのインデックス位置です。 The index position of the child object.

Returns
DisplayObject指定されたインデックス位置にある子 DisplayObject インスタンスです。 The child display object at the specified index position.
getChildByName()method 
public function getChildByName(name:String):DisplayObject

指定された名前に一致する子表示オブジェクトを返します。 Returns the child display object that exists with the specified name.

Parameters

name:String返される子 DisplayObject インスタンスの名前です。 The name of the child to return.

Returns
DisplayObject指定された名前を持つ子 DisplayObject インスタンスです。 The child display object with the specified name.
getChildIndex()method 
public function getChildIndex(child:DisplayObject):int

子 DisplayObject インスタンスのインデックス位置を返します。 Returns the index position of a child DisplayObject instance.

Parameters

child:DisplayObject特定する子 DisplayObject インスタンスです。 The DisplayObject instance to identify.

Returns
int特定する子 DisplayObject インスタンスのインデックス位置です。 The index position of the child display object to identify.
removeAllChildren()method 
public function removeAllChildren():void

DisplayObjectContainer に追加されている全ての子 DisplayObject インスタンスを削除します。 Remove the whole child DisplayObject instance which added to the DisplayObjectContainer.

removeChild()method 
public function removeChild(child:DisplayObject):DisplayObject

DisplayObjectContainer インスタンスの子リストから指定の DisplayObject インスタンスを削除します。 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.

Parameters

child:DisplayObject対象の DisplayObjectContainer インスタンスの子から削除する DisplayObject インスタンスです。 The DisplayObject instance to remove.

Returns
DisplayObjectchild パラメータで渡す DisplayObject インスタンスです。 The DisplayObject instance that you pass in the child parameter.
removeChildAt()method 
public function removeChildAt(index:int):DisplayObject

DisplayObjectContainer の子リストの指定されたインデックス位置から子 DisplayObject インスタンスを削除します。 Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.

Parameters

index:int削除する DisplayObject の子インデックスです。 The child index of the DisplayObject to remove.

Returns
DisplayObject削除された DisplayObject インスタンスです。 The DisplayObject instance that was removed.
setChildIndex()method 
public function setChildIndex(child:DisplayObject, index:int):void

表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.

Parameters

child:DisplayObjectインデックス番号を変更する子 DisplayObject インスタンスです。 The child DisplayObject instance for which you want to change the index number.
 
index:intchild インスタンスの結果のインデックス番号です。 The resulting index number for the child display object.

setChildIndexAbove()method 
public function setChildIndexAbove(child:DisplayObject, index:int):void

表示オブジェクトコンテナの既存の子の位置を変更します。 Changes the position of an existing child in the display object container.

Parameters

child:DisplayObjectインデックス番号を変更する子 DisplayObject インスタンスです。 The child DisplayObject instance for which you want to change the index number.
 
index:intchild インスタンスの結果のインデックス番号です。 The resulting index number for the child display object.

swapChildren()method 
public function swapChildren(child1:DisplayObject, child2:DisplayObject):void

指定された 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the two specified child objects.

Parameters

child1:DisplayObject先頭の子 DisplayObject インスタンスです。 The first child object.
 
child2:DisplayObject2 番目の子 DisplayObject インスタンスです。 The second child object.

swapChildrenAt()method 
public function swapChildrenAt(index1:int, index2:int):void

子リスト内の指定されたインデックス位置に該当する 2 つの子オブジェクトの z 順序(重ね順)を入れ替えます。 Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.

Parameters

index1:int最初の子 DisplayObject インスタンスのインデックス位置です。 The index position of the first child object.
 
index2:int2 番目の子 DisplayObject インスタンスのインデックス位置です。 The index position of the second child object.

toString()method 
public function toString():String

指定されたオブジェクトのストリング表現を返します。 Returns the string representation of the specified object.

Returns
Stringオブジェクトのストリング表現です。 A string representation of the object.
Examples