Changeset 8591


Ignore:
Timestamp:
2004-11-18T10:10:57+13:00 (19 years ago)
Author:
mdewsnip
Message:

Removed some dead code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Dictionary.java

    r8236 r8591  
    240240    if (component != null) {
    241241        // 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));
    245243    }
    246244    }
     
    251249    if (component != null) {
    252250        // 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)));
    256252    }
    257253    }
     
    261257    {
    262258    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));
    285261    }
    286262    }
     
    290266    implements Runnable {
    291267
    292     private Component component;
     268    private Component component = null;
    293269    private String text = null;
    294270    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     }
    308271
    309272
Note: See TracChangeset for help on using the changeset viewer.