Changeset 4308


Ignore:
Timestamp:
2003-05-23T16:32:05+12:00 (21 years ago)
Author:
jmt12
Message:

moved textfieldlabel to seperate class

File:
1 edited

Legend:

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

    r4293 r4308  
    77import org.greenstone.gatherer.Dictionary;
    88import org.greenstone.gatherer.Gatherer;
     9import org.greenstone.gatherer.gui.TextFieldLabel;
    910import org.greenstone.gatherer.msm.MSMUtils;
    1011import org.greenstone.gatherer.util.Utility;
     
    2627     static final private Dimension SIZE = new Dimension(500, 225);
    2728     static final private int ICON_SIZE = 30;
    28      static final private JTextField FIELD = new JTextField("Dummy");
    2929
    3030     public LockFileDialog(JFrame parent, String name, File lock_file) {
     
    4747          JLabel name_label = new JLabel(get("Name"));
    4848          name_label.setPreferredSize(LABEL_SIZE);
    49           MyLabel name_field = new MyLabel(name);
     49          TextFieldLabel name_field = new TextFieldLabel(name);
    5050          JPanel person_pane = new JPanel();
    5151          JLabel person_label = new JLabel(get("User"));
    5252          person_label.setPreferredSize(LABEL_SIZE);
    53           MyLabel person_field = new MyLabel(getValue("User"));
     53          TextFieldLabel person_field = new TextFieldLabel(getValue("User"));
    5454          JPanel machine_pane = new JPanel();
    5555          JLabel machine_label = new JLabel(get("Machine"));
    5656          machine_label.setPreferredSize(LABEL_SIZE);
    57           MyLabel machine_field = new MyLabel(getValue("Machine"));
     57          TextFieldLabel machine_field = new TextFieldLabel(getValue("Machine"));
    5858          JPanel created_pane = new JPanel();
    5959          JLabel created_label = new JLabel(get("Date"));
    6060          created_label.setPreferredSize(LABEL_SIZE);
    61           MyLabel created_field = new MyLabel(getValue("Date"));
     61          TextFieldLabel created_field = new TextFieldLabel(getValue("Date"));
    6262          JLabel central_label = new JLabel(get("Lockfile_Message_Two"));
    6363          JPanel button_pane = new JPanel();
     
    156156     }
    157157
    158      private class MyLabel
    159           extends JLabel {
    160           public MyLabel(String text) {
    161                 super(text);
    162                 setBackground(FIELD.getBackground());
    163                 setBorder(FIELD.getBorder());
    164                 setOpaque(true);
    165           }
    166      }
    167 
    168158     static public void main(String[] args) {
    169159          JFrame frame = new JFrame();
Note: See TracChangeset for help on using the changeset viewer.