Ignore:
Timestamp:
08/24/11 14:47:39 (14 years ago)
Author:
mcichenski
Message:

initialization for gannt chart subcomponent

Location:
gssim_ui/branches/vine/gssimstudio/src/web/ui/flex
Files:
4 added
6 edited

Legend:

Unmodified
Added
Removed
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudioModel.as

    r15 r22  
    2121                public var comparisonComponents : Object; 
    2222                public var resourceChartComponents:Object; 
     23                public var ganntChartComponents:Object; 
    2324                 
    2425                public var experimentList:ArrayCollection; 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/editors/archive/ExperimentStatisticsWindow.mxml

    r15 r22  
    1212<fx:Script> 
    1313        <![CDATA[ 
     14                import gssim.gssimstudio.editor.charts.GanntChart; 
    1415                import gssim.gssimstudio.editor.charts.ResourceChart; 
    1516                import gssim.gssimstudio.editor.charts.ResourceChartModel; 
     
    4546                        resourceChart.addChild(viewer); 
    4647                        //parentApplication.bindSubmodel(viewer, 'model', parentApplication.gsSimStudioModel, 'resourceChartComponents', '' + i); 
     48                         
     49                        var gannt : GanntChart = new GanntChart(); 
     50                        gannt.expId = i; 
     51                        gannt.expName = experiment.name; 
     52                        gannt.service = new VineRemoteObjectProxy(parentApplication.service, i); 
     53                        ganntChart.addChild(gannt); 
    4754                } 
    4855                 
     
    115122                                <!--<charts:ResourceViewer width="100%" height="100%" />--> 
    116123                        </mx:VBox> 
     124                        <mx:VBox width="100%" height="100%" id="ganntChart" label="{resourceManager.getString('ArchiveViewer', 'Task')}"> 
     125                        </mx:VBox> 
    117126                        <!-- 
    118                         <mx:VBox width="100%" height="100%" id="taskChart" label="{resourceManager.getString('ArchiveViewer', 'Task')}"> 
    119                                 <charts:ScheduleViewer width="100%" height="100%" /> 
    120                                 <mx:Label text="task chart"/> 
    121                         </mx:VBox> 
    122127                        <mx:VBox width="100%" height="100%" id="lineChart" label="{resourceManager.getString('ArchiveViewer', 'Line')}"> 
    123128                                <charts:ScheduleViewer width="100%" height="100%" /> 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java

    r19 r22  
    851851        @BlazeDsMethod() 
    852852        public GSSimStudioModel setSelectedResourceIndex(int index, Integer res) { 
    853                 return delegate(new Object[]{res}, index); 
     853                return delegateResource(new Object[]{res}, index); 
    854854        } 
    855855         
     
    857857        public GSSimStudioModel getResourcesFromDb(int index, Integer expId, String name, 
    858858                        String type) { 
    859                 return delegate(new Object[]{expId, name, type}, index); 
     859                return delegateResource(new Object[]{expId, name, type}, index); 
    860860        } 
    861861         
     
    863863        public GSSimStudioModel getResourceAllTimelineFromDb(int index, Integer resourceId, Integer expId, 
    864864                        Long minTimestampMilis, Long maxTimestampMilis) { 
    865                 return delegate(new Object[]{resourceId, expId, minTimestampMilis, maxTimestampMilis}, index); 
     865                return delegateResource(new Object[]{resourceId, expId, minTimestampMilis, maxTimestampMilis}, index); 
    866866        } 
    867867 
     
    869869        public GSSimStudioModel getResourceEnTimelineFromDb(int index, Integer resourceId, Integer expId, 
    870870                        Long minTimestampMilis, Long maxTimestampMilis) { 
    871                 return delegate(new Object[]{resourceId, expId, minTimestampMilis, maxTimestampMilis}, index); 
     871                return delegateResource(new Object[]{resourceId, expId, minTimestampMilis, maxTimestampMilis}, index); 
    872872        } 
    873873         
    874874        @BlazeDsMethod() 
    875875        public GSSimStudioModel getExperimentConfiguration(int index, Integer expId) { 
    876                 return delegate(new Object[]{expId}, index); 
    877         } 
    878          
    879         protected GSSimStudioModel delegate(Object[] parameters, Integer index) { 
     876                return delegateResource(new Object[]{expId}, index); 
     877        } 
     878         
     879        protected GSSimStudioModel delegateResource(Object[] parameters, Integer index) { 
    880880                GSSimStudioModel gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel(); 
    881881                gssimStudioModel.setExperimentListChanged(false); 
     
    910910        } 
    911911        VineFlexUtilClass.invokeDestination(ExperimentComparisonChart.class, parameters, experimentComparisonChartModel); 
     912        return gssimStudioModel; 
     913    } 
     914         
     915        @BlazeDsMethod() 
     916        public GSSimStudioModel getTasksAllocationsFromDb(int index, Integer expId) { 
     917                return delegateGannt(new Object[]{expId}, index); 
     918        } 
     919         
     920        protected GSSimStudioModel delegateGannt(Object[] parameters, Integer index) { 
     921                GSSimStudioModel gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel(); 
     922                gssimStudioModel.setExperimentListChanged(false); 
     923        GanntChartModel ganntChartModel = (GanntChartModel) gssimStudioModel.getGanntChartComponents().get(index.toString()); 
     924        if (ganntChartModel == null) 
     925        { 
     926                ganntChartModel = new GanntChartModel(); 
     927                gssimStudioModel.getResourceChartComponents().put(index.toString(), ganntChartModel); 
     928        } 
     929        VineFlexUtilClass.invokeDestination(GanntChart.class, parameters, ganntChartModel); 
    912930        return gssimStudioModel; 
    913931    } 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudioModel.java

    r15 r22  
    5858    public void setResourceChartComponents(HashMap resourceChartComponents) { 
    5959        this.resourceChartComponents = resourceChartComponents; 
     60    } 
     61     
     62    private HashMap ganntChartComponents = new HashMap(); 
     63     
     64    public HashMap getGanntChartComponents() { 
     65        return ganntChartComponents; 
     66    } 
     67 
     68    public void setGanntChartComponents(HashMap ganntChartComponents) { 
     69        this.ganntChartComponents = ganntChartComponents; 
    6070    } 
    6171     
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/Charts.properties

    r15 r22  
    3232SumType=Sum 
    3333Aggregate=Aggregated 
     34GanntChartTitle=Task Allocation Chart for Grid Scheduling Simulator 
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/Charts.properties

    r15 r22  
    3232SumType=Suma 
    3333Aggregate=Sumaryczny 
     34GanntChartTitle=Wykres alokacji zadań dla Grid Scheduling Simulator 
Note: See TracChangeset for help on using the changeset viewer.