Changeset 11031 for trunk/gli


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

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
10 edited

Legend:

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

    r10726 r11031  
    4141import org.greenstone.gatherer.Gatherer;
    4242import org.greenstone.gatherer.LocalGreenstone;
     43import org.greenstone.gatherer.gui.DesignPaneHeader;
    4344import org.greenstone.gatherer.gui.GComboBox;
    4445import org.greenstone.gatherer.gui.GLIButton;
     
    516517    /** Button for configuring the selected classifier. */
    517518    private JButton configure = null;
    518 
    519     //private JButton move_bottom_button;
    520 
    521519    private JButton move_down_button;
    522 
    523     //private JButton move_top_button;
    524 
    525520    private JButton move_up_button;
    526521
     
    530525    /** A list of assigned classifiers. */
    531526    private JList classifier_list = null;
    532     /** The text area containing instructions on the use of this control. */
    533     private JTextArea instructions = null;
    534527
    535528    /** Constructor.
     
    550543        configure.setMnemonic(KeyEvent.VK_C);
    551544        Dictionary.registerBoth(configure, "CDM.ClassifierManager.Configure", "CDM.ClassifierManager.Configure_Tooltip");
    552         JPanel header_pane = new JPanel();
    553         instructions = new JTextArea();
    554         instructions.setEditable(false);
    555         instructions.setLineWrap(true);
    556         instructions.setRows(6);
    557         instructions.setWrapStyleWord(true);
    558         Dictionary.registerText(instructions, "CDM.ClassifierManager.Instructions");
     545        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Classifiers", "classifiers");
    559546
    560547        ClassifierComboboxListener ccl = new ClassifierComboboxListener();
     
    575562        classifier_list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    576563        JLabel classifier_list_label = new JLabel();
    577         classifier_list_label.setHorizontalAlignment(JLabel.CENTER);
     564        //      classifier_list_label.setHorizontalAlignment(JLabel.CENTER);
    578565        classifier_list_label.setOpaque(true);
    579566        Dictionary.registerText(classifier_list_label, "CDM.ClassifierManager.Assigned");
     
    617604
    618605        MoveListener ml = new MoveListener();
    619         //move_bottom_button.addActionListener(ml);
    620606        move_down_button.addActionListener(ml);
    621607        move_down_button.addActionListener(CollectionDesignManager.buildcol_change_listener);
    622         //move_top_button.addActionListener(ml);
    623608        move_up_button.addActionListener(ml);
    624609        move_up_button.addActionListener(CollectionDesignManager.buildcol_change_listener);
    625610
    626611        // Layout
    627         title.setBorder(BorderFactory.createEmptyBorder(0,0,2,0));
    628 
    629         instructions.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));
    630 
    631         header_pane.setLayout(new BorderLayout());
    632         header_pane.add(title, BorderLayout.NORTH);
    633         header_pane.add(new JScrollPane(instructions), BorderLayout.CENTER);
    634 
    635612        move_button_pane.setLayout(new GridLayout(4,1));
    636613        move_button_pane.add(move_up_button);
     
    680657        classifier_list = null;
    681658        configure = null;
    682         instructions = null;
     659        //instructions = null;
    683660        remove = null;
    684661    }
    685662
    686     /** This method is overridden to ensure the instructions are scrolled to top, before the super classes updateUI() is called.
    687      */
    688663    public void gainFocus() {
    689         if(instructions != null) {
    690         instructions.setCaretPosition(0);
    691         }
    692664    }
    693665
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r10421 r11031  
    3737import org.greenstone.gatherer.Dictionary;
    3838import org.greenstone.gatherer.Gatherer;
     39import org.greenstone.gatherer.gui.DesignPaneHeader;
    3940import org.greenstone.gatherer.gui.GLIButton;
    4041import org.greenstone.gatherer.metadata.MetadataElement;
     
    252253    private JComboBox variable_combobox;
    253254    private JList format_list;
    254     private JTextArea instructions_textarea;
    255255    private JTextArea editor_textarea;
    256256    private JPanel blank_pane;
     
    268268
    269269        // Create
    270         JPanel instructions_pane = new JPanel();
    271         JLabel title_label = new JLabel();
    272         title_label.setHorizontalAlignment(JLabel.CENTER);
    273         title_label.setOpaque(true);
    274         Dictionary.registerText(title_label, "CDM.FormatManager.Title");
    275 
    276         instructions_textarea = new JTextArea();
    277         instructions_textarea.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    278         instructions_textarea.setEditable(false);
    279         instructions_textarea.setLineWrap(true);
    280         instructions_textarea.setRows(6);
    281         instructions_textarea.setWrapStyleWord(true);
    282         Dictionary.registerText(instructions_textarea, "CDM.FormatManager.Instructions");
     270        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Formats", "formatstatements");
    283271
    284272        JLabel format_label = new JLabel();
     
    371359
    372360        // Layout
    373         instructions_pane.setLayout(new BorderLayout());
    374         instructions_pane.add(title_label, BorderLayout.NORTH);
    375         instructions_pane.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER);
    376         instructions_pane.add(format_label, BorderLayout.SOUTH);
    377 
    378361        feature_pane.setLayout(new BorderLayout(5,0));
    379362        feature_pane.add(feature_label, BorderLayout.WEST);
     
    428411        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    429412        setLayout(new BorderLayout());
    430         add(instructions_pane, BorderLayout.NORTH);
     413        add(header_pane, BorderLayout.NORTH);
    431414        add(new JScrollPane(format_list), BorderLayout.CENTER);
    432415        add(center_pane, BorderLayout.SOUTH);
     
    450433        feature_combobox.setSelectedItem(selected_object);
    451434        selected_object = null;
    452         if(instructions_textarea != null) {
    453             instructions_textarea.setCaretPosition(0);
    454         }
    455435        }   
    456436    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java

    r10610 r11031  
    3939import org.greenstone.gatherer.Dictionary;
    4040import org.greenstone.gatherer.Gatherer;
     41import org.greenstone.gatherer.gui.DesignPaneHeader;
    4142import org.greenstone.gatherer.gui.EmailField;
    4243import org.greenstone.gatherer.gui.GLIButton;
     
    7273    // Creation
    7374    JPanel tree_pane = new JPanel();
    74     JLabel title = new JLabel();
    75     Dictionary.registerText(title, "CDM.GUI.Design_Topics");
     75    //JLabel title = new JLabel();
     76    //Dictionary.registerText(title, "CDM.GUI.Design_Topics");
    7677    tree = new DesignTree();
    7778    view = controls;
     
    8384    tree_pane.setLayout(new BorderLayout());
    8485    tree_pane.setPreferredSize(TREE_SIZE);
    85     tree_pane.add(title, BorderLayout.NORTH);
     86    //tree_pane.add(title, BorderLayout.NORTH);
    8687    tree_pane.add(new JScrollPane(tree), BorderLayout.CENTER);
    8788
     
    170171    private JLabel name_label;
    171172    private JLabel small_icon_label;
    172     private JLabel title_label;
    173173    /** The text field used to edit the file name of the collections icon. */
    174174    private JTextField icon_textfield;
     
    179179    /** A text area used to modify the collection description. */
    180180    private JTextArea description_textarea;
    181     private JTextArea instructions_textarea;
    182181    /** Constructor. */
    183182    public GeneralControl() {
     
    187186
    188187        // Creation
    189         JPanel instruction_panel = new JPanel();
    190         title_label = new JLabel();
    191         title_label.setHorizontalAlignment(JLabel.CENTER);
    192         Dictionary.registerText(title_label, "CDM.General.Title");
    193 
    194         instructions_textarea = new JTextArea();
    195         instructions_textarea.setCaretPosition(0);
    196         instructions_textarea.setEditable(false);
    197         instructions_textarea.setLineWrap(true);
    198         instructions_textarea.setRows(6);
    199         instructions_textarea.setWrapStyleWord(true);
    200         Dictionary.registerText(instructions_textarea, "CDM.General.Instructions");
     188        JPanel header_panel = new DesignPaneHeader("CDM.GUI.General", "generalsettings");
    201189
    202190        JPanel all_details_panel = new JPanel();
     
    276264
    277265        // Layout
    278         instruction_panel.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    279         instruction_panel.setLayout(new BorderLayout());
    280         instruction_panel.add(title_label, BorderLayout.NORTH);
    281         instruction_panel.add(new JScrollPane(instructions_textarea), BorderLayout.CENTER);
    282 
    283266        fields_panel.setBorder(BorderFactory.createEmptyBorder(5,0,0,0));
    284267        fields_panel.setLayout(new BorderLayout(5,2));
     
    340323        all_details_panel.add(description_panel, BorderLayout.CENTER);
    341324
    342         setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
     325        setBorder(BorderFactory.createEmptyBorder(0,5,5,5));
    343326        setLayout(new BorderLayout());
    344         add(instruction_panel, BorderLayout.NORTH);
     327        add(header_panel, BorderLayout.NORTH);
    345328        add(all_details_panel, BorderLayout.CENTER);
    346329    }
  • 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           
  • 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
  • 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    }
  • 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    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java

    r10345 r11031  
    3737import org.greenstone.gatherer.Dictionary;
    3838import org.greenstone.gatherer.Gatherer;
     39import org.greenstone.gatherer.gui.DesignPaneHeader;
    3940import org.greenstone.gatherer.gui.GLIButton;
    4041import org.greenstone.gatherer.gui.NonWhitespaceField;
     
    167168    private JPanel border_pane;
    168169    private JTabbedPane tabbed_pane;
    169     private JTextArea instructions_area;
    170170    private JTextField flags_field;
    171171    private JTextField match_field;
     
    177177    public SubcollectionControl() {
    178178        // Create
    179         JPanel header_pane = new JPanel();
    180         instructions_area = new JTextArea();
    181         instructions_area.setEditable(false);
    182         instructions_area.setLineWrap(true);
    183         instructions_area.setRows(6);
    184         instructions_area.setWrapStyleWord(true);
    185         Dictionary.registerText(instructions_area, "CDM.SubcollectionManager.Instructions");
     179        JPanel header_pane = new DesignPaneHeader("CDM.GUI.Subcollections", "partitionindexes");
    186180
    187181        border_pane = new JPanel();
     
    288282        name_field.getDocument().addDocumentListener(cl);
    289283        subcollection_list.addListSelectionListener(new SubCollectionListListener());
    290 
    291         // Layout
    292         instructions_area.setBorder(BorderFactory.createEmptyBorder(2,5,2,5));
    293 
    294         header_pane.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    295         header_pane.setLayout(new BorderLayout());
    296         header_pane.add(title, BorderLayout.NORTH);
    297         header_pane.add(new JScrollPane(instructions_area), BorderLayout.CENTER);
    298284
    299285        inclusive_pane.setLayout(new GridLayout());
  • trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java

    r10556 r11031  
    4141import org.greenstone.gatherer.util.StaticStrings;
    4242import org.greenstone.gatherer.util.Utility;
     43import org.greenstone.gatherer.gui.DesignPaneHeader;
    4344import org.w3c.dom.*;
    4445
     
    123124
    124125        // Creation
    125         JPanel header_panel = new JPanel();
    126 
    127         JLabel title_label = new JLabel();
    128         title_label.setHorizontalAlignment(JLabel.CENTER);
    129         title_label.setOpaque(true);
    130         Dictionary.registerText(title_label, "CDM.SuperCollectionManager.Title");
    131 
    132         JTextArea instructions = new JTextArea();
    133         instructions.setBackground(Configuration.getColor("coloring.collection_tree_background", false));
    134         instructions.setCaretPosition(0);
    135         instructions.setEditable(false);
    136         instructions.setLineWrap(true);
    137         instructions.setRows(6);
    138         instructions.setWrapStyleWord(true);
    139         Dictionary.registerText(instructions, "CDM.SuperCollectionManager.Instructions");
     126        JPanel header_panel = new DesignPaneHeader("CDM.GUI.SuperCollection", "xcollectionsearching");
    140127
    141128        collection_checklist = new CheckList(false);
    142129        buildModel();
    143130        collection_checklist.setListData(collection_checklist_model);
    144 
    145         // Layout
    146         header_panel.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    147         header_panel.setLayout(new BorderLayout());
    148         header_panel.add(title_label, BorderLayout.NORTH);
    149         header_panel.add(new JScrollPane(instructions), BorderLayout.CENTER);
    150131
    151132        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
  • trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java

    r10556 r11031  
    3737import org.greenstone.gatherer.Dictionary;
    3838import org.greenstone.gatherer.Gatherer;
     39import org.greenstone.gatherer.gui.DesignPaneHeader;
    3940import org.greenstone.gatherer.gui.GLIButton;
    4041
     
    187188        fragment_table_model = new FragmentTableModel("", new TreeSet(), new ArrayList());
    188189        // Creation
    189         JPanel header_panel = new JPanel();
    190         JLabel title_label = new JLabel();
    191         title_label.setHorizontalAlignment(JLabel.CENTER);
    192         Dictionary.registerText(title_label, "CDM.TranslationManager.Title");
    193 
    194         JTextArea instruction_area = new JTextArea();
    195         instruction_area.setEditable(false);
    196         instruction_area.setLineWrap(true);
    197         instruction_area.setRows(6);
    198         instruction_area.setWrapStyleWord(true);
    199         Dictionary.registerText(instruction_area, "CDM.TranslationManager.Instructions");
     190        JPanel header_panel = new DesignPaneHeader("CDM.GUI.Translation", "translatetext");
    200191
    201192        JPanel center_panel = new JPanel();
     
    282273
    283274        // Layout
    284         header_panel.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    285         header_panel.setLayout(new BorderLayout());
    286         header_panel.add(title_label, BorderLayout.NORTH);
    287         header_panel.add(new JScrollPane(instruction_area), BorderLayout.CENTER);
    288275
    289276        component_selection_panel.setLayout(new BorderLayout());
Note: See TracChangeset for help on using the changeset viewer.