Changeset 10953 for trunk/gsdl3/src
- Timestamp:
- 2005-11-25T14:07:14+13:00 (19 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/admin
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/admin/Configuration.java
r10939 r10953 39 39 40 40 // eventually this class will hold configuration settings from a config file. For now, lets use static info 41 // loosely based aroundGatherer Configuration41 // loosely copied from Gatherer Configuration 42 42 public class Configuration { 43 43 … … 63 63 hash.put("coloring.workspace_selection_foreground", "0, 0, 0"); 64 64 hash.put("coloring.workspace_selection_background", "176, 208, 176"); 65 hash.put("coloring.table_noneditable_background", " ");66 hash.put("coloring.table_editable_background", " ");65 hash.put("coloring.table_noneditable_background", "255, 255, 255"); 66 hash.put("coloring.table_editable_background", "255, 255, 255"); 67 67 hash.put("coloring.collection_tree_background", "224, 240, 224"); 68 68 hash.put("coloring.collection_tree_foreground", "0, 0, 0"); … … 114 114 Color result = Color.white; // Default 115 115 String raw = (String)hash.get(property); 116 if (raw == null ) {116 if (raw == null || raw.equals("")) { 117 117 return result; 118 118 } -
trunk/gsdl3/src/java/org/greenstone/admin/GAI.java
r10943 r10953 2 2 *######################################################################### 3 3 * 4 * A component of the G atherer application, part of the Greenstone digital4 * A component of the Greenstone Administrator Interface, part of the Greenstone digital 5 5 * library suite from the New Zealand Digital Library Project at the 6 6 * University of Waikato, New Zealand. … … 55 55 public static String gsdl3_src_home; 56 56 public static String gsdl3_web_home; 57 public static String tomcat_home; 57 58 58 59 public static File build_properties_file; 59 60 60 public static String admin_path;61 public static String tomcat_file_path;62 61 public static String images_path; 63 public static File build_file;64 public static File site_conf;65 public static File interface_conf;66 62 /** A public reference to the GAIManager. */ 67 63 static public GAIManager ga_man; … … 81 77 this.dictionary = new Dictionary("gai", Configuration.getLocale("general.locale")); 82 78 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"; 79 // this may change if using preinstalled tomcat 80 this.tomcat_home = this.gsdl3_src_home+File.separatorChar+"packages"+File.separatorChar+"tomcat"; 81 82 // should come from classpath ?? 83 this.images_path = this.gsdl3_src_home+File.separatorChar+"resources"+File.separatorChar+"images"+File.separatorChar; 84 84 // start the GAIManager 85 85 ga_man = new GAIManager(screen_size); 86 86 ga_man.display(); 87 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();95 88 } 96 89 … … 116 109 GAI gai = new GAI(args[0], args[1]); 117 110 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();125 111 } 126 112 -
trunk/gsdl3/src/java/org/greenstone/admin/GAIFirstSettingFrame.java
r10943 r10953 101 101 102 102 // ImagesIcon for the buttons 103 ImageIcon setYesButtonIcon = new ImageIcon(GAI. admin_path + "images/toolbarButtonGraphics/general/Refresh16.gif");104 ImageIcon setNoButtonIcon = new ImageIcon(GAI. admin_path + "images/toolbarButtonGraphics/general/exit16.gif");103 ImageIcon setYesButtonIcon = new ImageIcon(GAI.images_path + "refresh.gif"); 104 ImageIcon setNoButtonIcon = new ImageIcon(GAI.images_path + "exit.gif"); 105 105 106 106 fset_yes_button = new JButton("Yes", setYesButtonIcon); -
trunk/gsdl3/src/java/org/greenstone/admin/GAIManager.java
r10943 r10953 100 100 public void display(){ 101 101 CONF_ICON = new ImageIcon (GAI.images_path + "create.gif"); 102 EXT_ICON = new ImageIcon (GAI.images_path + " toolbarButtonGraphics/general/Information16.gif");103 MONITOR_ICON = new ImageIcon (GAI.images_path + " toolbarButtonGraphics/general/Zoom16.gif");104 LOG_ICON = new ImageIcon (GAI.images_path + " toolbarButtonGraphics/general/History16.gif");102 EXT_ICON = new ImageIcon (GAI.images_path + "information.gif"); 103 MONITOR_ICON = new ImageIcon (GAI.images_path + "zoom.gif"); 104 LOG_ICON = new ImageIcon (GAI.images_path + "history.gif"); 105 105 content_pane = (JPanel) this.getContentPane(); 106 106 … … 164 164 public void actionPerformed (ActionEvent event){ 165 165 Object esrc = event.getSource(); 166 boolean project_conf_changed = false;167 boolean site_conf_changed = false;168 boolean interface_conf_changed = false;169 166 if (esrc == menu_bar.file_exit){ 170 project_conf_changed = conf_pane.ProjectConfChanged(); 171 site_conf_changed = conf_pane.site_conf.confChanged(); 172 interface_conf_changed = conf_pane.interface_conf.confChanged(); 173 /* Check if the Project and Site configuration files have been changed, 174 * if changed, prompt to users if they want to save*/ 175 if (project_conf_changed || site_conf_changed || interface_conf_changed) { 167 if (conf_pane.configurationChanged()) { 168 // prompt users for save 176 169 int result = JOptionPane.showConfirmDialog((Component) null, "The Configuration files have been changed, do you want to save the change", "Save Confirmation", JOptionPane.YES_NO_OPTION); 177 170 if ( result == JOptionPane.YES_OPTION) { 178 conf_pane.saveProjectConf(GAI.build_file); 179 conf_pane.site_conf.saveFile(GAI.site_conf); 180 conf_pane.interface_conf.saveFile(GAI.interface_conf); 171 conf_pane.save(); 181 172 } 182 173 } … … 185 176 else if (esrc == menu_bar.file_save){ 186 177 /* sliently and Globally save Project and Site configuration*/ 187 project_conf_changed = conf_pane.ProjectConfChanged(); 188 site_conf_changed = conf_pane.site_conf.confChanged(); 189 interface_conf_changed = conf_pane.interface_conf.confChanged(); 190 if (project_conf_changed) { 191 conf_pane.saveProjectConf(GAI.build_file); 192 } 193 if (site_conf_changed){ 194 conf_pane.site_conf.saveFile(GAI.site_conf); 195 } 196 if (interface_conf_changed) { 197 conf_pane.interface_conf.saveFile(GAI.interface_conf); 198 } 178 conf_pane.save(); 199 179 } 200 180 else if (esrc == menu_bar.help_conf){ -
trunk/gsdl3/src/java/org/greenstone/admin/gui/ConfPane.java
r10943 r10953 61 61 import org.greenstone.admin.gui.SiteConfSetting; 62 62 import org.greenstone.core.ParsingProgress; 63 import org.greenstone.gsdl3.util.GSFile; 63 64 64 65 /** The Configuration pane is to view the status of relevant configure files in GSIII … … 155 156 156 157 //Site configuration 157 public File site_conf_file = GAI.site_conf; 158 public File interface_conf_file = GAI.interface_conf; 158 // TODO!! there are more than one site and interface - need to extend this 159 public File site_conf_file = new File(GSFile.siteConfigFile(GSFile.siteHome(GAI.gsdl3_web_home, "localsite"))); 160 public File interface_conf_file = new File(GSFile.interfaceConfigFile(GSFile.interfaceHome(GAI.gsdl3_web_home, "default"))); 159 161 public boolean project_conf_changed = false; 160 162 … … 220 222 RestartMysqlButtonListener rmbl = new RestartMysqlButtonListener(); 221 223 222 ImageIcon startupTomcatButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/redo16.gif");223 ImageIcon shutdownTomcatButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/stop16.gif");224 ImageIcon restartTomcatButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/stop16.gif");225 226 ImageIcon startupMysqlButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/redo16.gif");227 ImageIcon shutdownMysqlButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/stop16.gif");228 ImageIcon restartMysqlButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/stop16.gif");229 ImageIcon saveButtonIcon = new ImageIcon(GAI.images_path + " toolbarButtonGraphics/general/Save16.gif");224 ImageIcon startupTomcatButtonIcon = new ImageIcon(GAI.images_path + "redo.gif"); 225 ImageIcon shutdownTomcatButtonIcon = new ImageIcon(GAI.images_path + "stop.gif"); 226 ImageIcon restartTomcatButtonIcon = new ImageIcon(GAI.images_path + "stop.gif"); 227 228 ImageIcon startupMysqlButtonIcon = new ImageIcon(GAI.images_path + "redo.gif"); 229 ImageIcon shutdownMysqlButtonIcon = new ImageIcon(GAI.images_path + "stop.gif"); 230 ImageIcon restartMysqlButtonIcon = new ImageIcon(GAI.images_path + "stop.gif"); 231 ImageIcon saveButtonIcon = new ImageIcon(GAI.images_path + "save.gif"); 230 232 231 233 startup_tomcat_button = new JButton(); … … 318 320 confContent_label.setBackground(Configuration.getColor("coloring.workspace_selection_background")); 319 321 confContent_label.setForeground(Configuration.getColor("coloring.workspace_selection_foreground")); 320 confContent_label.setText(GAI.dictionary.get("ConfPane.Conf_ List"));322 confContent_label.setText(GAI.dictionary.get("ConfPane.Conf_Content")); 321 323 322 324 conf_table_model = new ConfSettingTableModel(); … … 427 429 this.add(main_conf_pane, BorderLayout.CENTER); 428 430 } 429 431 432 public void save() { 433 if (project_conf_changed) { 434 saveProjectConf(GAI.build_properties_file); 435 } 436 if (site_conf.confChanged()){ 437 site_conf.saveFile(site_conf_file); 438 } 439 if (interface_conf.confChanged()) { 440 interface_conf.saveFile(interface_conf_file); 441 } 442 443 444 } 445 446 public boolean configurationChanged() { 447 return (project_conf_changed || site_conf.confChanged() || 448 interface_conf.confChanged()); 449 450 } 451 430 452 private class StartupTomcatButtonListener 431 453 implements ActionListener { … … 594 616 } 595 617 596 public boolean ProjectConfChanged() {618 public boolean projectConfChanged() { 597 619 return project_conf_changed; 598 620 } -
trunk/gsdl3/src/java/org/greenstone/admin/gui/LogPane.java
r10943 r10953 351 351 //no selection 352 352 } else if (log_list.getSelectedIndex () == 0 ) { 353 log_file = new File (GAI.tomcat_ file_path+"catalina.out");353 log_file = new File (GAI.tomcat_home+File.separatorChar+"logs"+File.separatorChar+"catalina.out"); 354 354 String filename = log_file.getPath(); 355 355 updateLogsContent(filename); -
trunk/gsdl3/src/java/org/greenstone/admin/gui/SetServerPane.java
r10943 r10953 112 112 113 113 // ImagesIcon for the buttons 114 ImageIcon SaveButtonIcon = new ImageIcon(GAI. admin_path + "images/toolbarButtonGraphics/general/Refresh16.gif");115 ImageIcon InstallButtonIcon = new ImageIcon(GAI. admin_path + "images/toolbarButtonGraphics/general/exit16.gif");116 ImageIcon ExitButtonIcon = new ImageIcon(GAI. admin_path + "images/toolbarButtonGraphics/general/exit16.gif");114 ImageIcon SaveButtonIcon = new ImageIcon(GAI.images_path + "refresh.gif"); 115 ImageIcon InstallButtonIcon = new ImageIcon(GAI.images_path + "exit.gif"); 116 ImageIcon ExitButtonIcon = new ImageIcon(GAI.images_path + "exit.gif"); 117 117 118 118 save_button = new JButton("Save Setting", SaveButtonIcon);
Note:
See TracChangeset
for help on using the changeset viewer.