Changeset 10012
- Timestamp:
- 2005-06-03T15:36:09+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java
r10006 r10012 475 475 476 476 // Help menu. Is not used! --Matthew 477 help = new JMenu();478 help.setIcon(Utility.HELP_ICON);479 Dictionary.setText(help, "Menu.Help");477 // help = new JMenu(); 478 // help.setIcon(JarTools.getImage("help.gif")); 479 // Dictionary.setText(help, "Menu.Help"); 480 480 481 481 help_help = new JMenuItem(); -
trunk/gli/src/org/greenstone/gatherer/gui/MenuBar.java
r9243 r10012 44 44 import org.greenstone.gatherer.Dictionary; 45 45 import org.greenstone.gatherer.Gatherer; 46 import org.greenstone.gatherer.util.JarTools; 46 47 import org.greenstone.gatherer.util.Utility; 47 48 … … 51 52 */ 52 53 public 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 54 59 /** The icon to be displayed alongside the context choosen help file. */ 55 60 private int current_tab = -1; … … 180 185 // Help menu 181 186 help = new JMenu(); 182 help.setIcon( Utility.HELP_ICON);187 help.setIcon(HELP_ICON); 183 188 Dictionary.setText(help, "Menu.Help"); 184 189 … … 187 192 Dictionary.registerText(help_general, "Source.General"); 188 193 189 help_download = new JMenuItem( Utility.BLANK_ICON);194 help_download = new JMenuItem(BLANK_ICON); 190 195 help_download.addActionListener(Gatherer.g_man); 191 196 Dictionary.registerText(help_download, "GUI.Download"); 192 197 193 help_gather = new JMenuItem( Utility.BLANK_ICON);198 help_gather = new JMenuItem(BLANK_ICON); 194 199 help_gather.addActionListener(Gatherer.g_man); 195 200 Dictionary.registerText(help_gather, "GUI.Gather"); 196 201 197 help_enrich = new JMenuItem( Utility.BLANK_ICON);202 help_enrich = new JMenuItem(BLANK_ICON); 198 203 help_enrich.addActionListener(Gatherer.g_man); 199 204 Dictionary.registerText(help_enrich, "GUI.Enrich"); 200 205 201 help_design = new JMenuItem( Utility.BLANK_ICON);206 help_design = new JMenuItem(BLANK_ICON); 202 207 help_design.addActionListener(Gatherer.g_man); 203 208 Dictionary.registerText(help_design, "GUI.Design"); 204 209 205 help_create = new JMenuItem( Utility.BLANK_ICON);210 help_create = new JMenuItem(BLANK_ICON); 206 211 help_create.addActionListener(Gatherer.g_man); 207 212 Dictionary.registerText(help_create, "GUI.Create"); … … 265 270 selected = help.getItem(current_tab); 266 271 if(selected != null) { 267 selected.setIcon( Utility.BLANK_ICON);272 selected.setIcon(BLANK_ICON); 268 273 } 269 274 } … … 271 276 selected = help.getItem(current_tab); 272 277 if(selected != null) { 273 selected.setIcon( Utility.HELP_ICON);278 selected.setIcon(HELP_ICON); 274 279 } 275 280 selected = null; -
trunk/gli/src/org/greenstone/gatherer/gui/SimpleMenuBar.java
r8579 r10012 5 5 import javax.swing.*; 6 6 import org.greenstone.gatherer.Dictionary; 7 import org.greenstone.gatherer.util. Utility;7 import org.greenstone.gatherer.util.JarTools; 8 8 9 9 public class SimpleMenuBar … … 16 16 this.page_name = page_name; 17 17 JMenu help = new JMenu(); 18 help.setIcon( Utility.HELP_ICON);18 help.setIcon(JarTools.getImage("help.gif")); 19 19 Dictionary.setText(help, "Menu.Help"); 20 20 -
trunk/gli/src/org/greenstone/gatherer/util/JarTools.java
r10011 r10012 35 35 public class JarTools 36 36 { 37 static p ublicImageIcon ERROR_ICON = null;37 static private ImageIcon ERROR_ICON = null; 38 38 // static public Class base = null; 39 40 41 static public void initialise() 42 { 43 ERROR_ICON = getImage("error.gif"); 44 } 39 45 40 46 -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r10011 r10012 37 37 package org.greenstone.gatherer.util; 38 38 39 import java.awt.*; 39 // Don't even think about adding import java.awt.* here! 40 // The functions in this class should not use any graphical classes. Put your function somewhere else buster! 40 41 import java.io.*; 41 42 import java.net.*; 42 43 import java.util.*; 43 44 import java.util.zip.*; 44 import javax.swing.*; 45 import javax.swing.tree.*; 45 // Don't even think about adding import javax.swing.* here! 46 // The functions in this class should not use any graphical classes. Put your function somewhere else buster! 46 47 import org.apache.xerces.parsers.*; 47 48 import org.apache.xerces.dom.DocumentImpl; … … 55 56 import org.w3c.dom.*; 56 57 import org.xml.sax.*; 58 57 59 58 60 /** To provide a library of common methods, in a static context, for use in the Gatherer. … … 122 124 static protected File gli_user_folder = null; 123 125 124 // These are out of alphabetic order to avoid forward reference error.125 126 /** The default icon to produce a 'help-icon' sized blank space before a menu entry. */ 126 127 static public Class base = null; 127 static public ImageIcon BLANK_ICON = null;128 /** The default error icon image. */129 static public ImageIcon ERROR_ICON = null;130 static public ImageIcon HELP_ICON = null;131 128 132 129 … … 853 850 { 854 851 base = base_object.getClass(); 855 856 BLANK_ICON = new ImageIcon(base.getResource("/images/blank.gif"));857 ERROR_ICON = new ImageIcon(base.getResource("/images/error.gif"));858 HELP_ICON = new ImageIcon(base.getResource("/images/help.gif"));859 852 } 860 853
Note:
See TracChangeset
for help on using the changeset viewer.