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

Moved Utility.getImage into JarTools, as part of tidying up the Utility class.

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

Legend:

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

    r9647 r10011  
    3535import javax.swing.*;
    3636import org.greenstone.gatherer.Dictionary;
     37import org.greenstone.gatherer.util.JarTools;
    3738import org.greenstone.gatherer.util.Utility;
    3839
     
    5960     * @see org.greenstone.gatherer.gui.AboutDialog.CloseButtonListener
    6061     * @see org.greenstone.gatherer.gui.GLIButton
    61      * @see org.greenstone.gatherer.util.Utility#getImage
    6262     * @see org.greenstone.gatherer.util.Utility#PROGRAM_NAME
    6363     * @see org.greenstone.gatherer.util.Utility#PROGRAM_VERSION
     
    7070    JPanel content_pane = (JPanel) getContentPane();
    7171    JPanel upper_pane = new JPanel();
    72     ImageIcon icon = Utility.getImage("gatherer_medium.gif");
     72    ImageIcon icon = JarTools.getImage("gatherer_medium.gif");
    7373    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT));
    7474    JLabel icon_label = new JLabel(scaled_icon);
  • trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r9801 r10011  
    5858import org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame;
    5959import org.greenstone.gatherer.gui.tree.DragTree;
     60import org.greenstone.gatherer.util.JarTools;
    6061import org.greenstone.gatherer.util.StaticStrings;
    6162import org.greenstone.gatherer.util.TreeSynchronizer;
     
    324325
    325326        // Pretty corner icon
    326         this.setIconImage(Utility.getImage("gatherer_small.gif").getImage());
     327        this.setIconImage(JarTools.getImage("gatherer_small.gif").getImage());
    327328        // BorderLayout for the main screen. I'll try my best to avoid these in subcomponents as they're space greedy.
    328329        content_pane.setLayout(new BorderLayout());
     
    344345        download_pane = new DownloadPane();
    345346        // "GUI.Download_Tooltip" is used automatically
    346         tab_pane.addTab("GUI.Download", Utility.getImage("download.gif"), download_pane);
     347        tab_pane.addTab("GUI.Download", JarTools.getImage("download.gif"), download_pane);
    347348        tab_pane.setEnabledAt(tab_pane.indexOfComponent(download_pane), Configuration.get("workflow.download", false));
    348349        }
     
    352353        if(Configuration.get("workflow.gather", true)) {
    353354        // "GUI.Gather_Tooltip" is used automatically
    354         tab_pane.addTab("GUI.Gather", Utility.getImage("gather.gif"), gather_pane);
     355        tab_pane.addTab("GUI.Gather", JarTools.getImage("gather.gif"), gather_pane);
    355356        tab_pane.setEnabledAt(tab_pane.indexOfComponent(gather_pane), Configuration.get("workflow.gather", false));
    356357        }
     
    360361        if(Configuration.get("workflow.enrich", true)) {
    361362        // "GUI.Enrich_Tooltip" is used automatically
    362         tab_pane.addTab("GUI.Enrich", Utility.getImage("enrich.gif"), enrich_pane);
     363        tab_pane.addTab("GUI.Enrich", JarTools.getImage("enrich.gif"), enrich_pane);
    363364        tab_pane.setEnabledAt(tab_pane.indexOfComponent(enrich_pane), false);
    364365        }
     
    368369        if(Configuration.get("workflow.design", true)) {
    369370        // "GUI.Design_Tooltip" is used automatically
    370         tab_pane.addTab("GUI.Design", Utility.getImage("design.gif"), design_pane);
     371        tab_pane.addTab("GUI.Design", JarTools.getImage("design.gif"), design_pane);
    371372        tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false);
    372373        }
     
    376377        if(Configuration.get("workflow.create", true)) {
    377378        // "GUI.Create_Tooltip" is used automatically
    378         tab_pane.addTab("GUI.Create", Utility.getImage("create.gif"), create_pane);
     379        tab_pane.addTab("GUI.Create", JarTools.getImage("create.gif"), create_pane);
    379380        tab_pane.setEnabledAt(tab_pane.indexOfComponent(create_pane), false);
    380381        }
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r9855 r10011  
    6161import org.greenstone.gatherer.util.DragComponent;
    6262import org.greenstone.gatherer.util.DragGroup;
     63import org.greenstone.gatherer.util.JarTools;
    6364import org.greenstone.gatherer.util.TreeSynchronizer;
    6465import org.greenstone.gatherer.util.Utility;
     
    142143    Dictionary.registerBoth(stop_action, "Collection.Stop", "Collection.Stop_Tooltip");
    143144   
    144     new_folder = new GLIButton(Utility.getImage("folder.gif"));
     145    new_folder = new GLIButton(JarTools.getImage("folder.gif"));
    145146    new_folder.addActionListener(this);
    146147    new_folder.setEnabled(false);
  • trunk/gli/src/org/greenstone/gatherer/gui/HelpFrame.java

    r10009 r10011  
    4747import org.greenstone.gatherer.DebugStream;
    4848import org.greenstone.gatherer.Dictionary;
     49import org.greenstone.gatherer.util.JarTools;
    4950import org.greenstone.gatherer.util.StaticStrings;
    5051import org.greenstone.gatherer.util.Utility;
     
    109110
    110111    // Pretty corner icon
    111     this.setIconImage(Utility.getImage("gatherer_small.gif").getImage());
     112    this.setIconImage(JarTools.getImage("gatherer_small.gif").getImage());
    112113
    113114    self = this;
  • trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java

    r9036 r10011  
    4343import org.greenstone.gatherer.Configuration;
    4444import org.greenstone.gatherer.Dictionary;
    45 import org.greenstone.gatherer.util.Utility;
     45import org.greenstone.gatherer.util.JarTools;
    4646import org.greenstone.gatherer.util.XMLTools;
    4747import org.w3c.dom.*;
     
    7676    JPanel content_pane = (JPanel) getContentPane();
    7777    JPanel upper_pane = new JPanel();
    78     ImageIcon icon = Utility.getImage("lcolicn.gif");
     78    ImageIcon icon = JarTools.getImage("lcolicn.gif");
    7979    ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT));
    8080    JLabel icon_label = new JLabel(scaled_icon);
  • trunk/gli/src/org/greenstone/gatherer/gui/MetadataValueTablePane.java

    r9856 r10011  
    4444import org.greenstone.gatherer.metadata.MetadataValueTableModel;
    4545import org.greenstone.gatherer.metadata.MetadataXMLFileManager;
     46import org.greenstone.gatherer.util.JarTools;
    4647import org.greenstone.gatherer.util.Utility;
    4748
     
    322323        // First column: inherited metadata icon
    323324        if (column == 0 && value != null) {
    324             component = new JLabel(Utility.getImage("upfolder.gif"));
     325            component = new JLabel(JarTools.getImage("upfolder.gif"));
    325326        }
    326327
  • trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r8240 r10011  
    4949import org.greenstone.gatherer.collection.BasicCollectionConfiguration;
    5050import org.greenstone.gatherer.collection.CollectionManager;
     51import org.greenstone.gatherer.util.JarTools;
    5152import org.greenstone.gatherer.util.StaticStrings;
    5253import org.greenstone.gatherer.util.Utility;
     
    5455public class OpenCollectionDialog
    5556    extends JFileChooser {
    56     static final private ImageIcon LOCKED_COLLECTION_ICON = Utility.getImage("lcolicn.gif");
    57     static final private ImageIcon NORMAL_COLLECTION_ICON = Utility.getImage("ncolicn.gif");
     57    static final private ImageIcon LOCKED_COLLECTION_ICON = JarTools.getImage("lcolicn.gif");
     58    static final private ImageIcon NORMAL_COLLECTION_ICON = JarTools.getImage("ncolicn.gif");
    5859    /** The name of the mouse listener that initiates editing on a double click. */
    5960    static final private String SINGLE_CLICK_LISTENER = "SingleClickListener";
  • trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java

    r9864 r10011  
    3333import org.greenstone.gatherer.Dictionary;
    3434import org.greenstone.gatherer.Gatherer;
    35 import org.greenstone.gatherer.util.Utility;
     35import org.greenstone.gatherer.util.JarTools;
    3636
    3737
     
    7474    JPanel content_pane = (JPanel) getContentPane();
    7575    JPanel text_pane = new JPanel();
    76     JLabel icon_label = new JLabel(Utility.getImage("gatherer_medium.gif"));
     76    JLabel icon_label = new JLabel(JarTools.getImage("gatherer_medium.gif"));
    7777
    7878    JTextArea text_area = new JTextArea();
  • trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/HeaderRenderer.java

    r8243 r10011  
    4141import javax.swing.table.TableCellRenderer;
    4242import org.greenstone.gatherer.Dictionary;
    43 import org.greenstone.gatherer.util.Utility;
     43import org.greenstone.gatherer.util.JarTools;
    4444
    4545/** This custom button renderer replaces the boring old column headers with clickable versions which are based on JToggleButtons.
     
    5252
    5353    /** The constructor sets up a margin around the button, and adds the filter icons.
    54      * @see org.greenstone.gatherer.util.Utility
    5554     */
    5655    public HeaderRenderer() {
    5756    setMargin(new Insets(0,0,0,0));
    58     setIcon(Utility.getImage("filter.gif"));
    59     setSelectedIcon(Utility.getImage("filter-on.gif"));
     57    setIcon(JarTools.getImage("filter.gif"));
     58    setSelectedIcon(JarTools.getImage("filter-on.gif"));
    6059    }
    6160
Note: See TracChangeset for help on using the changeset viewer.