- Timestamp:
- 2006-01-13T14:28:56+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r10726 r11031 43 43 import org.greenstone.gatherer.LocalGreenstone; 44 44 import org.greenstone.gatherer.collection.CollectionContentsChangedListener; 45 import org.greenstone.gatherer.gui.DesignPaneHeader; 45 46 import org.greenstone.gatherer.gui.GComboBox; 46 47 import org.greenstone.gatherer.gui.GLIButton; … … 54 55 import org.w3c.dom.*; 55 56 import org.xml.sax.*; 57 56 58 57 59 /** This class is for maintaining a list of known plug-ins, and importing new plugins using the parser. */ … … 664 666 /** Button for configuring the selected plugin. */ 665 667 private JButton configure = null; 666 /** Buttom to move an assinged plugin as low in the order as possible. */667 //private JButton move_bottom_button = null;668 668 /** Button to move an assigned plugin one position lower in the order. */ 669 669 private JButton move_down_button = null; 670 /** Button to move an assigned plugin as high in the order as possible. */671 //private JButton move_top_button = null;672 670 /** Button to move an assigned plugin one position higher in the order. */ 673 671 private JButton move_up_button = null; … … 680 678 /** The label above the assigned plugin list. */ 681 679 private JLabel plugin_list_label = null; 682 /** The title of this view. */683 private JLabel title = null;684 680 /** A list of assigned plugins. */ 685 681 private JList plugin_list = null; … … 688 684 /** The region which divides the central portion of the view into list and controls */ 689 685 private JPanel central_pane = null; 690 /** The area where title label and instructions sit. */691 private JPanel header_pane = null;692 686 /** The area where movement buttons are placed. */ 693 687 private JPanel movement_pane = null; … … 696 690 /** The pane containing the assigned plugin list and its label. */ 697 691 private JPanel plugin_list_pane = null; 698 /** The text area containing instructions on the use of this control. */699 private JTextArea instructions = null;700 692 701 693 /** Constructor. … … 715 707 Dictionary.registerBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip"); 716 708 717 header_pane = new JPanel(); 718 719 instructions = new JTextArea(); 720 instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false)); 721 instructions.setEditable(false); 722 instructions.setLineWrap(true); 723 instructions.setRows(6); 724 instructions.setWrapStyleWord(true); 725 Dictionary.registerText(instructions, "CDM.PlugInManager.Instructions"); 726 709 JPanel header_pane = new DesignPaneHeader("CDM.GUI.Plugins", "plugins"); 727 710 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 728 711 move_up_button.setEnabled(false); … … 753 736 plugin_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 754 737 plugin_list_label = new JLabel(); 755 plugin_list_label.setHorizontalAlignment(JLabel.CENTER);738 //plugin_list_label.setHorizontalAlignment(JLabel.CENTER); 756 739 plugin_list_label.setOpaque(true); 757 740 Dictionary.registerText(plugin_list_label, "CDM.PlugInManager.Assigned"); … … 765 748 Dictionary.registerBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip"); 766 749 767 title = new JLabel();768 title.setHorizontalAlignment(JLabel.CENTER);769 title.setOpaque(true);770 Dictionary.registerText(title, "CDM.PlugInManager.Title");771 772 750 // Listeners 773 751 add.addActionListener(new AddListener()); //all_change_listener is listening to the ArgumentConfiguration 774 752 configure.addActionListener(new ConfigureListener()); 775 753 MoveListener ml = new MoveListener(); 776 //move_bottom_button.addActionListener(ml);777 754 move_down_button.addActionListener(ml); 778 755 move_down_button.addActionListener(CollectionDesignManager.all_change_listener); 779 //move_top_button.addActionListener(ml);780 756 move_up_button.addActionListener(ml); 781 757 move_up_button.addActionListener(CollectionDesignManager.all_change_listener); … … 788 764 789 765 // Layout 790 title.setBorder(BorderFactory.createEmptyBorder(0,0,2,0));791 792 instructions.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));793 794 header_pane.setLayout(new BorderLayout());795 header_pane.add(title, BorderLayout.NORTH);796 header_pane.add(new JScrollPane(instructions), BorderLayout.CENTER);797 798 766 plugin_list_label.setBorder(BorderFactory.createEmptyBorder(0,2,0,2)); 799 767 … … 850 818 851 819 /** This method is overridden to ensure the instructions are scrolled to top, before the super classes updateUI() is called. 820 no longer have instructions, do we still need updateUI??? 852 821 */ 853 822 public void gainFocus() { 854 if(instructions != null) {855 instructions.setCaretPosition(0);856 }857 823 super.updateUI(); 858 824 }
Note:
See TracChangeset
for help on using the changeset viewer.