- Timestamp:
- 2006-09-21T17:22:44+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/OptionsPane.java
r12305 r12822 72 72 static private int IMPORT = 1; 73 73 static private int MINIMUM_ROWS = 11; 74 74 75 75 /** All process messages are written to this log text area. */ 76 76 public JTextArea log_textarea = null; … … 138 138 } 139 139 current_controls.addAll(build_arguments); 140 140 141 // Now that we know how many arguments there are we can build the pane to view them on. Modes lower than EXPERT can provide a previous pane on which to add the arguments. 141 142 if(pane == null || current_mode >= Configuration.EXPERT_MODE) { … … 144 145 pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 145 146 int argument_count = build_arguments.size(); 146 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number o rlines in the grid layout147 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number of lines in the grid layout 147 148 if(current_mode >= Configuration.EXPERT_MODE) { 148 149 if(argument_count < MINIMUM_ROWS) { … … 153 154 // Otherwise we're just going to throw them on one after another and chuck it in a scroll pane anyway 154 155 else { 155 pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); 156 } 157 } 156 // use GridLayout with 0 rows == as many rows as needed. Unfortunately, rows will 157 // grow fat if space too large, but we don't know how many rows we'll need yet. 158 pane.setLayout(new GridLayout(0, 1, 5, 5)); 159 } 160 } 161 158 162 for(int j = 0; j < build_arguments.size(); j++) { 159 163 pane.add((JComponent)build_arguments.get(j)); … … 203 207 pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5)); 204 208 pane.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 205 int argument_count = import_arguments.size(); 206 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number o rlines in the grid layout209 int argument_count = import_arguments.size(); 210 // If in any of the higher detail modes, and assuming we don't want super phat argument controls, we better ensure there is a minimum number of lines in the grid layout 207 211 if(current_mode >= Configuration.EXPERT_MODE) { 208 212 if(argument_count < MINIMUM_ROWS) { … … 213 217 // Otherwise we're just going to throw them on one after another and chuck it in a scroll pane anyway 214 218 else { 215 pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); 216 } 217 } 219 // use GridLayout with 0 rows == as many rows as needed. Unfortunately, rows will 220 // grow fat if space too large, but we don't know how many rows we'll need yet. 221 pane.setLayout(new GridLayout(0, 1, 5, 5)); 222 } 223 } 224 218 225 for(int j = 0; j < import_arguments.size(); j++) { 219 226 pane.add((JComponent)import_arguments.get(j));
Note:
See TracChangeset
for help on using the changeset viewer.