Changeset 5593 for trunk/gli/src/org/greenstone/gatherer/Dictionary.java
- Timestamp:
- 2003-10-07T15:35:23+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/Dictionary.java
r5571 r5593 229 229 230 230 231 static public String newget(String key)232 { 233 return self. get(key);234 } 235 236 237 static public String newget(String key, String arg)231 static public String get(String key) 232 { 233 return self.oldget(key); 234 } 235 236 237 static public String get(String key, String arg) 238 238 { 239 239 String[] args = new String[1]; 240 240 args[0] = arg; 241 return self. get(key, args);242 } 243 244 245 static public String newget(String key, String[] args)246 { 247 return self. get(key, args);241 return self.oldget(key, args); 242 } 243 244 245 static public String get(String key, String[] args) 246 { 247 return self.oldget(key, args); 248 248 } 249 249 … … 255 255 * @return A <strong>String</strong> which has been referenced by the key String and that either contains no argument fields, or has had the argument fields automatiically populated with formatting Strings of with argument String provided in the get call. 256 256 */ 257 public String get(String key) { 258 return get(key, (String[])null); 259 } 257 public String oldget(String key) { 258 return oldget(key, (String[])null); 259 } 260 260 261 /** 261 262 * @deprecated 262 263 * Convienence method with transforms the second string argument into a string array. */ 263 public String get(String key, String arg) {264 public String oldget(String key, String arg) { 264 265 String[] args = new String[1]; 265 266 args[0] = arg; 266 return get(key, args);267 return oldget(key, args); 267 268 } 268 269 … … 273 274 * @return A <strong>String</strong> which has been referenced by the key String and that either contains no argument fields, or has had the argument fields automatiically populated with formatting Strings of with argument String provided in the get call. 274 275 */ 275 public String get(String key, String args[]) {276 public String oldget(String key, String args[]) { 276 277 if(key_list != null) { 277 278 synchronized(this) { … … 310 311 f_subargs[0] = "Arial"; 311 312 } 312 complete = complete + get("Farg" + arg_num, f_subargs);313 complete = complete + oldget("Farg" + arg_num, f_subargs); 313 314 } 314 315 } … … 452 453 453 454 if (details.has_text) { 454 text = self. get(details.text_key, details.text_args);455 text = self.oldget(details.text_key, details.text_args); 455 456 } 456 457 if (details.has_tooltip) { 457 tooltip = self. get(details.tooltip_key, (String[]) null);458 tooltip = self.oldget(details.tooltip_key, (String[]) null); 458 459 } 459 460 } … … 496 497 497 498 /** 498 * @deprecated 499 * Register a tab pane component. */ 499 * Register a tab pane component. This will be deprecated eventually. */ 500 500 static public void register(JTabbedPane component) 501 501 { 502 if (component != null) {502 if (component != null) { 503 503 String[] args = new String[component.getTabCount()]; 504 504 505 505 // Iterate through the tabbed panes tabs, updating values and recording the original key of each item in args. 506 for (int i = 0; i < args.length; i++) {506 for (int i = 0; i < args.length; i++) { 507 507 if (args[i] == null) { 508 508 args[i] = component.getTitleAt(i); 509 509 } 510 String value = self. get(args[i], (String[])null);511 String tooltip = self. get(args[i] + "_Tooltip", (String[])null);512 JTabbedPaneChangeTask task = new JTabbedPaneChangeTask(component, args[i],i, value, tooltip);510 String value = self.oldget(args[i], (String[]) null); 511 String tooltip = self.oldget(args[i] + "_Tooltip", (String[]) null); 512 JTabbedPaneChangeTask task = new JTabbedPaneChangeTask(component, i, value, tooltip); 513 513 SwingUtilities.invokeLater(task); 514 514 } … … 520 520 static private class JTabbedPaneChangeTask 521 521 implements Runnable { 522 protected String key; 523 pr otected String value;522 523 private JTabbedPane component; 524 524 private int index; 525 private JTabbedPane component;525 private String value; 526 526 private String tooltip; 527 527 528 public JTabbedPaneChangeTask(JTabbedPane component, String key, int index, String value, String tooltip) { 529 this.key = key; 530 this.value = value; 528 public JTabbedPaneChangeTask(JTabbedPane component, int index, String value, String tooltip) { 531 529 this.component = component; 532 530 this.index = index; 531 this.value = value; 533 532 this.tooltip = tooltip; 534 533 } 534 535 535 public void run() { 536 536 component.setTitleAt(index, value); 537 if(!tooltip.equals(key+"_Tooltip")) { 538 component.setToolTipTextAt(index, tooltip); 539 } 540 else { 541 component.setToolTipTextAt(index, null); 542 } 537 component.setToolTipTextAt(index, tooltip); 543 538 } 544 539 }
Note:
See TracChangeset
for help on using the changeset viewer.