Changeset 8591
- Timestamp:
- 2004-11-18T10:10:57+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r8236 r8591 240 240 if (component != null) { 241 241 // Update the component using the AWTEvent queue 242 ComponentDetails details = new ComponentDetails(true, text_key, args, false, null); 243 ComponentUpdateTask task = new ComponentUpdateTask(component, details); 244 SwingUtilities.invokeLater(task); 242 SwingUtilities.invokeLater(new ComponentUpdateTask(component, get(text_key, args), null)); 245 243 } 246 244 } … … 251 249 if (component != null) { 252 250 // Update the component using the AWTEvent queue 253 ComponentDetails details = new ComponentDetails(false, null, null, true, tooltip_key); 254 ComponentUpdateTask task = new ComponentUpdateTask(component, details); 255 SwingUtilities.invokeLater(task); 251 SwingUtilities.invokeLater(new ComponentUpdateTask(component, null, get(tooltip_key))); 256 252 } 257 253 } … … 261 257 { 262 258 if (component != null) { 263 ComponentUpdateTask task = new ComponentUpdateTask(component, null, tooltip); 264 SwingUtilities.invokeLater(task); 265 } 266 } 267 268 269 static private class ComponentDetails 270 { 271 public boolean has_text; 272 public String text_key; 273 public String[] text_args; 274 public boolean has_tooltip; 275 public String tooltip_key; 276 277 public ComponentDetails(boolean has_text, String text_key, String[] text_args, 278 boolean has_tooltip, String tooltip_key) 279 { 280 this.has_text = has_text; 281 this.text_key = text_key; 282 this.text_args = text_args; 283 this.has_tooltip = has_tooltip; 284 this.tooltip_key = tooltip_key; 259 // Update the component using the AWTEvent queue 260 SwingUtilities.invokeLater(new ComponentUpdateTask(component, null, tooltip)); 285 261 } 286 262 } … … 290 266 implements Runnable { 291 267 292 private Component component ;268 private Component component = null; 293 269 private String text = null; 294 270 private String tooltip = null; 295 296 297 public ComponentUpdateTask(Component component, ComponentDetails details)298 {299 this.component = component;300 301 if (details.has_text) {302 text = get(details.text_key, details.text_args);303 }304 if (details.has_tooltip) {305 tooltip = get(details.tooltip_key, (String[]) null);306 }307 }308 271 309 272
Note:
See TracChangeset
for help on using the changeset viewer.