Changeset 10793 for branches/ant-install-branch/gsdl3/src/java/org/greenstone/admin/gui/MenuBar.java
- Timestamp:
- 2005-10-31T12:19:10+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ant-install-branch/gsdl3/src/java/org/greenstone/admin/gui/MenuBar.java
r9972 r10793 2 2 *######################################################################### 3 3 * 4 * A component of the G athererapplication, part of the Greenstone digital4 * A component of the GAI application, 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. … … 43 43 44 44 import org.greenstone.admin.GAI; 45 import org.greenstone.core.Configuration; 46 import org.greenstone.core.Dictionary; 45 47 import org.greenstone.core.util.Utility; 46 48 … … 49 51 * @version 50 52 */ 51 52 53 public class MenuBar 53 54 extends JMenuBar { … … 58 59 private JMenu edit = null; 59 60 public JMenu help = null; 60 //public JMenuItem file_associations;61 61 // public JMenuItem file_cdimage = null; 62 62 // public JMenuItem file_close = null; 63 63 //public JMenuItem file_delete = null; 64 public JMenuItem file_exit = null; 65 // public JMenuItem file_exportas = null; 66 // public JMenuItem file_new = null; 67 //public JMenuItem file_open = null; 68 //public JMenuItem file_options = null; 69 // public JMenuItem file_save = null; 70 // public JMenuItem edit_copy; 71 //public JMenuItem edit_cut; 72 // public JMenuItem edit_paste; 64 public JMenuItem file_exit = null; 65 public JMenuItem file_save = null; 66 public JMenuItem help_general; 73 67 public JMenuItem help_conf; 74 68 public JMenuItem help_ext; 75 69 public JMenuItem help_monitor; 76 70 public JMenuItem help_log; 77 //public JMenuItem help_gather;78 //public JMenuItem help_enrich;79 //public JMenuItem help_design;80 //public JMenuItem help_create;81 71 public JMenuItem help_about; 82 72 83 //public static String imagePath = "/research/chi/gsdl3/src/java/org/greenstone/admin/images/";84 public static String imagePath = "/research/chi/gsdl3-test/gsdl3/src/java/org/greenstone/admin/images/";85 86 73 static public ImageIcon HELP_ICON = null; 87 74 88 75 // public MenuBar(MenuListener Menu_listener) 89 public MenuBar( )76 public MenuBar(MenuListener menu_listener) 90 77 { 91 HELP_ICON = new ImageIcon("images/help.gif"); 92 file = new JMenu("File"); 78 HELP_ICON = new ImageIcon(GAI.images_path +"help.gif"); 79 //file = new JMenu("File"); 80 file = new JMenu(); 93 81 file.setMnemonic(KeyEvent.VK_F); 94 //Dictionary.registerText(file, "Menu.File"); 95 96 /*file_associations = new JMenuItem(); 97 file_associations.addActionListener(Gatherer.g_man); 98 file_associations.setMnemonic(KeyEvent.VK_A); 99 Dictionary.registerText(file_associations, "Menu.File_Associations"); 100 101 file_cdimage = new JMenuItem(); 102 file_cdimage.addActionListener(Gatherer.g_man); 103 file_cdimage.setMnemonic(KeyEvent.VK_I); 104 Dictionary.registerText(file_cdimage, "Menu.File_CDimage"); 105 106 file_close = new JMenuItem(); 107 file_close.addActionListener(Gatherer.g_man); 108 file_close.setEnabled(false); 109 file_close.setMnemonic(KeyEvent.VK_C); 110 Dictionary.registerText(file_close, "Menu.File_Close"); 111 112 file_delete = new JMenuItem(); 113 file_delete.addActionListener(Gatherer.g_man); 114 file_delete.setMnemonic(KeyEvent.VK_D); 115 Dictionary.registerText(file_delete, "Menu.File_Delete");*/ 116 117 file_exit = new JMenuItem("Exit"); 82 Dictionary.registerText(file, "Menu.File"); 83 84 //file_save = new JMenuItem("Save"); 85 file_save = new JMenuItem(); 86 file_save.addActionListener(GAI.ga_man); 87 file_save.setMnemonic(KeyEvent.VK_S); 88 Dictionary.registerText(file_save, "Menu.File_Save"); 89 90 //file_exit = new JMenuItem("Exit"); 91 file_exit = new JMenuItem(); 118 92 file_exit.addActionListener(GAI.ga_man); 119 93 file_exit.setMnemonic(KeyEvent.VK_X); 120 //Dictionary.registerText(file_exit, "Menu.File_Exit"); 121 122 /*file_exportas = new JMenuItem(); 123 file_exportas.addActionListener(Gatherer.g_man); 124 file_exportas.setMnemonic(KeyEvent.VK_E); 125 Dictionary.registerText(file_exportas, "Menu.File_ExportAs");*/ 126 127 /*file_new = new JMenuItem(); 128 file_new.addActionListener(Gatherer.g_man); 129 file_new.setMnemonic(KeyEvent.VK_N); 130 Dictionary.registerText(file_new, "Menu.File_New"); 131 132 file_open = new JMenuItem(); 133 file_open.addActionListener(Gatherer.g_man); 134 file_open.setMnemonic(KeyEvent.VK_O); 135 Dictionary.registerText(file_open, "Menu.File_Open"); 136 137 file_options = new JMenuItem(); 138 file_options.addActionListener(Gatherer.g_man); 139 file_options.setMnemonic(KeyEvent.VK_P); 140 Dictionary.registerText(file_options, "Menu.File_Options"); 141 142 file_save = new JMenuItem(); 143 file_save.addActionListener(Gatherer.g_man); 144 file_save.setEnabled(false); 145 file_save.setMnemonic(KeyEvent.VK_S); 146 Dictionary.registerText(file_save, "Menu.File_Save");*/ 147 148 // Layout (file menu) 149 /*file.add(file_new); 150 file.add(file_open); 94 Dictionary.registerText(file_exit, "Menu.File_Exit"); 95 //Layout (File menu) 151 96 file.add(file_save); 152 file.add(file_close);*/153 97 file.add(new JSeparator()); 154 /*file.add(file_delete);155 file.add(file_exportas);156 file.add(file_cdimage);157 file.add(new JSeparator());158 file.add(file_associations);159 file.add(file_options);160 file.add(new JSeparator());*/161 98 file.add(file_exit); 162 99 163 100 // Edit menu 164 edit = new JMenu("Edit"); 101 //edit = new JMenu("Edit"); 102 edit = new JMenu(); 165 103 edit.setMnemonic(KeyEvent.VK_E); 166 //Dictionary.registerText(edit, "Menu.Edit");104 Dictionary.registerText(edit, "Menu.Edit"); 167 105 168 /*edit_cut = new JMenuItem();169 edit_cut.addActionListener(Gatherer.g_man);170 edit_cut.setMnemonic(KeyEvent.VK_X);171 Dictionary.registerText(edit_cut, "Menu.Edit_Cut");172 173 edit_copy = new JMenuItem();174 edit_copy.addActionListener(Gatherer.g_man);175 edit_copy.setMnemonic(KeyEvent.VK_C);176 Dictionary.registerText(edit_copy, "Menu.Edit_Copy");177 178 edit_paste = new JMenuItem();179 edit_paste.addActionListener(Gatherer.g_man);180 edit_paste.setMnemonic(KeyEvent.VK_V);181 Dictionary.registerText(edit_paste, "Menu.Edit_Paste");182 183 // Layout (edit menu)184 edit.add(edit_cut);185 edit.add(edit_copy);186 edit.add(edit_paste);*/187 188 106 // Help menu 189 help = new JMenu("Help"); 107 //help = new JMenu("Help"); 108 help = new JMenu(); 190 109 help.setMnemonic(KeyEvent.VK_H); 191 110 help.setIcon(HELP_ICON); 192 //Dictionary.setText(help, "Menu.Help"); 193 194 help_conf = new JMenuItem("Configuration"); 195 //help_log.addActionListener(Gatherer.g_man); 196 //Dictionary.registerText(help_general, "Source.General"); 197 198 help_ext = new JMenuItem("Ext"); 199 help_monitor = new JMenuItem("Monitor"); 200 help_log = new JMenuItem("Log"); 201 202 /*help_gather = new JMenuItem(Utility.BLANK_ICON); 203 help_gather.addActionListener(Gatherer.g_man); 204 Dictionary.registerText(help_gather, "GUI.Gather"); 205 206 help_enrich = new JMenuItem(Utility.BLANK_ICON); 207 help_enrich.addActionListener(Gatherer.g_man); 208 Dictionary.registerText(help_enrich, "GUI.Enrich"); 209 210 help_design = new JMenuItem(Utility.BLANK_ICON); 211 help_design.addActionListener(Gatherer.g_man); 212 Dictionary.registerText(help_design, "GUI.Design"); 213 214 help_create = new JMenuItem(Utility.BLANK_ICON); 215 help_create.addActionListener(Gatherer.g_man); 216 Dictionary.registerText(help_create, "GUI.Create");*/ 217 218 help_about = new JMenuItem("About"); 219 //help_about.addActionListener(Gatherer.g_man); 220 //Dictionary.registerText(help_about, "Menu.Help_About"); 221 111 Dictionary.setText(help, "Menu.Help"); 112 113 help_general = new JMenuItem(); 114 help_general.addActionListener(GAI.ga_man); 115 Dictionary.registerText(help_general,"Source.General"); 116 117 help_conf = new JMenuItem(); 118 help_conf.addActionListener(GAI.ga_man); 119 Dictionary.registerText(help_conf,"GAI.Configuration"); 120 121 help_ext = new JMenuItem(); 122 help_ext.addActionListener(GAI.ga_man); 123 Dictionary.registerText(help_ext,"GAI.Ext"); 124 125 help_monitor = new JMenuItem(); 126 help_monitor.addActionListener(GAI.ga_man); 127 Dictionary.registerText(help_monitor,"GAI.Monitor"); 128 129 help_log = new JMenuItem(); 130 help_log.addActionListener(GAI.ga_man); 131 Dictionary.registerText(help_log,"GAI.Log"); 132 133 help_about = new JMenuItem(); 134 help_about.addActionListener(GAI.ga_man); 135 Dictionary.registerText(help_about,"Menu.Help_About"); 136 137 222 138 // Layout (help menu) 223 help.add(help_conf); 224 help.add(help_ext); 225 help.add(help_monitor); 226 help.add(help_log); 139 help.add(help_general); 227 140 help.add(new JSeparator()); 228 229 /*if (Configuration.get("workflow.download", true)) { 230 help.add(help_download); 231 } 232 if (Configuration.get("workflow.gather", true)) { 233 help.add(help_gather); 234 } 235 if (Configuration.get("workflow.enrich", true)) { 236 help.add(help_enrich); 237 } 238 if (Configuration.get("workflow.design", true)) { 239 help.add(help_design); 240 } 241 if (Configuration.get("workflow.create", true)) { 242 help.add(help_create); 243 }*/ 141 if (Configuration.get("admin.conf", true)) { 142 help.add(help_conf); 143 } 144 if (Configuration.get("admin.ext", true)) { 145 help.add(help_ext); 146 } 147 if (Configuration.get("admin.monitor", true)) { 148 help.add(help_monitor); 149 } 150 if (Configuration.get("admin.log", true)) { 151 help.add(help_log); 152 } 244 153 245 154 help.add(new JSeparator());
Note:
See TracChangeset
for help on using the changeset viewer.