Ignore:
Timestamp:
2005-06-03T15:36:09+12:00 (19 years ago)
Author:
mdewsnip
Message:

Removed the last of the graphical functions from the Utility class -- meaning that it can now be used by server-side programs for the GLI applet.

Location:
trunk/gli/src/org/greenstone/gatherer/gui
Files:
2 edited

Legend:

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

    r9243 r10012  
    4444import org.greenstone.gatherer.Dictionary;
    4545import org.greenstone.gatherer.Gatherer;
     46import org.greenstone.gatherer.util.JarTools;
    4647import org.greenstone.gatherer.util.Utility;
    4748
     
    5152 */
    5253public class MenuBar
    53     extends JMenuBar {
     54    extends JMenuBar
     55{
     56    static public ImageIcon BLANK_ICON = JarTools.getImage("blank.gif");
     57    static public ImageIcon HELP_ICON = JarTools.getImage("help.gif");
     58
    5459    /** The icon to be displayed alongside the context choosen help file. */
    5560    private int current_tab          = -1;
     
    180185    // Help menu
    181186    help = new JMenu();
    182     help.setIcon(Utility.HELP_ICON);
     187    help.setIcon(HELP_ICON);
    183188    Dictionary.setText(help, "Menu.Help");
    184189
     
    187192    Dictionary.registerText(help_general, "Source.General");
    188193
    189     help_download = new JMenuItem(Utility.BLANK_ICON);
     194    help_download = new JMenuItem(BLANK_ICON);
    190195    help_download.addActionListener(Gatherer.g_man);
    191196    Dictionary.registerText(help_download, "GUI.Download");
    192197
    193     help_gather = new JMenuItem(Utility.BLANK_ICON);
     198    help_gather = new JMenuItem(BLANK_ICON);
    194199    help_gather.addActionListener(Gatherer.g_man);
    195200    Dictionary.registerText(help_gather, "GUI.Gather");
    196201
    197     help_enrich = new JMenuItem(Utility.BLANK_ICON);
     202    help_enrich = new JMenuItem(BLANK_ICON);
    198203    help_enrich.addActionListener(Gatherer.g_man);
    199204    Dictionary.registerText(help_enrich, "GUI.Enrich");
    200205
    201     help_design = new JMenuItem(Utility.BLANK_ICON);
     206    help_design = new JMenuItem(BLANK_ICON);
    202207    help_design.addActionListener(Gatherer.g_man);
    203208    Dictionary.registerText(help_design, "GUI.Design");
    204209
    205     help_create = new JMenuItem(Utility.BLANK_ICON);
     210    help_create = new JMenuItem(BLANK_ICON);
    206211    help_create.addActionListener(Gatherer.g_man);
    207212    Dictionary.registerText(help_create, "GUI.Create");
     
    265270        selected = help.getItem(current_tab);
    266271        if(selected != null) {
    267         selected.setIcon(Utility.BLANK_ICON);
     272        selected.setIcon(BLANK_ICON);
    268273        }
    269274    }
     
    271276    selected = help.getItem(current_tab);
    272277    if(selected != null) {
    273         selected.setIcon(Utility.HELP_ICON);
     278        selected.setIcon(HELP_ICON);
    274279    }
    275280    selected = null;
  • trunk/gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java

    r8579 r10012  
    55import javax.swing.*;
    66import org.greenstone.gatherer.Dictionary;
    7 import org.greenstone.gatherer.util.Utility;
     7import org.greenstone.gatherer.util.JarTools;
    88
    99public class SimpleMenuBar
     
    1616    this.page_name = page_name;
    1717    JMenu help = new JMenu();
    18     help.setIcon(Utility.HELP_ICON);
     18    help.setIcon(JarTools.getImage("help.gif"));
    1919    Dictionary.setText(help, "Menu.Help");
    2020
Note: See TracChangeset for help on using the changeset viewer.