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

    r10976 r11031  
    3636import org.greenstone.gatherer.Dictionary;
    3737import org.greenstone.gatherer.Gatherer;
     38import org.greenstone.gatherer.gui.DesignPaneHeader;
    3839import org.greenstone.gatherer.gui.GComboBox;
    3940import org.greenstone.gatherer.gui.GLIButton;
     
    533534    implements Control {
    534535
    535     private JTextArea instruction_textarea;
     536    //  private JTextArea instruction_textarea;
    536537
    537538    private JList index_list;
     
    585586       
    586587        // Creation
    587         JPanel instruction_pane = new JPanel();
    588         JLabel title_label = new JLabel();
    589         title_label.setHorizontalAlignment(JLabel.CENTER);
    590         Dictionary.registerText(title_label, "CDM.IndexManager.Title");
    591 
    592         instruction_textarea = new JTextArea();
    593         instruction_textarea.setEditable(false);
    594         instruction_textarea.setLineWrap(true);
    595         instruction_textarea.setRows(6);
    596         instruction_textarea.setWrapStyleWord(true);
    597         Dictionary.registerText(instruction_textarea, "CDM.IndexManager.Instructions");
    598        
     588        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Indexes", "searchindexes");     
    599589        JPanel assigned_indexes_pane = new JPanel();
    600590        JLabel index_label = new JLabel();
     
    701691
    702692        // Layout
    703         instruction_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    704         instruction_pane.setLayout(new BorderLayout());
    705         instruction_pane.add(title_label, BorderLayout.NORTH);
    706         instruction_pane.add(new JScrollPane(instruction_textarea), BorderLayout.CENTER);
    707693
    708694        movement_pane.setBorder(BorderFactory.createEmptyBorder(0,2,0,0));
     
    749735        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    750736        setLayout(new BorderLayout());
    751         add(instruction_pane, BorderLayout.NORTH);
     737        add(header_pane, BorderLayout.NORTH);
    752738        add(main_index_pane, BorderLayout.CENTER);
    753739
     
    769755        // reset the underlying indexes and levels elements
    770756        setMGPPEnabled(mgpp_enabled);
    771         }
    772         if(instruction_textarea != null) {
    773         instruction_textarea.setCaretPosition(0);
    774757        }
    775758        /* reset the source list - may have built between then and now */
     
    794777            tabbed_pane.insertTab(Dictionary.get("CDM.IndexManager.MGPP.Levels"), null, mgpplevels_pane, null, 1);
    795778            }
    796             if (instruction_textarea != null) {
    797             Dictionary.registerText(instruction_textarea, "CDM.IndexManager.MGPP.Instructions");
    798             instruction_textarea.setCaretPosition(0);
    799             }
    800779            index_list.setSelectedIndex(0);
    801780           
     
    812791            source_list.setEnabled(true); // in case it had been disabled
    813792            allfields_box.setSelected(false);
    814             if (instruction_textarea != null) {
    815             Dictionary.registerText(instruction_textarea, "CDM.IndexManager.Instructions");
    816             instruction_textarea.setCaretPosition(0);
    817             }
    818793            index_list.setSelectedIndex(0);
    819794           
Note: See TracChangeset for help on using the changeset viewer.