- Timestamp:
- 2006-07-10T15:02:33+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r12071 r12123 701 701 public PluginControl() { 702 702 // Create 703 add = new GLIButton(); 704 add.setMnemonic(KeyEvent.VK_A); 705 Dictionary.registerBoth(add, "CDM.PlugInManager.Add", "CDM.PlugInManager.Add_Tooltip"); 706 703 add = new GLIButton(Dictionary.get("CDM.PlugInManager.Add"), Dictionary.get("CDM.PlugInManager.Add_Tooltip")); 704 707 705 button_pane = new JPanel(); 708 706 central_pane = new JPanel(); 709 707 710 configure = new GLIButton( );708 configure = new GLIButton(Dictionary.get("CDM.PlugInManager.Configure"), Dictionary.get("CDM.PlugInManager.Configure_Tooltip")); 711 709 configure.setEnabled(false); 712 configure.setMnemonic(KeyEvent.VK_C); 713 Dictionary.registerBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip"); 714 710 715 711 JPanel header_pane = new DesignPaneHeader("CDM.GUI.Plugins", "plugins"); 716 move_up_button = new GLIButton( "", JarTools.getImage("arrow-up.gif"));712 move_up_button = new GLIButton(Dictionary.get("CDM.Move.Move_Up"), JarTools.getImage("arrow-up.gif"), Dictionary.get("CDM.Move.Move_Up_Tooltip")); 717 713 move_up_button.setEnabled(false); 718 move_up_button.setMnemonic(KeyEvent.VK_U); 719 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 720 721 move_down_button = new GLIButton("", JarTools.getImage("arrow-down.gif")); 714 715 move_down_button = new GLIButton(Dictionary.get("CDM.Move.Move_Down"), JarTools.getImage("arrow-down.gif"), Dictionary.get("CDM.Move.Move_Down_Tooltip")); 722 716 move_down_button.setEnabled(false); 723 move_down_button.setMnemonic(KeyEvent.VK_D); 724 Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip"); 725 717 726 718 movement_pane = new JPanel(); 727 719 … … 735 727 picl.itemStateChanged(new ItemEvent(plugin, 0, null, ItemEvent.SELECTED)); 736 728 737 plugin_label = new JLabel(); 738 Dictionary.registerText(plugin_label, "CDM.PlugInManager.PlugIn"); 739 729 plugin_label = new JLabel(Dictionary.get("CDM.PlugInManager.PlugIn")); 730 740 731 plugin_list = new JList(model); 741 732 plugin_list.setCellRenderer(new ListRenderer()); 742 733 plugin_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 743 plugin_list_label = new JLabel( );734 plugin_list_label = new JLabel(Dictionary.get("CDM.PlugInManager.Assigned")); 744 735 //plugin_list_label.setHorizontalAlignment(JLabel.CENTER); 745 736 plugin_list_label.setOpaque(true); 746 Dictionary.registerText(plugin_list_label, "CDM.PlugInManager.Assigned"); 747 737 748 738 plugin_list_pane = new JPanel(); 749 739 plugin_pane = new JPanel(); 750 740 751 remove = new GLIButton( );741 remove = new GLIButton(Dictionary.get("CDM.PlugInManager.Remove"), Dictionary.get("CDM.PlugInManager.Remove_Tooltip")); 752 742 remove.setEnabled(false); 753 remove.setMnemonic(KeyEvent.VK_R); 754 Dictionary.registerBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip"); 755 743 756 744 // Listeners 757 745 add.addActionListener(new AddListener()); //all_change_listener is listening to the ArgumentConfiguration … … 1074 1062 // And reset the tooltip. If the plugin is null or is a string, then go back to the default message 1075 1063 if(current_selection == null || current_selection instanceof String) { 1076 Dictionary.registerTooltip(plugin, "CDM.PlugInManager.PlugIn_Tooltip");1064 plugin.setToolTipText(Dictionary.get("CDM.PlugInManager.PlugIn_Tooltip")); 1077 1065 } 1078 1066 else { 1079 1067 Plugin current_plugin = (Plugin) current_selection; 1080 Dictionary.registerTooltipText(plugin,Utility.formatHTMLWidth(current_plugin.getDescription(), 40));1068 plugin.setToolTipText(Utility.formatHTMLWidth(current_plugin.getDescription(), 40)); 1081 1069 current_plugin = null; 1082 1070 } … … 1154 1142 setModal(true); 1155 1143 setSize(size); 1156 Dictionary.setText(this, "CDM.PluginManager.SuggestedPluginListTitle");1144 setTitle(Dictionary.get("CDM.PluginManager.SuggestedPluginListTitle")); 1157 1145 1158 1146 String[] args = new String[1]; 1159 1147 args[0] = filename; 1160 1148 1161 JTextArea instructions_textarea = new JTextArea( );1149 JTextArea instructions_textarea = new JTextArea(Dictionary.get("CDM.PluginManager.Plugin_Suggestion_Prompt", args)); 1162 1150 instructions_textarea.setCaretPosition(0); 1163 1151 instructions_textarea.setEditable(false); … … 1165 1153 instructions_textarea.setRows(5); 1166 1154 instructions_textarea.setWrapStyleWord(true); 1167 Dictionary.setText(instructions_textarea, "CDM.PluginManager.Plugin_Suggestion_Prompt", args); 1168 1169 JLabel suitable_plugins_label = new JLabel(); 1170 Dictionary.registerText(suitable_plugins_label, "CDM.PlugInManager.PlugIn"); 1155 1156 JLabel suitable_plugins_label = new JLabel(Dictionary.get("CDM.PlugInManager.PlugIn")); 1171 1157 suitable_plugins_label.setBorder(BorderFactory.createEmptyBorder(0,0,5,0)); 1172 1158 … … 1183 1169 suitable_plugins_pane.add(suitable_plugins_combobox, BorderLayout.CENTER); 1184 1170 1185 add_button = new GLIButton(); 1186 Dictionary.setBoth(add_button, "CDM.PlugInManager.QuickAdd", "CDM.PlugInManager.Add_Tooltip"); 1187 ignore_button = new GLIButton(); 1188 Dictionary.setBoth(ignore_button, "CDM.PlugInManager.Ignore","CDM.PlugInManager.Ignore_Tooltip" ); 1189 1171 add_button = new GLIButton(Dictionary.get("CDM.PlugInManager.QuickAdd"), Dictionary.get("CDM.PlugInManager.Add_Tooltip")); 1172 ignore_button = new GLIButton(Dictionary.get("CDM.PlugInManager.Ignore"), Dictionary.get("CDM.PlugInManager.Ignore_Tooltip")); 1173 1190 1174 add_button.addActionListener(this); 1191 1175 ignore_button.addActionListener(this);
Note:
See TracChangeset
for help on using the changeset viewer.