Changeset 7152


Ignore:
Timestamp:
2004-03-30T15:19:32+12:00 (20 years ago)
Author:
kjdon
Message:

fixed some more static label sizes and deleted a lot of commented out stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java

    r7143 r7152  
    115115    /** The button used to delete files, which also doubles as a drop target for files from the Trees. */
    116116    private UndoManager bin_button          =  null;
    117     /** The default size of a label in the interface. */
    118     static final private Dimension LABEL_SIZE = new Dimension(100,30);
    119117    /** The default size of a special mapping dialog. */
    120118    static final Dimension DIALOG_SIZE = new Dimension(400, 120);
     
    763761    }
    764762   
    765     /** This provides a small prompt for gathering addition details about a special directory mapping such as its symbolic name. */
     763    /** This provides a small prompt for gathering addition details about a special directory mapping such as its symbolic name.
     764     * Used when creating a new shortcut to a folder */
    766765    private class MappingPrompt
    767766    extends JDialog
     
    780779        JPanel content_pane = (JPanel) getContentPane();
    781780        JPanel center_pane = new JPanel();
    782         JPanel file_pane = new JPanel();
     781        JPanel labels_pane = new JPanel();
     782        JPanel fields_pane = new JPanel();
     783
    783784        JLabel file_label = new JLabel();
    784         file_label.setPreferredSize(LABEL_SIZE);
    785785        Dictionary.setText(file_label, "MappingPrompt.File");
    786786        JLabel file_field = new JLabel(file.getAbsolutePath());
    787         JPanel name_pane = new JPanel();
     787
    788788        JLabel name_label = new JLabel();
    789         name_label.setPreferredSize(LABEL_SIZE);
    790789        Dictionary.setText(name_label, "MappingPrompt.Name");
    791790        name_field = new JTextField(file.getName());
     791
    792792        JPanel button_pane = new JPanel();
    793793        ok_button = new GLIButton();
     
    803803        ok_button.addActionListener(this);
    804804        name_field.addKeyListener(this);
     805
    805806        // Layout
    806         file_pane.setLayout(new BorderLayout());
    807         file_pane.add(file_label, BorderLayout.WEST);
    808         file_pane.add(file_field, BorderLayout.CENTER);
    809 
    810         name_pane.setLayout(new BorderLayout());
    811         name_pane.add(name_label, BorderLayout.WEST);
    812         name_pane.add(name_field, BorderLayout.CENTER);
     807        labels_pane.setLayout(new GridLayout(2,1,5,0));
     808        labels_pane.add(file_label);
     809        labels_pane.add(name_label);
     810       
     811        fields_pane.setLayout(new GridLayout(2,1,5,0));
     812        fields_pane.add(file_field);
     813        fields_pane.add(name_field);
    813814
    814815        center_pane.setBorder(BorderFactory.createEmptyBorder(0,0,5,0));
    815         center_pane.setLayout(new GridLayout(2,1,5,5));
    816         center_pane.add(file_pane);
    817         center_pane.add(name_pane);
     816        center_pane.setLayout(new BorderLayout(5,0));
     817        center_pane.add(labels_pane, BorderLayout.WEST);
     818        center_pane.add(fields_pane, BorderLayout.CENTER);
    818819
    819820        button_pane.setLayout(new GridLayout(1,2,5,5));
Note: See TracChangeset for help on using the changeset viewer.