Changeset 435 for gssim_ui


Ignore:
Timestamp:
08/28/12 16:34:11 (13 years ago)
Author:
mcichenski
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/gssim/editors/experiment/ExperimentPropertiesPanel.mxml

    r419 r435  
    2121                        private var editedExperiment : ExperimentProperties; 
    2222                         
     23                        private function checkField(object : TextInput) : Boolean 
     24                        { 
     25                                if (object.text == null || object.text == "") 
     26                                { 
     27                                        object.setStyle("borderColor", 0xFF0000); 
     28                                        return false;    
     29                                } 
     30                                object.setStyle("borderColor", 0x0B333C); 
     31                                return true; 
     32                        } 
     33                         
     34                        private function checkCombo(object : ComboBox) : Boolean 
     35                        { 
     36                                if (object.selectedItem.label == null || object.selectedItem.label == "(...)") 
     37                                { 
     38                                        object.setStyle("borderColor", 0xFF0000); 
     39                                        return false;    
     40                                } 
     41                                object.setStyle("borderColor", 0x0B333C); 
     42                                return true; 
     43                        } 
     44                         
    2345                        public function isFormValid() : Boolean 
    2446                        { 
     47                                var valid : Boolean = true; 
    2548                                validateNetworkFile(); 
    2649                                validateResourceFile(); 
    2750                                validateWorkloadFile(); 
    28                                 if (gridSchedulingPlugin.selectedItem.label == "(...)") return false; 
    29                                 if (localGridPlugin.selectedItem.label == "(...)") return false; 
    30                                 if (experimentName.text == null || experimentName.text == "") return false; 
    31                                 if (experimentRuns.value < 1) return false; 
     51                                valid = valid && checkCombo(gridSchedulingPlugin); 
     52                                valid = valid && checkCombo(localGridPlugin); 
     53                                valid = valid && checkField(experimentName); 
    3254                                if ( (workloadFile.text == null || workloadMissingImage.visible ) && !workloadSelectedCB.selected) return false; 
    3355                                if ( (resourceDescriptionFile.text == null || resourceMissingImage.visible ) && !resourceSelectedCB.selected) return false; 
    3456                                if ( topologyCB.selected && (networkTopologyFile.text == null || topologyMissingImage.visible ) && !topologySelectedCB.selected) return false; 
    35                                 return true; 
     57                                return valid; 
    3658                        } 
    3759                         
Note: See TracChangeset for help on using the changeset viewer.