Changeset 7152
- Timestamp:
- 2004-03-30T15:19:32+12:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r7143 r7152 115 115 /** The button used to delete files, which also doubles as a drop target for files from the Trees. */ 116 116 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);119 117 /** The default size of a special mapping dialog. */ 120 118 static final Dimension DIALOG_SIZE = new Dimension(400, 120); … … 763 761 } 764 762 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 */ 766 765 private class MappingPrompt 767 766 extends JDialog … … 780 779 JPanel content_pane = (JPanel) getContentPane(); 781 780 JPanel center_pane = new JPanel(); 782 JPanel file_pane = new JPanel(); 781 JPanel labels_pane = new JPanel(); 782 JPanel fields_pane = new JPanel(); 783 783 784 JLabel file_label = new JLabel(); 784 file_label.setPreferredSize(LABEL_SIZE);785 785 Dictionary.setText(file_label, "MappingPrompt.File"); 786 786 JLabel file_field = new JLabel(file.getAbsolutePath()); 787 JPanel name_pane = new JPanel(); 787 788 788 JLabel name_label = new JLabel(); 789 name_label.setPreferredSize(LABEL_SIZE);790 789 Dictionary.setText(name_label, "MappingPrompt.Name"); 791 790 name_field = new JTextField(file.getName()); 791 792 792 JPanel button_pane = new JPanel(); 793 793 ok_button = new GLIButton(); … … 803 803 ok_button.addActionListener(this); 804 804 name_field.addKeyListener(this); 805 805 806 // 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); 813 814 814 815 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); 818 819 819 820 button_pane.setLayout(new GridLayout(1,2,5,5));
Note:
See TracChangeset
for help on using the changeset viewer.