Changeset 10011


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
Files:
1 added
20 edited

Legend:

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

    r9126 r10011  
    4242import org.greenstone.gatherer.gui.GComboBox;
    4343import org.greenstone.gatherer.gui.GLIButton;
     44import org.greenstone.gatherer.util.JarTools;
    4445import org.greenstone.gatherer.util.StaticStrings;
    4546import org.greenstone.gatherer.util.Utility;
     
    617618        JPanel move_button_pane = new JPanel();
    618619
    619         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     620        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    620621        move_up_button.setEnabled(false);
    621622        move_up_button.setMnemonic(KeyEvent.VK_U);
    622         //move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    623623        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    624624
    625         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     625        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    626626        move_down_button.setEnabled(false);
    627627        move_down_button.setMnemonic(KeyEvent.VK_D);
    628         //move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    629628        Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    630629
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r9997 r10011  
    4141import org.greenstone.gatherer.metadata.MetadataSetManager;
    4242import org.greenstone.gatherer.util.CheckList;
     43import org.greenstone.gatherer.util.JarTools;
    4344import org.greenstone.gatherer.util.StaticStrings;
    44 import org.greenstone.gatherer.util.Utility;
    4545import org.w3c.dom.*;
    4646/** This class is resposible for storing the indexes which have been assigned to this collection and the default index, and providing methods for interacting with both these data pools. It also knows how to turn itself into a String as it would be displayed in the collection configuration file.
     
    563563        JPanel movement_pane = new JPanel();
    564564
    565         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     565        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    566566        move_up_button.setEnabled(false);
    567567        move_up_button.setMnemonic(KeyEvent.VK_U);
    568568        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    569569
    570         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     570        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    571571        move_down_button.setEnabled(false);
    572572        move_down_button.setMnemonic(KeyEvent.VK_D);
     
    10701070        JPanel index_movement_panel = new JPanel();
    10711071
    1072         move_index_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     1072        move_index_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    10731073        move_index_up_button.setEnabled(false);
    10741074        move_index_up_button.setMnemonic(KeyEvent.VK_U);
    10751075        Dictionary.registerBoth(move_index_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    10761076
    1077         move_index_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     1077        move_index_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    10781078        move_index_down_button.setEnabled(false);
    10791079        move_index_down_button.setMnemonic(KeyEvent.VK_D);
     
    12021202        JPanel level_movement_panel = new JPanel();
    12031203
    1204         move_level_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     1204        move_level_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    12051205        move_level_up_button.setEnabled(false);
    12061206        move_level_up_button.setMnemonic(KeyEvent.VK_U);
    1207         //move_level_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    12081207        Dictionary.registerBoth(move_level_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    12091208
    1210         move_level_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     1209        move_level_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    12111210        move_level_down_button.setEnabled(false);
    12121211        move_level_down_button.setMnemonic(KeyEvent.VK_D);
    1213         //move_level_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    12141212        Dictionary.registerBoth(move_level_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    12151213
  • trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java

    r10006 r10011  
    2727package org.greenstone.gatherer.cdm;
    2828
    29 /**************************************************************************************
    30  * Written:      08/05/02
    31  * Revised:      17/11/02 - Commented
    32  *               07/07/03 - DOM support
    33  **************************************************************************************/
     29
    3430import java.awt.*;
    3531import java.awt.event.*;
     
    4339import org.greenstone.gatherer.Gatherer;
    4440import org.greenstone.gatherer.gui.GLIButton;
    45 import org.greenstone.gatherer.util.Utility;
     41import org.greenstone.gatherer.util.JarTools;
    4642import org.greenstone.gatherer.util.XMLTools;
    4743import org.w3c.dom.*;
     
    323319
    324320        JPanel movement_pane = new JPanel();
    325         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     321        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    326322        move_up_button.setEnabled(false);
    327323        move_up_button.setMnemonic(KeyEvent.VK_U);
    328324        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    329325
    330         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     326        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    331327        move_down_button.setEnabled(false);
    332328        move_down_button.setMnemonic(KeyEvent.VK_D);
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r9991 r10011  
    4646import org.greenstone.gatherer.gui.ModalDialog;
    4747import org.greenstone.gatherer.gui.WarningDialog;
     48import org.greenstone.gatherer.util.JarTools;
    4849import org.greenstone.gatherer.util.StaticStrings;
    4950import org.greenstone.gatherer.util.Utility;
     
    747748        Dictionary.registerText(instructions, "CDM.PlugInManager.Instructions");
    748749
    749         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     750        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    750751        move_up_button.setEnabled(false);
    751752        move_up_button.setMnemonic(KeyEvent.VK_U);
    752         //move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    753753        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    754754
    755         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     755        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    756756        move_down_button.setEnabled(false);
    757757        move_down_button.setMnemonic(KeyEvent.VK_D);
    758         //move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    759758        Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    760759
  • trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java

    r10008 r10011  
    4242import org.greenstone.gatherer.gui.GComboBox;
    4343import org.greenstone.gatherer.gui.GLIButton;
    44 import org.greenstone.gatherer.util.Utility;
     44import org.greenstone.gatherer.util.JarTools;
    4545import org.w3c.dom.*;
    4646
     
    229229        JPanel movement_panel = new JPanel();
    230230
    231         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     231        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    232232        move_up_button.setEnabled(false);
    233233        move_up_button.setMnemonic(KeyEvent.VK_U);
     
    235235        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    236236
    237         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     237        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    238238        move_down_button.setEnabled(false);
    239239        move_down_button.setMnemonic(KeyEvent.VK_D);
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r9562 r10011  
    3737import org.greenstone.gatherer.gui.GLIButton;
    3838import org.greenstone.gatherer.util.CheckList;
    39 import org.greenstone.gatherer.util.Utility;
     39import org.greenstone.gatherer.util.JarTools;
    4040import org.w3c.dom.*;
    4141
     
    263263
    264264        JPanel movement_pane = new JPanel();
    265         move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));
     265        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    266266        move_up_button.setEnabled(false);
    267267        move_up_button.setMnemonic(KeyEvent.VK_U);
    268268        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    269269
    270         move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));
     270        move_down_button = new JButton("", JarTools.getImage("arrow-down.gif"));
    271271        move_down_button.setEnabled(false);
    272272        move_down_button.setMnemonic(KeyEvent.VK_D);
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionTreeNode.java

    r9026 r10011  
    3232import org.greenstone.gatherer.cdm.CollectionDesignManager;
    3333import org.greenstone.gatherer.file.FileNode;
    34 import org.greenstone.gatherer.util.Utility;
     34import org.greenstone.gatherer.util.JarTools;
    3535
    3636
     
    3939    extends FileNode
    4040{
    41     static final public ImageIcon GREEN_FILE_ICON = Utility.getImage("greenfile.gif", true);
     41    static final public ImageIcon GREEN_FILE_ICON = JarTools.getImage("greenfile.gif", true);
    4242
    4343    /** Is this file a metadata database that is explodable with the explode_metadata_databases.pl script? */
  • trunk/gli/src/org/greenstone/gatherer/feedback/ActionRecorderDialog.java

    r8474 r10011  
    1616import java.text.*;
    1717
    18 import org.greenstone.gatherer.util.Utility;
     18import org.greenstone.gatherer.util.JarTools;
    1919
    2020/**
     
    477477    ImageIcon icon,icon2,icon3;
    478478
    479     icon3 = Utility.getImage("fastsend.gif");
     479    icon3 = JarTools.getImage("fastsend.gif");
    480480    item3 = new JMenuItem(messages.getString("SendFeedback"),
    481481                  new ImageIcon(icon3.getImage().getScaledInstance
     
    491491    if (rec == false)
    492492        {
    493         icon = Utility.getImage("feedback.gif");
     493        icon = JarTools.getImage("feedback.gif");
    494494        item = new JMenuItem("Report Feedback",
    495495                     new ImageIcon(icon.getImage().getScaledInstance
     
    503503    else
    504504        {
    505         icon = Utility.getImage("camera.gif");
     505        icon = JarTools.getImage("camera.gif");
    506506        item = new JMenuItem(messages.getString("ScreenShot"),
    507507                     new ImageIcon(icon.getImage().getScaledInstance
     
    514514        }
    515515
    516     icon2 = Utility.getImage("history.gif");
     516    icon2 = JarTools.getImage("history.gif");
    517517    item2 = new JMenuItem(messages.getString("LookHistory"),
    518518                  new ImageIcon(icon2.getImage().getScaledInstance
     
    590590            JMenuItem item;
    591591            ImageIcon icon;
    592             icon = Utility.getImage("camera.gif");
     592            icon = JarTools.getImage("camera.gif");
    593593            item = new JMenuItem(messages.getString("ScreenShot"),
    594594                     new ImageIcon(icon.getImage().getScaledInstance
     
    623623            JMenuItem item;
    624624            ImageIcon icon;
    625             icon = Utility.getImage("camera.gif");
     625            icon = JarTools.getImage("camera.gif");
    626626            item = new JMenuItem(messages.getString("ScreenShot"),
    627627                     new ImageIcon(icon.getImage().getScaledInstance
     
    671671            JMenuItem item;
    672672           
    673             icon = Utility.getImage("feedback.gif");
     673            icon = JarTools.getImage("feedback.gif");
    674674            item = new JMenuItem("Report Feedback", new ImageIcon(icon.getImage().getScaledInstance(20,20,Image.SCALE_SMOOTH)));
    675675            item.setActionCommand(messages.getString("SendFeedback"));
     
    702702            JMenuItem item;
    703703           
    704             icon = Utility.getImage("feedback.gif");
     704            icon = JarTools.getImage("feedback.gif");
    705705            item = new JMenuItem("Report Feedback", new ImageIcon(icon.getImage().getScaledInstance(20,20,Image.SCALE_SMOOTH)));
    706706            item.setActionCommand(messages.getString("SendFeedback"));
  • trunk/gli/src/org/greenstone/gatherer/feedback/SelectPicture.java

    r9855 r10011  
    1919import javax.swing.BorderFactory;
    2020
    21 import org.greenstone.gatherer.util.Utility;
     21import org.greenstone.gatherer.util.JarTools;
    2222
    2323/**
     
    346346        ImageIcon imgicon,imgicon2;
    347347        Image img,img2;
    348         imgicon = Utility.getImage("pen.gif");
     348        imgicon = JarTools.getImage("pen.gif");
    349349        img = imgicon.getImage();
    350350        img = img.getScaledInstance(24,24,Image.SCALE_SMOOTH);
    351         imgicon2 = Utility.getImage("eraserpen.gif");
     351        imgicon2 = JarTools.getImage("eraserpen.gif");
    352352        img2 = imgicon2.getImage();
    353353        final Cursor cursor;
     
    472472
    473473        JButton pen;
    474         pen = new JButton(Utility.getImage("penicon.gif"));
     474        pen = new JButton(JarTools.getImage("penicon.gif"));
    475475        pen.setText("Pen");
    476476        pen.setPreferredSize(new Dimension(30,20));
     
    489489
    490490        JButton eraser;
    491         eraser = new JButton(Utility.getImage("eraser.gif"));
     491        eraser = new JButton(JarTools.getImage("eraser.gif"));
    492492        eraser.setText("Eraser");
    493493        eraser.setActionCommand("Eraser");
  • trunk/gli/src/org/greenstone/gatherer/file/RecycleBin.java

    r8785 r10011  
    5050import org.greenstone.gatherer.util.DragComponent;
    5151import org.greenstone.gatherer.util.DragGroup;
     52import org.greenstone.gatherer.util.JarTools;
    5253import org.greenstone.gatherer.util.Utility;
    5354
     
    7374    public RecycleBin()
    7475    {
    75     super(Utility.getImage("bin.gif"));
     76    super(JarTools.getImage("bin.gif"));
    7677    this.drop_target = new DropTarget(this, drag_action, this, true);
    7778
  • 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
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r10010 r10011  
    412412
    413413
    414     /** Method to retrieve an image icon with the given filename found in classpath or the resouces directory.
    415      *  @return The specified <strong>ImageIcon</strong>, or an error image replacement if no such images exists.
    416      */
    417     static public ImageIcon getImage(String filename) {
    418     return getImage(filename, false);
    419     }
    420 
    421     static public ImageIcon getImage(String filename, boolean wait_until_complete)
    422     {
    423     ImageIcon image = new ImageIcon(base.getResource("/images/" + filename));
    424     if (image == null) {
    425         image = ERROR_ICON;
    426     }
    427 
    428     if (wait_until_complete) {
    429         int load_status;
    430         do {
    431         load_status = image.getImageLoadStatus();
    432         }
    433         while (load_status != MediaTracker.ABORTED && load_status != MediaTracker.ERRORED && load_status != MediaTracker.COMPLETE);
    434     }
    435 
    436     return image;
    437     }
    438 
    439 
    440414    /** Method which constructs the import directory given a certain collection.
    441415     * @param col_dir The location of the collection directory as a <strong>String</strong>.
Note: See TracChangeset for help on using the changeset viewer.