Changeset 13060
- Timestamp:
- 2006-10-10T11:48:50+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
r13026 r13060 71 71 extends JPanel { 72 72 73 /** The threshold for when the advanced options get added */74 static private final int THRESHOLD = Configuration.SYSTEMS_MODE;75 73 static final private Dimension LABEL_SIZE = new Dimension(225, 25); 76 74 static final private Dimension TREE_SIZE = new Dimension(150, 500); … … 79 77 private boolean download_button_enabled = false; 80 78 private boolean ready = false; 81 private int current_mode;82 79 83 80 private JPanel options_pane; … … 184 181 185 182 /** System Utilities */ 186 public void modeChanged(int mode) { 187 int old_mode = current_mode; 188 current_mode = mode; 189 if (old_mode >= THRESHOLD && current_mode >= THRESHOLD) { 190 return; 191 } 192 if (old_mode < THRESHOLD && current_mode < THRESHOLD) { 193 return; 194 } 195 if (current_mode >= THRESHOLD) { 196 System.out.println("current mode is greater then Threshold!!"); 197 } 198 else { 199 System.out.println("current mode is smaller then Threshold!!"); 200 } 183 public void modeChanged(int gli_mode) { 184 // do nothing at this stage - should we be renewing download options?? 201 185 } 202 186 … … 340 324 341 325 /** Generate Controls for Options */ 326 /* at some stage we should think about which options should be shown for 327 * different modes. Currently, always show all options (unless hidden)*/ 342 328 private void generateOptions(JPanel options_pane, ArgumentContainer data) { 343 329 options_pane.removeAll(); … … 352 338 353 339 if (argument.isHiddenGLI()) continue; 354 if(mode > Configuration.LIBRARIAN_MODE || !(argument.getType() == Argument.REGEXP)) { 355 ArgumentControl argument_control = new ArgumentControl(argument,false,null); 356 added_arguments.add(argument_control); 357 } 358 } 340 ArgumentControl argument_control = new ArgumentControl(argument,false,null); 341 added_arguments.add(argument_control); 342 } 343 359 344 360 345 options_pane.setLayout(new GridLayout(added_arguments.size(),1));
Note:
See TracChangeset
for help on using the changeset viewer.