Changeset 8802


Ignore:
Timestamp:
2004-12-14T15:29:54+13:00 (19 years ago)
Author:
mdewsnip
Message:

Fixed up some button sizes on the Search Indexes page and removed some dead constants.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

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

    r8576 r8802  
    5252
    5353    static final private Dimension FIELD_SIZE = new Dimension(200,30);
    54     static final private Dimension BUTTON_SIZE = new Dimension(100,30);
    5554    static final private String MGINDEXES = "mg indexes";
    5655    static final private String MGPPINDEXES = "mgpp indexes";
     
    547546        index_list = new JList(model);
    548547        index_list.setCellRenderer(new IndexListRenderer());
    549         index_list.setVisibleRowCount(5);
     548        index_list.setVisibleRowCount(2);
    550549        JPanel movement_pane = new JPanel();
    551550
     
    553552        move_up_button.setEnabled(false);
    554553        move_up_button.setMnemonic(KeyEvent.VK_U);
    555         //move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);
    556554        Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip");
    557555
     
    561559        Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip");
    562560
     561        set_default_button = new GLIButton();
     562        set_default_button.setEnabled(false);
     563        set_default_button.setMnemonic(KeyEvent.VK_S);
     564        Dictionary.registerBoth(set_default_button, "CDM.IndexManager.Set_Default", "CDM.IndexManager.Set_Default_Tooltip");
     565
    563566        JPanel index_pane = new JPanel();
    564567        JPanel details_pane = new JPanel();
    565568        JPanel labels_pane = new JPanel();
    566569        JPanel boxes_pane = new JPanel();
     570        JPanel content_pane = new JPanel();
    567571
    568572        JLabel name_label = new JLabel();
     
    593597        add_button.setMnemonic(KeyEvent.VK_A);
    594598        Dictionary.registerBoth(add_button, "CDM.IndexManager.Add_Index", "CDM.IndexManager.Add_Index_Tooltip");
    595         set_default_button = new GLIButton();
    596         set_default_button.setEnabled(false);
    597         set_default_button.setMnemonic(KeyEvent.VK_S);
    598         Dictionary.registerBoth(set_default_button, "CDM.IndexManager.Set_Default", "CDM.IndexManager.Set_Default_Tooltip");
     599
    599600        remove_button = new GLIButton();
    600601        remove_button.setEnabled(false);
     
    663664        index_pane.add(button_pane, BorderLayout.SOUTH);
    664665
     666        content_pane.setLayout(new BorderLayout());
     667        content_pane.add(assigned_indexes_pane, BorderLayout.NORTH);
     668        content_pane.add(index_pane, BorderLayout.CENTER);
     669
    665670        mgindexes_panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
    666671        mgindexes_panel.setLayout(new BorderLayout());
    667672        mgindexes_panel.add(instruction_pane, BorderLayout.NORTH);
    668         mgindexes_panel.add(assigned_indexes_pane, BorderLayout.CENTER);
    669         mgindexes_panel.add(index_pane, BorderLayout.SOUTH);
     673        mgindexes_panel.add(content_pane, BorderLayout.CENTER);
    670674
    671675        setLayout(card_layout);
     
    794798        public void actionPerformed(ActionEvent event) {
    795799        String name = name_textfield.getText();
     800        System.err.println("Add button height: " + add_button.getHeight());
     801        System.err.println("Set default button height: " + set_default_button.getHeight());
    796802        if (source_list.getSelected().size() > 0 && name.length() != 0) {
    797803            ArrayList sources = source_list.getSelected();
  • trunk/gli/src/org/greenstone/gatherer/gui/DownloadProgressBar.java

    r8474 r8802  
    5050    extends JPanel
    5151    implements ActionListener {
    52 
    53     static final private Dimension MINIMUM_BUTTON_SIZE = new Dimension(100, 25);
    5452
    5553    private boolean simple = false;
     
    129127    stop_start_button.addActionListener(this);
    130128    stop_start_button.addActionListener(owner);
    131     stop_start_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
     129    stop_start_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
    132130    stop_start_button.setMnemonic(KeyEvent.VK_P);
    133131    stop_start_button.setEnabled(true);
     
    138136    log_button.addActionListener(this);
    139137    log_button.setEnabled(false);
    140     log_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
     138    log_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
    141139    log_button.setMnemonic(KeyEvent.VK_L);
    142140    Dictionary.registerBoth(log_button, "Mirroring.DownloadJob.Log", "Mirroring.DownloadJob.Log_Tooltip");
     
    145143    close_button.addActionListener(owner);
    146144    close_button.addActionListener(this);
    147     close_button.setMinimumSize(MINIMUM_BUTTON_SIZE);
     145    close_button.setMinimumSize(Utility.MINIMUM_BUTTON_SIZE);
    148146    close_button.setMnemonic(KeyEvent.VK_C);
    149147    close_button.setEnabled(true);
  • trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java

    r8783 r8802  
    7171public class EnrichPane
    7272    extends JPanel
    73     implements ActionListener, TreeSelectionListener {
    74 
    75     static private Dimension BUTTON_SIZE = new Dimension(190, 25);
     73    implements ActionListener, TreeSelectionListener
     74{
    7675    static private Dimension CONTROL_SIZE = new Dimension(560, 240);
    7776    static private Dimension MINIMUM_SIZE = new Dimension(100, 100);
     
    141140    add.setEnabled(false);
    142141    add.setMnemonic(KeyEvent.VK_A);
    143     add.setPreferredSize(BUTTON_SIZE);
     142    add.setPreferredSize(Utility.MINIMUM_BUTTON_SIZE);
    144143    Dictionary.registerBoth(add, "MetaEdit.Accumulate", "MetaEdit.Accumulate_Tooltip");
    145144
     
    148147    update.setEnabled(false);
    149148    update.setMnemonic(KeyEvent.VK_P);
    150     update.setPreferredSize(BUTTON_SIZE);
     149    update.setPreferredSize(Utility.MINIMUM_BUTTON_SIZE);
    151150    Dictionary.registerBoth(update, "MetaEdit.Overwrite", "MetaEdit.Overwrite_Tooltip");
    152151
     
    155154    remove.setEnabled(false);
    156155    remove.setMnemonic(KeyEvent.VK_R);
    157     remove.setPreferredSize(BUTTON_SIZE);
     156    remove.setPreferredSize(Utility.MINIMUM_BUTTON_SIZE);
    158157    Dictionary.registerBoth(remove, "MetaEdit.Remove", "MetaEdit.Remove_Tooltip");
    159158
  • trunk/gli/src/org/greenstone/gatherer/util/Utility.java

    r8654 r8802  
    5959 */
    6060public class Utility {
    61     static final public Dimension BUTTON_SIZE = new Dimension(160, 35);
    62     static final public Dimension DOUBLE_IMAGE_BUTTON_SIZE = new Dimension(190, 35);
     61    static final public Dimension MINIMUM_BUTTON_SIZE = new Dimension(100, 25);
     62    // static final public Dimension DOUBLE_IMAGE_BUTTON_SIZE = new Dimension(190, 35);
    6363    static final public Dimension LABEL_SIZE = new Dimension(150, 25);
    6464    /** The default size of a gatherer progress bar, in either the download view or the build view. */
Note: See TracChangeset for help on using the changeset viewer.