Changeset 10943


Ignore:
Timestamp:
2005-11-24T17:29:41+13:00 (18 years ago)
Author:
kjdon
Message:

I got rid of all the core files - they were mainly not used. some I have created new versions, or now use teh gs3 version. updated all these files to reflect the changes

Location:
trunk/gsdl3/src/java/org/greenstone/admin
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/admin/GAI.java

    r10929 r10943  
    2525 *########################################################################
    2626 */
    27 // Graphical Adminstration Interface
     27
    2828package org.greenstone.admin;
    2929
     
    3838import javax.swing.text.*;
    3939
    40 import org.greenstone.admin.GAIManager;
    41 import org.greenstone.core.Configuration;
    42 import org.greenstone.core.Dictionary;
     40import org.greenstone.gsdl3.util.Dictionary;
    4341import org.greenstone.admin.gui.SetServerPane;
    4442
    45 /** Containing the top-level "core" for the GAI(Graphical Administration
     43/** Containing the top-level "core" for the GAI(Greenstone Administrator
    4644 * Interface) this class is the common core for the GAI application and
    4745 * applet. It first parses the command line arguments, preparing to update
     
    5553{
    5654    public static Dimension screen_size = Toolkit.getDefaultToolkit().getScreenSize();
    57     public static String gsdl3_path;
     55    public static String gsdl3_src_home;
     56    public static String gsdl3_web_home;
     57   
     58    public static File build_properties_file;
     59
    5860    public static String admin_path;
    5961    public static String tomcat_file_path;
     
    6567    static public GAIManager ga_man;
    6668
    67     public GAI()
     69    /** a public reference to the Dictionary */
     70    static public Dictionary dictionary = null;
     71   
     72    public GAI(String gsdl3_src_home, String gsdl3_web_home)
    6873    {
    69     this.gsdl3_path = gsdl3_path;
    70     this.admin_path = this.gsdl3_path + "/src/java/org/greenstone/admin/";
    71     this.tomcat_file_path = this.gsdl3_path + "/comms/jakarta/tomcat/logs/";
    72     this.images_path = this.admin_path + "images/";
    73         this.build_file = new File(gsdl3_path, "build.properties");
    74     this.site_conf = new File (gsdl3_path,"/web/sites/localsite/siteConfig.xml");
    75     this.interface_conf = new File (gsdl3_path, "/web/interfaces/default/interfaceConfig.xml");
    76     init();
     74    this.gsdl3_src_home = gsdl3_src_home;
     75    this.gsdl3_web_home = gsdl3_web_home;
     76   
     77    // set up the Configuration
     78    new Configuration();
     79   
     80    // Read Dictionary
     81    this.dictionary = new Dictionary("gai", Configuration.getLocale("general.locale"));
     82    this.build_properties_file = new File(this.gsdl3_src_home, "build.properties");
     83    this.images_path = this.gsdl3_src_home+File.separatorChar+"resources"+File.separatorChar+"images";
     84    // start the GAIManager
     85    ga_man  = new GAIManager(screen_size);
     86    ga_man.display();
     87
     88    //this.admin_path = this.gsdl3_path + "/src/java/org/greenstone/admin/";
     89    //this.tomcat_file_path = this.gsdl3_path + "/comms/jakarta/tomcat/logs/";
     90    //this.images_path = this.admin_path + "images/";
     91        //this.build_file = new File(gsdl3_path, "build.properties");
     92    //this.site_conf = new File (gsdl3_path,"/web/sites/localsite/siteConfig.xml");
     93    //this.interface_conf = new File (gsdl3_path, "/web/interfaces/default/interfaceConfig.xml");
     94    //init();
    7795    }
    7896   
    7997    public static void main (String[] args){
    80     gsdl3_path = args[0];
    81     admin_path = gsdl3_path + "/src/java/org/greenstone/admin/";
    82     new Configuration (admin_path);
    83     GAI gai = new GAI();
     98    // A serious hack, but its good enough to stop crappy 'Could not
     99        // lock user prefs' error messages.  Thanks to Walter Schatz from
     100        // the java forums.
     101        System.setProperty("java.util.prefs.syncInterval","2000000");
     102
     103    if (args.length != 2) {
     104        System.err.println("Usage: java org.greenstone.admin.GAI <gsdl3 src home> <gsdl3 web home>");
     105        System.exit(1);
     106    }
    84107   
    85     ga_man  = new GAIManager(screen_size);
    86     ga_man.display();
     108    File gsdl3_src_dir = new File(args[0]);
     109    File gsdl3_web_dir = new File(args[1]);
     110    if (!gsdl3_src_dir.isDirectory() || !gsdl3_web_dir.isDirectory()) {
     111        System.err.println("Usage: java org.greenstone.admin.GAI <gsdl3 src home> <gsdl3 web home>");
     112        System.err.println("src or web directory does not exist!");
     113        System.exit(1);
     114    }
     115   
     116    GAI gai = new GAI(args[0], args[1]);
     117
     118    //  gsdl3_path = args[0];
     119    //admin_path = gsdl3_path + "/src/java/org/greenstone/admin/";
     120    //new Configuration (admin_path);
     121    //GAI gai = new GAI();
     122   
     123    //ga_man  = new GAIManager(screen_size);
     124    //ga_man.display();
    87125    }
    88126
    89     public void init (){
    90     // Read Dictionary
    91     new Dictionary(Configuration.getLocale("general.locale", true), Configuration.getFont("general.font", true));
    92 
    93     }
    94127}
    95128
  • trunk/gsdl3/src/java/org/greenstone/admin/GAIFirstSettingFrame.java

    r10929 r10943  
    4949import javax.swing.tree.*;
    5050
    51 import org.greenstone.core.Configuration;
    52 import org.greenstone.core.Dictionary;
    5351import org.greenstone.core.ParsingProgress;
    5452import org.greenstone.admin.gui.SetServerPane;
     
    111109    fset_yes_button.setToolTipText("Click this button to Set up the Tomcat/MYSQL server");
    112110    fset_yes_button.setEnabled(false);
    113     //Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip");
    114111    fset_no_button = new JButton("No", setNoButtonIcon);
    115112    fset_no_button.addActionListener(fsnbl);
     
    117114    fset_no_button.setMnemonic(KeyEvent.VK_N);
    118115    fset_no_button.setToolTipText("Click this button to skip the First time Tomcat/MYSQL server setting");
    119     //Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip");
    120 
     116   
    121117    //First time running setting buttons
    122118    fsybl = null;
     
    175171    main_pane.add(first_setting_pane,BorderLayout.CENTER);
    176172    main_pane.add(control_pane, BorderLayout.SOUTH);
    177     main_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    178     main_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
     173    main_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     174    main_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
    179175
    180176    // Center and display
  • trunk/gsdl3/src/java/org/greenstone/admin/GAIManager.java

    r10929 r10943  
    3434import org.greenstone.admin.gui.LogPane;
    3535import org.greenstone.admin.gui.ConfPane;
    36 
    37 import org.greenstone.core.Configuration;
    38 import org.greenstone.core.Dictionary;
    39 import org.greenstone.core.DebugStream;
    40 import org.greenstone.core.util.Utility;
    4136
    4237//import java AWT classes
     
    121116       
    122117        //set up the Configuration Pane
    123         if (Configuration.get("admin.conf", true)){
     118        if (Configuration.get("admin.conf")){
    124119        conf_pane = new ConfPane();
    125120        conf_pane.display();
    126121        tab_pane.addTab("Configuration", CONF_ICON, conf_pane);
    127         tab_pane.setEnabledAt(tab_pane.indexOfComponent(conf_pane),Configuration.get("admin.conf", false));
     122        tab_pane.setEnabledAt(tab_pane.indexOfComponent(conf_pane),Configuration.get("admin.conf"));
    128123        }
    129124               
    130125        //set up the ext Pane
    131         if (Configuration.get("admin.ext", true)){
     126        if (Configuration.get("admin.ext")){
    132127        ext_pane = new JPanel();
    133128        //ext_pane.display();
    134129        tab_pane.addTab("Exts", EXT_ICON, ext_pane);
    135         tab_pane.setEnabledAt(tab_pane.indexOfComponent(ext_pane),Configuration.get("admin.ext", false));
     130        tab_pane.setEnabledAt(tab_pane.indexOfComponent(ext_pane),Configuration.get("admin.ext"));
    136131        }
    137132               
    138133        //set up the Monitor Pane
    139         if (Configuration.get("admin.monitor", true)){
     134        if (Configuration.get("admin.monitor")){
    140135        monitor_pane = new JPanel();
    141136        //monitor_pane.display();
    142137        tab_pane.addTab("Monitor", MONITOR_ICON, monitor_pane);
    143         tab_pane.setEnabledAt(tab_pane.indexOfComponent(monitor_pane),Configuration.get("admin.monitor", false));
     138        tab_pane.setEnabledAt(tab_pane.indexOfComponent(monitor_pane),Configuration.get("admin.monitor"));
    144139        }
    145140
    146141        //set up the Log Pane
    147         if (Configuration.get("admin.log", true)){
     142        if (Configuration.get("admin.log")){
    148143        log_pane = new LogPane();
    149144        log_pane.display();
    150145        tab_pane.addTab("Log", LOG_ICON, log_pane);
    151         tab_pane.setEnabledAt(tab_pane.indexOfComponent(log_pane),Configuration.get("admin.log", false));
     146        tab_pane.setEnabledAt(tab_pane.indexOfComponent(log_pane),Configuration.get("admin.log"));
    152147        }   
    153148        content_pane.setLayout(new BorderLayout());
     
    156151        setVisible(true);
    157152    } catch (Exception e){
    158         DebugStream.printStackTrace(e);
    159153        e.printStackTrace();
    160154        System.exit(1);
     
    345339        if (conf_pos != -1){
    346340        if (ready) {
    347             tab_pane.setEnabledAt (conf_pos,Configuration.get("admin.conf", false));
     341            tab_pane.setEnabledAt (conf_pos,Configuration.get("admin.conf"));
    348342        } else {
    349             tab_pane.setEnabledAt (conf_pos,Configuration.get("admin.conf",true));
     343            tab_pane.setEnabledAt (conf_pos,false);
    350344        }
    351345        }
    352346        if (ext_pos != -1){
    353347        if (ready) {
    354             tab_pane.setEnabledAt (ext_pos,Configuration.get("admin.ext", false));
     348            tab_pane.setEnabledAt (ext_pos,Configuration.get("admin.ext"));
    355349        } else {
    356             tab_pane.setEnabledAt (ext_pos,Configuration.get("admin.ext",true));
     350            tab_pane.setEnabledAt (ext_pos,false);
    357351        }
    358352        }
    359353        if (monitor_pos != -1){
    360354        if (ready) {
    361             tab_pane.setEnabledAt (monitor_pos,Configuration.get("admin.monitor", false));
     355            tab_pane.setEnabledAt (monitor_pos,Configuration.get("admin.monitor"));
    362356        } else {
    363             tab_pane.setEnabledAt (monitor_pos,Configuration.get("admin.monitor",true));
     357            tab_pane.setEnabledAt (monitor_pos,false);
    364358        }
    365359        }
    366360        if (log_pos != -1){
    367361        if (ready) {
    368             tab_pane.setEnabledAt (log_pos,Configuration.get("admin.log", false));
     362            tab_pane.setEnabledAt (log_pos,Configuration.get("admin.log"));
    369363        } else {
    370             tab_pane.setEnabledAt (log_pos,Configuration.get("admin.log",true));
     364            tab_pane.setEnabledAt (log_pos,false);
    371365        }
    372366        }
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/ClearLogFilePrompt.java

    r10929 r10943  
    4444import javax.swing.*;
    4545import javax.swing.event.*;
    46 import org.greenstone.core.Configuration;
    47 import org.greenstone.core.DebugStream;
    4846
    4947/*import org.greenstone.gatherer.Dictionary;
     
    5553import org.greenstone.gatherer.util.StaticStrings;*/
    5654
    57 //import org.greenstone.gatherer.core.Utility;
    5855
    5956/** This class provides the functionality to delete current collections from the
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/ConfPane.java

    r10929 r10943  
    5656import org.greenstone.admin.GAI;
    5757import org.greenstone.admin.GAIManager;
     58import org.greenstone.admin.Configuration;
    5859import org.greenstone.admin.gui.ThreadControl;
    5960//import org.greenstone.admin.gui.ConfSettingTableModel;
    6061import org.greenstone.admin.gui.SiteConfSetting;
    61 import org.greenstone.core.Configuration;
    62 import org.greenstone.core.Dictionary;
    63 import org.greenstone.core.util.Utility;
    6462import org.greenstone.core.ParsingProgress;
    6563
     
    186184    //DefaultMutableTreeNode child1 = new DefaultMutableTreeNode();
    187185    DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Project Configuration");
    188     //Dictionary.get(child1,"Tree.ProjectConf");
    189186
    190187    DefaultMutableTreeNode compile = new DefaultMutableTreeNode("Compile");
     
    201198    DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Site Configuration");
    202199    //DefaultMutableTreeNode child2 = new DefaultMutableTreeNode();
    203     //Dictionary.registerText(child2,"Tree.SiteConf");
    204200    DefaultMutableTreeNode siteConf = new DefaultMutableTreeNode("SiteConfig");
    205201    DefaultMutableTreeNode interfaceConf = new DefaultMutableTreeNode("InterfaceConfig");
     
    237233    startup_tomcat_button.setMnemonic(KeyEvent.VK_S);
    238234    startup_tomcat_button.setEnabled(false);
    239     Dictionary.registerBoth(startup_tomcat_button,"ConfPane.Tomcat_Startup", "ConfPane.Tomcat_Startup_Tooltip");
     235    startup_tomcat_button.setText(GAI.dictionary.get("ConfPane.Tomcat_Startup"));
     236    startup_tomcat_button.setToolTipText(GAI.dictionary.get("ConfPane.Tomcat_Startup_Tooltip"));
    240237
    241238    shutdown_tomcat_button = new JButton();
    242239    shutdown_tomcat_button.addActionListener(stdbl);
    243240    shutdown_tomcat_button.setEnabled(false);
    244     Dictionary.registerBoth(shutdown_tomcat_button,"ConfPane.Tomcat_Shutdown", "ConfPane.Tomcat_Shutdown_Tooltip");
    245        
     241    shutdown_tomcat_button.setText(GAI.dictionary.get("ConfPane.Tomcat_Shutdown"));
     242    shutdown_tomcat_button.setToolTipText(GAI.dictionary.get("ConfPane.Tomcat_Shutdown_Tooltip"));
     243
    246244    restart_tomcat_button = new JButton();
    247245    restart_tomcat_button.addActionListener(rtbl);
    248246    restart_tomcat_button.setEnabled(false);
    249     Dictionary.registerBoth(restart_tomcat_button,"ConfPane.Tomcat_Restart", "ConfPane.Tomcat_Restart_Tooltip");
     247    restart_tomcat_button.setText(GAI.dictionary.get("ConfPane.Tomcat_Restart"));
     248    restart_tomcat_button.setToolTipText(GAI.dictionary.get("ConfPane.Tomcat_Restart_Tooltip"));
    250249
    251250    startup_mysql_button = new JButton();
     
    253252    startup_mysql_button.setMnemonic(KeyEvent.VK_S);
    254253    startup_mysql_button.setEnabled(false);
    255     Dictionary.registerBoth(startup_mysql_button,"ConfPane.MySQL_Startup", "ConfPane.MySQL_Startup_Tooltip");
     254    startup_mysql_button.setText(GAI.dictionary.get("ConfPane.MySQL_Startup"));
     255    startup_mysql_button.setToolTipText(GAI.dictionary.get("ConfPane.MySQL_Startup_Tooltip"));
    256256
    257257    shutdown_mysql_button = new JButton();
    258258    shutdown_mysql_button.addActionListener(smdbl);
    259259    shutdown_mysql_button.setEnabled(false);
    260     Dictionary.registerBoth(shutdown_mysql_button,"ConfPane.MySQL_Shutdown", "ConfPane.MySQL_Shutdown_Tooltip");
     260    shutdown_mysql_button.setText(GAI.dictionary.get("ConfPane.MySQL_Shutdown"));
     261    shutdown_mysql_button.setToolTipText(GAI.dictionary.get("ConfPane.MySQL_Shutdown_Tooltip"));
    261262   
    262263    restart_mysql_button = new JButton();
    263264    restart_mysql_button.addActionListener(rmbl);
    264265    restart_mysql_button.setEnabled(false);
    265     Dictionary.registerBoth(restart_mysql_button,"ConfPane.MySQL_Restart", "ConfPane.MySQL_Restart_Tooltip");
     266    restart_mysql_button.setText(GAI.dictionary.get("ConfPane.MySQL_Restart"));
     267    restart_mysql_button.setToolTipText(GAI.dictionary.get("ConfPane.MySQL_Restart_Tooltip"));
    266268
    267269    //tomcat control buttons
     
    297299    confList_pane.setPreferredSize(LIST_SIZE);
    298300    confList_pane.setSize(LIST_SIZE);
    299     confList_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    300     confList_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
     301    confList_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     302    confList_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
    301303   
    302304    confList_label = new JLabel();
    303305    confList_label.setOpaque(true);
    304     confList_label.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    305     confList_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
    306     Dictionary.registerText(confList_label, "ConfPane.Conf_List");
     306    confList_label.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     307    confList_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
     308    confList_label.setText(GAI.dictionary.get("ConfPane.Conf_List"));
    307309
    308310    // confContent_Pane
    309311    confContent_pane = new JPanel();
    310312    confContent_pane.setBorder(BorderFactory.createEmptyBorder(10,20,10,20));
    311     confContent_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    312     confContent_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
     313    confContent_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     314    confContent_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
    313315
    314316    confContent_label = new JLabel();
    315317    confContent_label.setOpaque(true);
    316     confContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    317     confContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
    318     Dictionary.registerText(confContent_label, "ConfPane.Conf_Content");
    319    
     318    confContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     319    confContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
     320    confContent_label.setText(GAI.dictionary.get("ConfPane.Conf_List"));
     321       
    320322    conf_table_model = new ConfSettingTableModel();
    321323    conf_setting_table = new JTable(conf_table_model){
     
    337339            Component c = super.prepareRenderer(renderer, rowIndex, colIndex);
    338340            if (colIndex == 0) {
    339             c.setBackground(Configuration.getColor("coloring.table_noneditable_background",false));
     341            c.setBackground(Configuration.getColor("coloring.table_noneditable_background"));
    340342            } else {
    341             c.setBackground(Configuration.getColor("coloring.table_editable_background",false));
     343            c.setBackground(Configuration.getColor("coloring.table_editable_background"));
    342344            }
    343345            return c;
     
    397399    conf_table_pane = new JScrollPane(conf_setting_table);
    398400    conf_table_pane.setVisible(false);
    399     conf_table_pane.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background", false));
     401    conf_table_pane.getViewport().setBackground(Configuration.getColor("coloring.collection_tree_background"));
    400402   
    401403    // Layout Components
     
    432434         * files are saved*/
    433435        if (project_conf_changed) {
    434         saveProjectConf(GAI.build_file);
     436        saveProjectConf(GAI.build_properties_file);
    435437        }
    436438        /*boolean site_conf_changed = site_conf.confChanged();
     
    480482        //before we restart Tomcat server, we want to make sure the conf_pane settings are saved
    481483        if (project_conf_changed) {
    482         saveProjectConf(GAI.build_file);
     484        saveProjectConf(GAI.build_properties_file);
    483485        }
    484486        /*boolean site_conf_changed = site_conf.confChanged();
     
    508510    public void actionPerformed(ActionEvent event) {
    509511        //before we startup the MySQL server, we want to make sure the Conf_pane settings are saved
    510         saveProjectConf(GAI.build_file);
     512        saveProjectConf(GAI.build_properties_file);
    511513        mysql_server_up = checkMysqlServer();
    512514        if (!mysql_server_up) {
     
    545547    implements ActionListener {
    546548    public void actionPerformed(ActionEvent event) {
    547         saveProjectConf(GAI.build_file);
     549        saveProjectConf(GAI.build_properties_file);
    548550        mysql_server_up = checkMysqlServer();
    549551        if (mysql_server_up) {
     
    597599
    598600    public void getConfContent(){
    599     String filename = GAI.build_file.getPath();
    600     if (!GAI.build_file.exists()){
     601    String filename = GAI.build_properties_file.getPath();
     602    if (!GAI.build_properties_file.exists()){
    601603        JOptionPane.showMessageDialog((Component) null,"Build property file does not exist"); 
    602604    } else {
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/DeleteLogFilePrompt.java

    r10929 r10943  
    4444import javax.swing.*;
    4545import javax.swing.event.*;
    46 import org.greenstone.core.Configuration;
    47 import org.greenstone.core.DebugStream;
    4846
    49 /*import org.greenstone.gatherer.Dictionary;
     47/*
    5048import org.greenstone.gatherer.Gatherer;
    5149import org.greenstone.gatherer.LocalLibraryServer;
     
    5553import org.greenstone.gatherer.util.StaticStrings;*/
    5654
    57 //import org.greenstone.gatherer.core.Utility;
    5855
    5956/** This class provides the functionality to delete current collections from the
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/LogPane.java

    r10929 r10943  
    4848import org.greenstone.admin.GAIManager;
    4949import org.greenstone.admin.GAI;
    50 import org.greenstone.core.Configuration;
    51 import org.greenstone.core.Dictionary;
    52 import org.greenstone.core.util.Utility;
     50import org.greenstone.admin.Configuration;
    5351
    5452/** The Log pane is to view the status of relevant log files in GSIII
     
    120118    log_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    121119    log_list.setVisibleRowCount(4);
    122     log_list.setBackground (Configuration.getColor("coloring.workspace_tree_background", false));
    123     log_list.setForeground (Configuration.getColor("coloring.workspace_tree_foreground", false));
     120    log_list.setBackground (Configuration.getColor("coloring.workspace_tree_background"));
     121    log_list.setForeground (Configuration.getColor("coloring.workspace_tree_foreground"));
    124122    log_list.addListSelectionListener(new LogListListener());
    125123   
     
    139137    reload_button.setEnabled(false);
    140138    reload_button.setMnemonic(KeyEvent.VK_R);
    141     Dictionary.registerBoth(reload_button, "LogPane.Reload_Log", "LogPane.Reload_Log_Tooltip");
     139    reload_button.setText(GAI.dictionary.get("LogPane.Reload_Log"));
     140    reload_button.setToolTipText(GAI.dictionary.get("LogPane.Reload_Log_Tooltip"));
    142141
    143142    clear_button = new JButton();
     
    145144    clear_button.setEnabled(false);
    146145    clear_button.setMnemonic(KeyEvent.VK_C);
    147     Dictionary.registerBoth(clear_button, "LogPane.Clear_Log", "LogPane.Clear_Log_Tooltip");
     146    clear_button.setText(GAI.dictionary.get("LogPane.Clear_Log"));
     147    clear_button.setToolTipText(GAI.dictionary.get("LogPane.Clear_Log_Tooltip"));
    148148
    149149    rbl = null;
     
    170170    logList_label = new JLabel();
    171171    logList_label.setOpaque(true);
    172     logList_label.setBackground(Configuration.getColor("coloring.workspace_heading_background", false));
    173     logList_label.setForeground(Configuration.getColor("coloring.workspace_heading_foreground", false));
    174     Dictionary.registerText(logList_label, "LogPane.Log_List");
     172    logList_label.setBackground(Configuration.getColor("coloring.workspace_heading_background"));
     173    logList_label.setForeground(Configuration.getColor("coloring.workspace_heading_foreground"));
     174    logList_label.setText(GAI.dictionary.get("LogPane.Log_List"));
    175175
    176176    // logContent_Pane
    177177    logContent_pane = new JPanel();
    178178    logContent_pane.setBorder(BorderFactory.createLoweredBevelBorder());
    179     logContent_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    180     logContent_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
     179    logContent_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     180    logContent_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
    181181    logContent_label = new JLabel();
    182182    logContent_label.setOpaque(true);
    183     logContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    184     logContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
    185     Dictionary.registerText(logContent_label, "LogPane.Log_Content");
    186 
     183    logContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     184    logContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
     185    logContent_label.setText(GAI.dictionary.get("LogPane.Log_Content"));
     186   
    187187    // TEXTAREA Layout
    188188    log_content = new JScrollPane(log_textarea);
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/MenuBar.java

    r10929 r10943  
    4343
    4444import org.greenstone.admin.GAI;
    45 import org.greenstone.core.Configuration;
    46 import org.greenstone.core.Dictionary;
    47 import org.greenstone.core.util.Utility;
     45import org.greenstone.admin.Configuration;
    4846
    4947/** The menu bar for the Administration tools main GUI.
     
    7270
    7371    static public ImageIcon HELP_ICON = null;
    74 
     72    static public ImageIcon BLANK_ICON = null;
     73   
    7574    //    public MenuBar(MenuListener Menu_listener)
    7675    public MenuBar(MenuListener menu_listener)
    7776    {
    7877    HELP_ICON = new ImageIcon(GAI.images_path +"help.gif");
     78    BLANK_ICON = new ImageIcon(GAI.images_path+"blank.gif");
     79
    7980    //file = new JMenu("File");
    8081    file = new JMenu();
    8182    file.setMnemonic(KeyEvent.VK_F);
    82     Dictionary.registerText(file, "Menu.File");
     83    file.setText(GAI.dictionary.get("Menu.File"));
    8384   
    8485    //file_save = new JMenuItem("Save");
     
    8687    file_save.addActionListener(GAI.ga_man);
    8788    file_save.setMnemonic(KeyEvent.VK_S);
    88     Dictionary.registerText(file_save, "Menu.File_Save");
    89 
     89    file_save.setText(GAI.dictionary.get("Menu.File_Save"));
     90   
    9091    //file_exit = new JMenuItem("Exit");
    9192    file_exit = new JMenuItem();
    9293    file_exit.addActionListener(GAI.ga_man);
    9394    file_exit.setMnemonic(KeyEvent.VK_X);
    94     Dictionary.registerText(file_exit, "Menu.File_Exit");
     95    file_exit.setText(GAI.dictionary.get("Menu.File_Exit"));
     96
    9597    //Layout (File menu)
    9698    file.add(file_save);
     
    102104    edit = new JMenu();
    103105    edit.setMnemonic(KeyEvent.VK_E);
    104     Dictionary.registerText(edit, "Menu.Edit");
    105          
     106    edit.setText(GAI.dictionary.get("Menu.Edit"));
     107             
    106108    // Help menu
    107109    //help = new JMenu("Help");
     
    109111    help.setMnemonic(KeyEvent.VK_H);
    110112    help.setIcon(HELP_ICON);
    111     Dictionary.setText(help, "Menu.Help");
    112 
     113    help.setText(GAI.dictionary.get("Menu.Help"));
     114   
    113115    help_general = new JMenuItem();
    114116    help_general.addActionListener(GAI.ga_man);
    115     Dictionary.registerText(help_general,"Source.General");
    116    
     117    help_general.setText(GAI.dictionary.get("Source.General"));
     118       
    117119    help_conf = new JMenuItem();
    118120    help_conf.addActionListener(GAI.ga_man);
    119     Dictionary.registerText(help_conf,"GAI.Configuration");
    120    
     121    help_conf.setText(GAI.dictionary.get("GAI.Configuration"));
     122       
    121123    help_ext = new JMenuItem();
    122124    help_ext.addActionListener(GAI.ga_man);
    123     Dictionary.registerText(help_ext,"GAI.Ext");
    124 
     125    help_ext.setText(GAI.dictionary.get("GAI.Ext"));
     126   
    125127    help_monitor = new JMenuItem();
    126128    help_monitor.addActionListener(GAI.ga_man);
    127     Dictionary.registerText(help_monitor,"GAI.Monitor");
    128 
     129    help_monitor.setText(GAI.dictionary.get("GAI.Monitor"));
     130   
    129131    help_log = new JMenuItem();
    130132    help_log.addActionListener(GAI.ga_man);
    131     Dictionary.registerText(help_log,"GAI.Log");
    132 
     133    help_log.setText(GAI.dictionary.get("GAI.Log"));
     134   
    133135    help_about = new JMenuItem();
    134136    help_about.addActionListener(GAI.ga_man);
    135     Dictionary.registerText(help_about,"Menu.Help_About");
    136        
     137    help_about.setText(GAI.dictionary.get("Menu.Help_About"));
     138           
    137139   
    138140    // Layout (help menu)
    139141    help.add(help_general);
    140142    help.add(new JSeparator());
    141     if (Configuration.get("admin.conf", true)) {
     143    if (Configuration.get("admin.conf")) {
    142144        help.add(help_conf);
    143145    }
    144     if (Configuration.get("admin.ext", true)) {
     146    if (Configuration.get("admin.ext")) {
    145147        help.add(help_ext);
    146148    }
    147     if (Configuration.get("admin.monitor", true)) {
     149    if (Configuration.get("admin.monitor")) {
    148150        help.add(help_monitor);
    149151    }
    150     if (Configuration.get("admin.log", true)) {
     152    if (Configuration.get("admin.log")) {
    151153        help.add(help_log);
    152154    }
     
    188190        selected = help.getItem(current_tab);
    189191        if(selected != null) {
    190         selected.setIcon(Utility.BLANK_ICON);
     192        selected.setIcon(BLANK_ICON);
    191193        }
    192194    }
     
    194196    selected = help.getItem(current_tab);
    195197    if(selected != null) {
    196         //selected.setIcon(Utility.HELP_ICON);
    197         //
     198        selected.setIcon(HELP_ICON);
     199       
    198200    }
    199201    selected = null;
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/SaveChangePrompt.java

    r10929 r10943  
    4545
    4646import org.greenstone.admin.gui.ConfPane;
    47 
    48 import org.greenstone.core.Configuration;
    49 import org.greenstone.core.DebugStream;
    5047
    5148/** This class provides the functionality to show a prompt to save changed file 
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/SetServerPane.java

    r10929 r10943  
    5555import java.sql.*;
    5656
    57 import org.greenstone.core.Configuration;
    58 import org.greenstone.core.Dictionary;
     57import org.greenstone.admin.Configuration;
    5958import org.greenstone.core.ParsingProgress;
    6059import org.greenstone.admin.GAI;
     
    122121    save_button.setToolTipText("Click this button to save up the setting");
    123122    save_button.setEnabled(false);
    124     //Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip");
    125123
    126124    install_button = new JButton("Install GSDL3", InstallButtonIcon);
     
    129127    install_button.setMnemonic(KeyEvent.VK_I);
    130128    install_button.setToolTipText("Click this button to Install Greenstone III");
    131     //Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip");
    132129
    133130    exit_button = new JButton("Exit Setting and Installation", ExitButtonIcon);
     
    136133    install_button.setMnemonic(KeyEvent.VK_I);
    137134    install_button.setToolTipText("Click this button to Exit the Setting and Installation of Greenstone III");
    138     //Dictionary.registerBoth(build_button, "CreatePane.Build_Collection", "CreatePane.Build_Collection_Tooltip");
    139135
    140136    //Setting&Installation buttons
     
    211207    main_pane.add(setting_table_pane, BorderLayout.CENTER);
    212208    main_pane.add(outter_control_pane, BorderLayout.SOUTH);
    213     main_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background", false));
    214     main_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground", false));
     209    main_pane.setBackground(Configuration.getColor("coloring.workspace_selection_background"));
     210    main_pane.setForeground(Configuration.getColor("coloring.workspace_selection_foreground"));
    215211   
    216212    // Center and display
     
    233229        int result = JOptionPane.showConfirmDialog((Component) null, "Do you really want to save the setting?", "Save Confirmation", JOptionPane.YES_NO_OPTION);
    234230        if ( result == JOptionPane.YES_OPTION) {
    235         updateSetting (GAI.build_file);
    236         file_saved = writeFile (GAI.build_file);
     231        updateSetting (GAI.build_properties_file);
     232        file_saved = writeFile (GAI.build_properties_file);
    237233        if (file_saved) {
    238234            JOptionPane.showMessageDialog((Component) null,"Change has been saved succefully!");
     
    248244    }
    249245
    250     public void updateSetting(File build_file) {
    251     readFile (GAI.build_file);
     246    public void updateSetting(File build_properties_file) {
     247    readFile (GAI.build_properties_file);
    252248    String new_string;
    253249    for (int i=0; i < server_setting_table_model.getRowCount(); i++){
     
    265261   
    266262    }
    267     public void readFile (File build_file) {
    268     String filename = build_file.getPath();
     263    public void readFile (File build_properties_file) {
     264    String filename = build_properties_file.getPath();
    269265    String fileLine;
    270266    /*conf_array[] store all the details from the build.properties*/
     
    284280    }
    285281   
    286     public boolean writeFile(File build_file){
    287     String filename = build_file.getPath();
     282    public boolean writeFile(File build_properties_file){
     283    String filename = build_properties_file.getPath();
    288284    try {
    289285        BufferedWriter conf_out = new BufferedWriter(new FileWriter(filename));
  • trunk/gsdl3/src/java/org/greenstone/admin/gui/ThreadControl.java

    r10929 r10943  
    6767    public void executeAntTarget(String command_string) throws IOException  {
    6868    Project ant = new Project();
    69     File buildFile = new File (GAI.gsdl3_path + File.separator + "build.xml");
     69    File buildFile = new File (GAI.gsdl3_src_home + File.separator + "build.xml");
    7070   
    7171    //Set up a PrintStream pointing at a file
    7272    //FileOutputStream ant_out =
    73     //   new FileOutputStream(GAI.gsdl3_path + File.separator + "ant_out.log");
     73    //   new FileOutputStream(GAI.gsdl3_src_home + File.separator + "ant_out.log");
    7474    //FileOutputStream ant_err =
    75     //   new FileOutputStream(GAI.gsdl3_path + File.separator + "ant_err.log");
     75    //   new FileOutputStream(GAI.gsdl3_src_home + File.separator + "ant_err.log");
    7676   
    7777    //  BufferedOutputStream ant_out_buffer =
     
    130130    /*public boolean checkAntResult(){
    131131    try {
    132         String filename = GAI.gsdl3_path + File.separator +"ant_out.log";
     132        String filename = GAI.gsdl3_src_home + File.separator +"ant_out.log";
    133133        String fileLine;
    134134       
Note: See TracChangeset for help on using the changeset viewer.