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/MetadataSetView.java

    r10345 r11031  
    3838import org.greenstone.gatherer.Dictionary;
    3939import org.greenstone.gatherer.Gatherer;
     40import org.greenstone.gatherer.gui.DesignPaneHeader;
    4041import org.greenstone.gatherer.gui.GLIButton;
    4142import org.greenstone.gatherer.gui.MetadataElementListCellRenderer;
     
    133134    /** The label denoting the set list. */
    134135    private JLabel set_label = null;
    135     /** The title of these controls. */
    136     private JLabel title = null;
    137136    /** The list of elements for the choosen set. */
    138137    private JList element_list = null;
     
    143142    /** The panel onto which the element list will be placed. */
    144143    private JPanel element_pane = null;
    145     /** The panel containing the title and instructions. */
    146     private JPanel header_pane = null;
    147144    /** The panel containing the set list. */
    148145    private JPanel set_pane = null;
    149146
    150147    private JScrollPane element_list_scroll_pane;
    151     /** The text area of inline instructions. */
    152     private JTextArea instructions = null;
    153148
    154149    private MetadataElementListCellRenderer element_list_cell_renderer;
     
    164159        central_pane = new JPanel();
    165160        element_label = new JLabel();
    166         element_label.setHorizontalAlignment(JLabel.CENTER);
     161        //element_label.setHorizontalAlignment(JLabel.CENTER);
    167162        element_label.setOpaque(true);
    168163        Dictionary.registerText(element_label, "CDM.MetadataSetManager.Elements");
     
    174169        element_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    175170        element_pane = new JPanel();
    176         header_pane = new JPanel();
    177         instructions = new JTextArea();
    178         instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    179         instructions.setEditable(false);
    180         instructions.setLineWrap(true);
    181         instructions.setRows(6);
    182         instructions.setWrapStyleWord(true);
    183         Dictionary.registerText(instructions, "CDM.MetadataSetManager.Instructions");
     171
     172        JPanel header_pane = new DesignPaneHeader("CDM.GUI.MetadataSets", "metadatasets");
    184173        set_label = new JLabel();
    185         set_label.setHorizontalAlignment(JLabel.CENTER);
     174        //set_label.setHorizontalAlignment(JLabel.CENTER);
    186175        set_label.setOpaque(true);
    187176        Dictionary.registerText(set_label, "CDM.MetadataSetManager.Sets");
     
    191180
    192181        set_pane = new JPanel();
    193         title = new JLabel();
    194         title.setHorizontalAlignment(JLabel.CENTER);
    195         title.setOpaque(true);
    196         Dictionary.registerText(title, "CDM.MetadataSetManager.Title");
    197182
    198183        JPanel button_pane = new JPanel();
     
    218203        set_list.addListSelectionListener(list_listener);
    219204        // Layout
    220         instructions.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));
    221 
    222         header_pane.setLayout(new BorderLayout());
    223         header_pane.add(title, BorderLayout.NORTH);
    224         header_pane.add(new JScrollPane(instructions), BorderLayout.CENTER);
    225205
    226206        set_pane.setLayout(new BorderLayout());
     
    255235    public void gainFocus()
    256236    {
    257         // Ensure the instructions area is scrolled to the top
    258         if (instructions != null) {
    259         instructions.setCaretPosition(0);
    260         }
    261237
    262238        // If no current selection, select first available set
Note: See TracChangeset for help on using the changeset viewer.