Monthly Archives: March 2011

About the Gantt Chart

A Gantt chart is constructed with a horizontal axis representing the total time span of the project, broken down into increments (for example, days, weeks, or months) and a vertical axis representing the tasks that make up the project Learn … Continue reading

Rate this:

| Leave a comment

Create Spark Components in actionscript

import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.graphics.IFill; import mx.graphics.IStroke; import mx.graphics.SolidColor; import mx.graphics.Stroke; import flash.display.Graphics; import sparkcom.sparkline.*; [Bindable] public var sparkData:Array = new Array(); [Bindable] //public var sparkLine:Sparkline; public var sparkLine:ColumnSparkline; /** This is for initialize components … Continue reading

Rate this:

| Leave a comment

OO Design Patterns

Creational Design Patterns: Singleton – Ensure that only one instance of a class is created and Provide a global access point to the object. Factory(Simplified version of Factory Method) – Creates objects without exposing the instantiation logic to the client … Continue reading

Rate this:

| 3 Comments

Actionscript Event function for Dynamic Checkboxes

public function setStringData(event:Event):void{ if(event.currentTarget.selected) { selectedTables += “,” + event.currentTarget.label.toString() ; var len:int = selectedTables.length; //selectedTables = selectedTables.substr(1,len); var str:String = selectedTables.substr(0,1); var str1:String = selectedTables.substr(len,len-1); if(str == ‘,’ ){ var len:int = selectedTables.length; selectedTables = selectedTables.substr(1,len); }else if(str1 == … Continue reading

Rate this:

| Leave a comment

Flex/Actionscript Dynamic Checkbox creation with Events

private function createCheckBoxGroup(tablename:String):void { var checkBox:CheckBox; var vb:VBox; var tst:Array =new Array(); containerBox = new Box(); containerBox.id = tablename; containerBox.addEventListener(“click”, setStringData); for(var i:int =0;i<arrColumnNames.length;i++) { checkBox = new CheckBox(); checkBox.id =tablename+"Z"+ i; checkBox.label = arrColumnNames[i].toString(); var tmp:String = arrColumnNames[i].toString(); checkBox.move(200+(i*15), … Continue reading

Rate this:

| Leave a comment

Flex/Actionscript Grid Component

private function AddColumnsToDatagrid():void { dataidqGrid.removeChild(dataGrid); dataGrid = new DataGrid(); dataGrid.percentHeight=100; dataGrid.percentWidth=100; dataGrid.dataProvider =strXML.row; var cols:Array = new Array(); var i:int = 0; for(i;i<strXML.series.name.length();i++) { var dgc:DataGridColumn = new DataGridColumn(); dgc.headerText =strXML.series.name[i].@seriesName; dgc.dataField = strXML.series.name[i]; cols.push(dgc); } dataGrid.columns = cols; dataidqGrid.addChild(dataGrid); … Continue reading

Rate this:

| Leave a comment

Change Colors of the GeoMap Markers

Flex code for change colos of geomap markers: var markerOption:MarkerOptions = new MarkerOptions(); var fillStyle:FillStyle = new FillStyle({color: 0xFF0000}); markerOption.fillStyle = fillStyle;

Rate this:

| Leave a comment