- Timestamp:
- 2005-02-22T15:40:26+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r9045 r9137 49 49 import org.greenstone.gatherer.Gatherer; 50 50 import org.greenstone.gatherer.cdm.Argument; 51 import org.greenstone.gatherer.collection. BuildOptions;51 import org.greenstone.gatherer.collection.ScriptOptions; 52 52 import org.greenstone.gatherer.collection.Collection; 53 53 import org.greenstone.gatherer.collection.CollectionManager; … … 83 83 private ArrayList current_controls; 84 84 85 /** The <strong>BuildOptions</strong> data object contains all the option settings we wish to persist between Gatherer sessions (and thus is stored in <strong>Collection</strong>). */ 86 private BuildOptions build_options = null; 85 /** The <strong>ScriptOptions</strong> data object contains all the option settings we wish to persist between Gatherer sessions (and thus is stored in <strong>Collection</strong>). */ 86 private ScriptOptions build_options = null; 87 private ScriptOptions import_options = null; 87 88 88 89 private FileEntry file_entry = null; … … 96 97 97 98 /** The default constructor creates the few session length options, but either retrieves the rest from the current collection, or creates a default set of options. */ 98 public OptionsPane( BuildOptions build_options) {99 public OptionsPane(ScriptOptions import_options, ScriptOptions build_options) { 99 100 this.build_options = build_options; 101 this.import_options = import_options; 100 102 this.current_controls = new ArrayList(); 101 103 this.writing_documents = new Vector(); … … 127 129 ArrayList build_arguments = new ArrayList(); 128 130 int current_mode = Configuration.getMode(); 129 int total_build_argument_count = build_options.getBuildArgumentCount(); 131 int total_build_argument_count = build_options.getArgumentCount(); 132 130 133 for(int i = 0; i < total_build_argument_count; i++) { 131 134 // Retrieve the argument so we know how to format the control. 132 Argument argument = build_options.get BuildArgument(i);135 Argument argument = build_options.getArgument(i); 133 136 if(!argument.isHiddenGLI() && argument.getModeLevel() <= current_mode) { 134 137 // Now attempt to retrieve any existing value for this argument. 135 boolean enabled = build_options.get BuildValueEnabled(argument.getName());136 String value = build_options.get BuildValue(argument.getName());138 boolean enabled = build_options.getValueEnabled(argument.getName()); 139 String value = build_options.getValue(argument.getName()); 137 140 ArgumentControl argument_control = new ArgumentControl(BUILD, argument, enabled, value); 138 141 build_arguments.add(argument_control); … … 187 190 ArrayList import_arguments = new ArrayList(); 188 191 int current_mode = Configuration.getMode(); 189 int total_import_argument_count = build_options.getImportArgumentCount();192 int total_import_argument_count = import_options.getArgumentCount(); 190 193 for(int i = 0; i < total_import_argument_count; i++) { 191 194 // Retrieve the argument so we know how to format the control. 192 Argument argument = build_options.getImportArgument(i);195 Argument argument = import_options.getArgument(i); 193 196 if(!argument.isHiddenGLI() && argument.getModeLevel() <= current_mode) { 194 197 // Now attempt to retrieve any existing value for this argument. 195 boolean enabled = build_options.getImportValueEnabled(argument.getName());196 String value = build_options.getImportValue(argument.getName());198 boolean enabled = import_options.getValueEnabled(argument.getName()); 199 String value = import_options.getValue(argument.getName()); 197 200 ArgumentControl argument_control = new ArgumentControl(IMPORT, argument, enabled, value); 198 201 import_arguments.add(argument_control); … … 573 576 if(!enable && value == null) { 574 577 if(type == BUILD) { 575 build_options.remove BuildValue(name);578 build_options.removeValue(name); 576 579 } 577 580 else { 578 build_options.removeImportValue(name);581 import_options.removeValue(name); 579 582 } 580 583 } … … 582 585 else { 583 586 if(type == BUILD) { 584 build_options.set BuildValue(name, enable, value);587 build_options.setValue(name, enable, value); 585 588 } 586 589 else { 587 build_options.setImportValue(name, enable, value);590 import_options.setValue(name, enable, value); 588 591 } 589 592 }
Note:
See TracChangeset
for help on using the changeset viewer.