- Timestamp:
- 08/28/12 16:34:11 (13 years ago)
- 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 21 21 private var editedExperiment : ExperimentProperties; 22 22 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 23 45 public function isFormValid() : Boolean 24 46 { 47 var valid : Boolean = true; 25 48 validateNetworkFile(); 26 49 validateResourceFile(); 27 50 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); 32 54 if ( (workloadFile.text == null || workloadMissingImage.visible ) && !workloadSelectedCB.selected) return false; 33 55 if ( (resourceDescriptionFile.text == null || resourceMissingImage.visible ) && !resourceSelectedCB.selected) return false; 34 56 if ( topologyCB.selected && (networkTopologyFile.text == null || topologyMissingImage.visible ) && !topologySelectedCB.selected) return false; 35 return true;57 return valid; 36 58 } 37 59
Note: See TracChangeset
for help on using the changeset viewer.