Changeset 8266


Ignore:
Timestamp:
2004-10-11T10:02:59+13:00 (20 years ago)
Author:
mdewsnip
Message:

Moved the init_images function from Gatherer into Utility (it is used by the GEMS).

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

Legend:

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

    r8264 r8266  
    135135    this.self = this;
    136136
    137     init_images();
    138     }
    139 
    140     protected void init_images()
    141     {
    142     Class base = this.getClass();
    143     Utility.BLANK_ICON = new ImageIcon(base.getResource("/images/blank.gif"));
    144     Utility.ERROR_ICON = new ImageIcon(base.getResource("/images/error.gif"));
    145     Utility.HELP_ICON  = new ImageIcon(base.getResource("/images/help.gif"));
    146     Utility.ON_ICON    = new ImageIcon(base.getResource("/images/check.gif"));
    147     Utility.OFF_ICON   = new ImageIcon(base.getResource("/images/cross.gif"));
    148 
    149     Utility.base = base;
     137    Utility.initImages(this);
    150138    }
    151139
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r8265 r8266  
    957957        "linux" + File.separator + "wget";
    958958    }
    959    
     959
     960
     961    static public void initImages(Object base_object)
     962    {
     963    base = base_object.getClass();
     964
     965    BLANK_ICON = new ImageIcon(base.getResource("/images/blank.gif"));
     966    ERROR_ICON = new ImageIcon(base.getResource("/images/error.gif"));
     967    HELP_ICON  = new ImageIcon(base.getResource("/images/help.gif"));
     968    ON_ICON    = new ImageIcon(base.getResource("/images/check.gif"));
     969    OFF_ICON   = new ImageIcon(base.getResource("/images/cross.gif"));
     970    }
     971
     972
    960973    /** A string is a valid hierarchy index if it matches '[0-9](\.[0-9])*' */
    961974    static public boolean isIndex(String raw) {
Note: See TracChangeset for help on using the changeset viewer.