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

    r10965 r11031  
    4040import org.greenstone.gatherer.Dictionary;
    4141import org.greenstone.gatherer.Gatherer;
     42import org.greenstone.gatherer.gui.DesignPaneHeader;
    4243import org.greenstone.gatherer.gui.GComboBox;
    4344import org.greenstone.gatherer.gui.GLIButton;
     
    172173    private JLabel current_search_types_label;
    173174    private JLabel search_type_label;
    174     private JLabel title_label;
    175 
    176175    private JList current_search_types_list;
    177 
    178     private JTextArea instructions_textarea;
    179176
    180177    public SearchTypeControl() {
    181178   
    182179        // Creation
    183         title_label = new JLabel();
    184         title_label.setHorizontalAlignment(JLabel.CENTER);
    185         Dictionary.registerText(title_label, "CDM.SearchTypeManager.Title");
    186 
    187         JPanel instructions_panel = new JPanel();
    188         instructions_textarea = new JTextArea();
    189         instructions_textarea.setCaretPosition(0);
    190         instructions_textarea.setEditable(false);
    191         instructions_textarea.setLineWrap(true);
    192         instructions_textarea.setRows(6);
    193         instructions_textarea.setWrapStyleWord(true);
    194         Dictionary.registerText(instructions_textarea, "CDM.SearchTypeManager.Instructions");
     180        JPanel header_panel = new DesignPaneHeader("CDM.GUI.SearchTypes", "searchtypes");
    195181
    196182        JPanel spacer_panel = new JPanel();
     
    297283
    298284        // Layout
    299         instructions_panel.setBorder(BorderFactory.createEmptyBorder(0,0,2,0));
    300         instructions_panel.setLayout(new BorderLayout());
    301         instructions_panel.add(title_label, BorderLayout.NORTH);
    302         instructions_panel.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER);
    303 
    304285        movement_panel.setBorder(BorderFactory.createEmptyBorder(0,2,0,0));
    305286        movement_panel.setLayout(new GridLayout(2,1,5,0));
     
    342323        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    343324        setLayout(new BorderLayout());
    344         add(instructions_panel, BorderLayout.NORTH);
     325        add(header_panel, BorderLayout.NORTH);
    345326        add(spacer_panel, BorderLayout.CENTER);
    346327    }
     
    350331
    351332    public void gainFocus() {
    352         instructions_textarea.setCaretPosition(0);
    353333        validateControls(isSearchTypeEnabled());
    354334    }
Note: See TracChangeset for help on using the changeset viewer.