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/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
Note: See TracChangeset for help on using the changeset viewer.