flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: New Mustella Failures
Date Sat, 08 Jun 2013 09:34:07 GMT
Hi,

>> 1) ADG mirroring.  The failing bitmap shows the text flipped (as if viewed
>> in a mirror).  

Look closer at the test it setting the layout direction RTL not the direction so only the
columns should be reverse order not the text.

Look like there's an issue with the test as the same code run in a browser doesn't show the
text mirrored.

here's the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application layout="vertical" height="700" width="850"
			xmlns:fx="http://ns.adobe.com/mxml/2009" 
			xmlns:s="library://ns.adobe.com/flex/spark" 
			xmlns:mx="library://ns.adobe.com/flex/mx" initialize="init(event)">
	<fx:Script>
		<![CDATA[
			import mx.events.FlexEvent;
			
			import mx.collections.*;
			import mx.controls.NumericStepper;
			import mx.formatters.CurrencyFormatter;
			import mx.styles.StyleManager; 
			import mx.controls.advancedDataGridClasses.*;
			
			protected function init(event:FlexEvent):void
			{
				createColumnGroups();
				groupedData();
				mydatagrid.expandAll();
			}
				
				[Bindable]
				private var ac:ArrayCollection = new ArrayCollection(); 

				public var companies:AdvancedDataGridColumn = new AdvancedDataGridColumn("Company");
				public  var quarters:AdvancedDataGridColumn = new AdvancedDataGridColumn("Quarter");
				public  var india:AdvancedDataGridColumn = new AdvancedDataGridColumn("India");
				public  var veeranistan:AdvancedDataGridColumn = new AdvancedDataGridColumn("Veeranistan");
				public  var pareestan:AdvancedDataGridColumn = new AdvancedDataGridColumn("Pareestan");
				public  var licenses:AdvancedDataGridColumn = new AdvancedDataGridColumn("Licenses");
				public var countries:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
				public var toplevel:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
				[Bindable]
				public var hierarch_data:Array = [ 
				
				{ feature:"ADG", children:[ 
				{ feature:"ADG", subFeature:"Multi column sorting", startDate:{day:"Monday", Year:2007},
endDate:"1/07/07" },
				{ feature:"ADG", subFeature:"Custom rows", startDate:{day:"Monday", Year:2009}, endDate:"01/18/07"
},
				{ feature:"ADG", subFeature:"Tree Views", startDate:{day:"Monday", Year:2006}, endDate:"01/29/07"
}, 
				{ feature:"ADG", subFeature:"Collections", startDate:{day:"Monday", Year:2004},  endDate:"04/25/07"
}
				] }
				
				];
				
				[Bindable]
				private var mydata:ArrayCollection = new ArrayCollection ([
				{Company:"Adobe", Quarter:1, India:"2 million", Veeranistan:"2 million", Pareestan:"3
million", Licenses:433764538},
				{Company:"IBM", Quarter:1, India:"9 million", Veeranistan:"1 million", Pareestan:"5 million",
Licenses:456789002},
				{Company:"KaashifSoft", Quarter:1, India:"99 million", Veeranistan:"99 million", Pareestan:"99
million", Licenses:456712340},
				{Company:"NisheetSoft", Quarter:1, India:"0 million", Veeranistan:"0 million", Pareestan:"0
million", Licenses:456782313},
				{Company:"Microsoft", Quarter:1, India:"6 million", Veeranistan:"5 million", Pareestan:"6
million", Licenses:354216789},
				{Company:"Satyam", Quarter:1, India:"1 million", Veeranistan:"3 million", Pareestan:"2
million", Licenses:325146789},
				{Company:"Subex", Quarter:1, India:"2 million", Veeranistan:"9 million", Pareestan:"1
million", Licenses:321456978},
				{Company:"Infosys", Quarter:1, India:"0.89 million", Veeranistan:"12 million", Pareestan:"4.5
million", Licenses:321475689},        
				{Company:"MCAfee", Quarter:1, India:"3 million", Veeranistan:"5.98 million", Pareestan:"6.2
million", Licenses:321467589},
				{Company:"MPhasis", Quarter:1, India:"2 million", Veeranistan:"1.5 million", Pareestan:"6.7
million", Licenses:123456789},
				{Company:"Symphony", Quarter:1, India:"3.4 million", Veeranistan:"6.1 million", Pareestan:"7.8
million", Licenses:341256789},
				{Company:"Wipro", Quarter:1, India:"5 million", Veeranistan:"2 million", Pareestan:"7
million", Licenses:321654789},
				{Company:"Google", Quarter:1, India:"3 million", Veeranistan:"4 million", Pareestan:"1
million", Licenses:321458769 } ]);
				
				public function createColumnGroups():void {		
					countries.headerText="Countries";
					
					toplevel.headerText="Top Level";
					
					var countriesarr:Array = new Array();
					var toplevelarr:Array = new Array();
					countriesarr.push(india);
					countriesarr.push(pareestan);
					countriesarr.push(veeranistan);
					toplevelarr.push(quarters);
					mydatagrid.dataProvider=mydata;
					countries.children = countriesarr;
					toplevelarr.push(countries);
					toplevel.children=toplevelarr;
					mydatagrid.groupedColumns=[companies, toplevel, licenses]; 
					mydatagrid.dataProvider.refresh();
					companies.dataField="Company";
					quarters.dataField="Quarter";
					licenses.dataField="Licenses";
				}
				
				public function groupedData():void {
					var mygroup:GroupingCollection2 = new GroupingCollection2();
					mygroup.source=mydata;
					var group:Grouping = new Grouping();
					group.fields = [new GroupingField("Company"), new GroupingField("Licenses")];
					group.label = "Company";
					mygroup.grouping = group; 
					mygroup.refresh();
					mydatagrid.dataProvider = mygroup;
					mydatagrid.validateNow();
				}
				
				public function insertColumns():void {			
					var mycols:AdvancedDataGridColumn = new AdvancedDataGridColumn("ggg");
					var mycolsarr:Array = mydatagrid.groupedColumns;
					mycolsarr.push(mycols);
					mydatagrid.groupedColumns = mycolsarr;
				}
				
				public function insertColumngroups():void
				{
					var mycolgroup:AdvancedDataGridColumnGroup = new AdvancedDataGridColumnGroup();
					mycolgroup.headerText = "topmost ";
					var mycolsarr:Array = new Array(mydatagrid.groupedColumns[0]);
					mycolgroup.children = mycolsarr;            
					var tempCols:Array = mydatagrid.groupedColumns.slice(1,mydatagrid.groupedColumns.length);

					mydatagrid.groupedColumns = [mycolgroup].concat(tempCols); 			
				}
				
				public function hierarchicaldata_setter():void {
					var hierarchs:HierarchicalData = new HierarchicalData();
					hierarchs.source = hierarch_data;
					mydatagrid..dataProvider = hierarchs;
					companies.dataField = "feature";    
					quarters.dataField = "subFeature";
					licenses.dataField = "endDate";
				}
				
				public function vrHeight():void {				
					for(var i:int=0;i<20;i++)
					{
						var rnd:* = Math.random();
						var obj:Object = {Company:"column-A0",Quarter:"column-B"+rnd,India:"column-C"+rnd,Veeranistan:"Column-D"+rnd,Pareestan:"Column-E"+rnd,Licenses:"Column-F"+rnd}
						ac.addItem(obj);
					}
					
					mydatagrid.dataProvider = ac;
					mydatagrid.variableRowHeight = true;
					mydatagrid.wordWrap = true;
				}
				
				public function headerRenderer():void {
					countries.headerRenderer = new ClassFactory(mx.controls.NumericStepper);
					toplevel.headerRenderer = new ClassFactory(mx.controls.TextArea);
					quarters.headerRenderer = new ClassFactory(mx.controls.TextInput);			
				}
				
				public function customHeaderRenderer():void {
					//toplevel.headerRenderer = new ClassFactory(myheads);		
				}
				
				public function visibleColumns():void {
					toplevel.visible = false;
				}
				
				public function headerSkin():void {
					//StyleManager.getStyleDeclaration("AdvancedDataGrid").setStyle("headerHorizontalSeparatorSkin",myhorskin);
				}
				
				public function myStyleFunction(data:Object,col:AdvancedDataGridColumn):Object       
  {
					return { color:0xFF0000};
				}
				
				public function myFormatting():void {				
					mydatagrid.styleFunction = myStyleFunction;
					mydata.refresh();
					var forms:CurrencyFormatter = new CurrencyFormatter();
					forms.currencySymbol = "$";
					createColumnGroups();
					licenses.formatter = forms;
					mydatagrid.dataProvider.refresh();			
				}
				
				public function myColumnSpan():void {			
					var renders:AdvancedDataGridRendererProvider = new AdvancedDataGridRendererProvider();
     
					renders.column = companies;
					var renderarr:Array = new Array();
					renders.dataField = "Company";
					renders.columnSpan = 2;
					renders.renderer = new ClassFactory(mx.controls.NumericStepper);
					renderarr.push(renders);
					mydatagrid.rendererProviders = renderarr;
				}
				
				public function generateXML():void {			
					mydatagrid.dataProvider = comps;
				}
		
			
		]]>
	</fx:Script>
	<fx:Declarations>
		<fx:XMLList id="comps">
			<companylist>
				<Company>AalishaanSoft</Company>
				<Quarter> 1 </Quarter>
				<India>34 million</India>
				<Veeranistan>1.5 million</Veeranistan>
				<Pareestan>5 million</Pareestan>
				<Licenses>321475987</Licenses>
			</companylist>
			<companylist>
				<Company>MughaleAzamSoft</Company>
				<Quarter> 1 </Quarter>
				<India>3.4 million</India>
				<Veeranistan>2 million</Veeranistan>
				<Pareestan>5.4 million</Pareestan>
				<Licenses>321475987</Licenses>
			</companylist>
			<companylist>
				<Company>SheeshMahalSoft</Company>
				<Quarter> 1 </Quarter>
				<India>45 million</India>
				<Veeranistan>15 million</Veeranistan>
				<Pareestan>5.1 million</Pareestan>
				<Licenses>321745987</Licenses>
			</companylist>
			<companylist>
				<Company>AjnabeeSoft</Company>  
				<Quarter> 1 </Quarter> 
				<India>14 million</India>
				<Veeranistan>11 million</Veeranistan> 
				<Pareestan>5.7 million</Pareestan>
				<Licenses>321479587</Licenses>
			</companylist>
		</fx:XMLList>
	</fx:Declarations>
	<mx:Canvas id="box" width="100%" height="100%">
		<mx:AdvancedDataGrid id="mydatagrid" layoutDirection="rtl" />
	</mx:Canvas>
	<mx:TextInput id="ti"/>
</mx:Application>


Thanks,
Justin




Mime
View raw message