@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Regular.ttf");
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/PT_Serif/PT_Serif-Web-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedArial;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVerdana;
embedAsCFF: true;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Regular.ttf");
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Bold.ttf");
fontWeight: bold;
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
@font-face {
src: url("../../../../../../Assets/Fonts/Open_Sans/OpenSans-Italic.ttf");
fontStyle: italic;
fontFamily: EmbeddedVerdanaHalo;
embedAsCFF: false;
}
s|WindowedApplication{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Window{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|TitleBar{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Button{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|TextArea{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|Label{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
s|CheckBox{
fontFamily: EmbeddedVerdana;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
mx|Label{
fontFamily: EmbeddedVerdanaHalo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
mx|DataGrid{
fontFamily: EmbeddedVerdanaHalo;
fontLookup: embeddedCFF;
fontAntiAliasType: normal;
}
global{
fontFamily: EmbeddedVerdana;
fontAntiAliasType: normal;
}
-1)
{
return true;
}
else
{
trace("###button label not expected");
return false;
}
}else
{
trace("###first element isn't a button");
return false;
}
}
public function testGetElementAtNegative(index:Number):Boolean
{
var iv:IVisualElement=null;
try
{
iv=myWin.getElementAt(index);
return false;
}catch(e:Error)
{
}
if (iv!=null)
return false;
else
return true;
}
public function closeAllChildWindow():void
{
var win:Window=null;
while(childWindowList.length>0)
{
win=Window(childWindowList.pop());
if (win!=null && !win.closed)
{
win.close();
win=null;
}
}
}
public function testRemoveElement():Boolean
{
var iv:IVisualElement=myWin.getElementAt(2);//this should return the drop down list
myWin.removeElement(iv); //the drop down list is removed
var displayObj:DisplayObject=myWin.getChildByName("datagrid1");//try to get the dropdown list again
if (displayObj !=null)
return false;
else
return true;
}
public function testRemoveElement2():Boolean
{
testAddElement();
var num:Number=myWin.numElements;
var iv:IVisualElement;
var coll:ArrayCollection=new ArrayCollection();
for (var i:Number=0;i