Ignore:
Timestamp:
2006-01-13T14:28:56+13:00 (18 years ago)
Author:
kjdon
Message:

removed instructions, changed title to be the same string as in the contents, and use a new class DesignPaneHeader to create teh header which has title and help button

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java

    r10726 r11031  
    4343import org.greenstone.gatherer.LocalGreenstone;
    4444import org.greenstone.gatherer.collection.CollectionContentsChangedListener;
     45import org.greenstone.gatherer.gui.DesignPaneHeader;
    4546import org.greenstone.gatherer.gui.GComboBox;
    4647import org.greenstone.gatherer.gui.GLIButton;
     
    5455import org.w3c.dom.*;
    5556import org.xml.sax.*;
     57
    5658
    5759/** This class is for maintaining a list of known plug-ins, and importing new plugins using the parser. */
     
    664666    /** Button for configuring the selected plugin. */
    665667    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;
    668668    /** Button to move an assigned plugin one position lower in the order. */
    669669    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;
    672670    /** Button to move an assigned plugin one position higher in the order. */
    673671    private JButton move_up_button = null;
     
    680678    /** The label above the assigned plugin list. */
    681679    private JLabel plugin_list_label = null;
    682     /** The title of this view. */
    683     private JLabel title = null;
    684680    /** A list of assigned plugins. */
    685681    private JList plugin_list = null;
     
    688684    /** The region which divides the central portion of the view into list and controls */
    689685    private JPanel central_pane = null;
    690     /** The area where title label and instructions sit. */
    691     private JPanel header_pane = null;
    692686    /** The area where movement buttons are placed. */
    693687    private JPanel movement_pane = null;
     
    696690    /** The pane containing the assigned plugin list and its label. */
    697691    private JPanel plugin_list_pane = null;
    698     /** The text area containing instructions on the use of this control. */
    699     private JTextArea instructions = null;
    700692
    701693    /** Constructor.
     
    715707        Dictionary.registerBoth(configure, "CDM.PlugInManager.Configure", "CDM.PlugInManager.Configure_Tooltip");
    716708
    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");
    727710        move_up_button = new JButton("", JarTools.getImage("arrow-up.gif"));
    728711        move_up_button.setEnabled(false);
     
    753736        plugin_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    754737        plugin_list_label = new JLabel();
    755         plugin_list_label.setHorizontalAlignment(JLabel.CENTER);
     738        //plugin_list_label.setHorizontalAlignment(JLabel.CENTER);
    756739        plugin_list_label.setOpaque(true);
    757740        Dictionary.registerText(plugin_list_label, "CDM.PlugInManager.Assigned");
     
    765748        Dictionary.registerBoth(remove, "CDM.PlugInManager.Remove", "CDM.PlugInManager.Remove_Tooltip");
    766749
    767         title = new JLabel();
    768         title.setHorizontalAlignment(JLabel.CENTER);
    769         title.setOpaque(true);
    770         Dictionary.registerText(title, "CDM.PlugInManager.Title");
    771 
    772750        // Listeners
    773751        add.addActionListener(new AddListener()); //all_change_listener is listening to the ArgumentConfiguration
    774752        configure.addActionListener(new ConfigureListener());
    775753        MoveListener ml = new MoveListener();
    776         //move_bottom_button.addActionListener(ml);
    777754        move_down_button.addActionListener(ml);
    778755        move_down_button.addActionListener(CollectionDesignManager.all_change_listener);
    779         //move_top_button.addActionListener(ml);
    780756        move_up_button.addActionListener(ml);
    781757        move_up_button.addActionListener(CollectionDesignManager.all_change_listener);
     
    788764
    789765        // 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 
    798766        plugin_list_label.setBorder(BorderFactory.createEmptyBorder(0,2,0,2));
    799767
     
    850818
    851819    /** 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???
    852821     */
    853822    public void gainFocus() {
    854         if(instructions != null) {
    855         instructions.setCaretPosition(0);
    856         }
    857823        super.updateUI();
    858824    }
Note: See TracChangeset for help on using the changeset viewer.