Package | org.fluint.uiImpersonation |
Class | public class VisualTestEnvironment |
Inheritance | VisualTestEnvironment ![]() |
Implements | IVisualTestEnvironment |
Subclasses | ActionScriptVisualTestEnvironment, FlexMXVisualTestEnvironment |
Property | Defined By | ||
---|---|---|---|
numChildren : int [read-only]
Returns the number of children currently in the test environment
| VisualTestEnvironment | ||
testEnvironment : Sprite [read-only]
Returns the sprite which contains all children added to the test environment. | VisualTestEnvironment |
Method | Defined By | ||
---|---|---|---|
VisualTestEnvironment(baseClass:Class)
Constructor
Creates a new test environment using the baseClass as a base. | VisualTestEnvironment | ||
addChild(child:DisplayObject):DisplayObject
Add a child to test environment. | VisualTestEnvironment | ||
addChildAt(child:DisplayObject, index:int):DisplayObject
Add a display object at the specified index. | VisualTestEnvironment | ||
addElement(element:DisplayObject):DisplayObject
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
addElementAt(element:DisplayObject, index:int):DisplayObject
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
getChildAt(index:int):DisplayObject
Retrieves the child at the specified index without removing the child. | VisualTestEnvironment | ||
getChildByName(name:String):DisplayObject
Retrieves the child with the specified name without removing the child\
| VisualTestEnvironment | ||
getChildIndex(child:DisplayObject):int
Retrieves the index of the specified child in the test environment
| VisualTestEnvironment | ||
getElementAt(index:int):DisplayObject
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
getElementIndex(element:DisplayObject):int
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
removeAllChildren():void
Removes all children currently in the test environment
| VisualTestEnvironment | ||
removeAllElements():void
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
removeChild(child:DisplayObject):DisplayObject
Removes the specified child from the test environment. | VisualTestEnvironment | ||
removeChildAt(index:int):DisplayObject
Removes a child at the specified index. | VisualTestEnvironment | ||
removeElement(element:DisplayObject):DisplayObject
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
removeElementAt(index:int):DisplayObject
Not used in projects prior to Flex 4. | VisualTestEnvironment | ||
setChildIndex(child:DisplayObject, newIndex:int):void
Updates the specified child to the new index. | VisualTestEnvironment | ||
setElementIndex(element:DisplayObject, index:int):void
Not used in projects prior to Flex 4. | VisualTestEnvironment |
numChildren | property |
numChildren:int
[read-only] Returns the number of children currently in the test environment
public function get numChildren():int
testEnvironment | property |
testEnvironment:Sprite
[read-only] Returns the sprite which contains all children added to the test environment. This should be cast to the type of container specified at creation.
public function get testEnvironment():Sprite
VisualTestEnvironment | () | Constructor |
public function VisualTestEnvironment(baseClass:Class)
Constructor
Creates a new test environment using the baseClass
as a base. This base
needs to be a container that implements IVisualElementContainer
.
baseClass:Class — A class reference to the container the environment should be built from.
|
addChild | () | method |
public function addChild(child:DisplayObject):DisplayObject
Add a child to test environment.
Parameters
child:DisplayObject |
DisplayObject — a reference to the added item.
|
addChildAt | () | method |
public function addChildAt(child:DisplayObject, index:int):DisplayObject
Add a display object at the specified index. The display object at the current index and any indexes greater will be shifted to accomodate the new object.
Parameters
child:DisplayObject — display object to add
| |
index:int — index to add the child at
|
DisplayObject — a reference to the added item
|
addElement | () | method |
public function addElement(element:DisplayObject):DisplayObject
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
element:DisplayObject |
DisplayObject |
addElementAt | () | method |
public function addElementAt(element:DisplayObject, index:int):DisplayObject
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
element:DisplayObject | |
index:int |
DisplayObject |
getChildAt | () | method |
public function getChildAt(index:int):DisplayObject
Retrieves the child at the specified index without removing the child.
Parameters
index:int — index of child to retrieve
|
DisplayObject — a reference to the child at the specified index
|
getChildByName | () | method |
public function getChildByName(name:String):DisplayObject
Retrieves the child with the specified name without removing the child\
Parameters
name:String — name of the child
|
DisplayObject — a reference to the retrieved child
|
getChildIndex | () | method |
public function getChildIndex(child:DisplayObject):int
Retrieves the index of the specified child in the test environment
Parameters
child:DisplayObject |
int — index of the parameter child
|
getElementAt | () | method |
public function getElementAt(index:int):DisplayObject
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
index:int |
DisplayObject |
getElementIndex | () | method |
public function getElementIndex(element:DisplayObject):int
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
element:DisplayObject |
int |
removeAllChildren | () | method |
public function removeAllChildren():void
Removes all children currently in the test environment
removeAllElements | () | method |
public function removeAllElements():void
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
removeChild | () | method |
public function removeChild(child:DisplayObject):DisplayObject
Removes the specified child from the test environment. Any children with a position greater than the removed child will be shifted to accomodate the change.
Parameters
child:DisplayObject — display object to remove
|
DisplayObject — a reference to the removed child
|
removeChildAt | () | method |
public function removeChildAt(index:int):DisplayObject
Removes a child at the specified index. Any children with a position greater than the specified index will be shifted down to accomodate the change.
Parameters
index:int — index of the child to remove
|
DisplayObject — a reference to the removed child
|
removeElement | () | method |
public function removeElement(element:DisplayObject):DisplayObject
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
element:DisplayObject |
DisplayObject |
removeElementAt | () | method |
public function removeElementAt(index:int):DisplayObject
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
index:int |
DisplayObject |
setChildIndex | () | method |
public function setChildIndex(child:DisplayObject, newIndex:int):void
Updates the specified child to the new index. This has a similar effect to removing the child and re-adding it but will not broadcast and add or remove.
Parameters
child:DisplayObject — child to move
| |
newIndex:int — the new index to move the child to
|
setElementIndex | () | method |
public function setElementIndex(element:DisplayObject, index:int):void
Not used in projects prior to Flex 4. Will throw an error if called from a project before Flex 4
Parameters
element:DisplayObject | |
index:int |