Changeset 4928 for trunk/gli/src/org/greenstone/gatherer/Dictionary.java
- Timestamp:
- 2003-07-15T13:37:35+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r4675 r4928 216 216 public void register(AbstractButton component, String[] args, boolean already_registered) { 217 217 if(component != null) { 218 218 // Determine the key 219 219 String key = ""; 220 220 if(!already_registered) { … … 224 224 key = args[args.length - 1]; 225 225 } 226 226 // Update the component using the AWTEvent queue 227 227 String value = get(key, args); 228 228 String tooltip = get(key + "_Tooltip", (String[])null); 229 229 ChangeTask task = new AbstractButtonChangeTask(component, key, value, tooltip); 230 230 SwingUtilities.invokeLater(task); 231 231 // Register as necessary 232 232 if(!already_registered) { 233 233 args = ArrayTools.add(args, key); … … 239 239 public void register(JComboBox component, String[] args, boolean already_registered) { 240 240 if(component != null) { 241 241 // If not already registered then args will be null. 242 242 if(!already_registered) { 243 243 args = new String[component.getItemCount()]; 244 244 } 245 245 // Retrieve the tooltip. The key is mostly derived from the comboboxes name. 246 246 String key = component.getName(); 247 247 String tooltip = get(key + "_Tooltip", (String[])null); 248 248 ChangeTask task = new JComboBoxChangeTask(component, key, -1, tooltip); 249 249 SwingUtilities.invokeLater(task); 250 250 // Iterate through the combobox, updating values and recording the original key of each item in args. 251 251 for(int i = 0; i < args.length; i++) { 252 252 if(args[i] == null) {
Note:
See TracChangeset
for help on using the changeset viewer.