ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/datacomponents/StringDataComponent.java
(Generate patch)

Comparing projects/cms/source/conient/uk/org/iscream/cms/conient/datacomponents/StringDataComponent.java (file contents):
Revision 1.5 by ajm, Wed Jan 24 01:54:43 2001 UTC vs.
Revision 1.7 by ajm, Wed Jan 24 03:22:24 2001 UTC

# Line 1 | Line 1
1   //---PACKAGE DECLARATION---
2 < uk.ac.ukc.iscream.conient.datacomponents;
2 > package uk.ac.ukc.iscream.conient.datacomponents;
3  
4   //---IMPORTS---
5   import javax.swing.JLabel;
# Line 27 | Line 27 | public class StringDataComponent extends VisibleDataCo
27      /**
28       * The default length of the JTextField
29       */
30 <    private final int DEFAULT_DISPLAY_LENGTH = 20;
30 >    private final int DEFAULT_TEXT_LENGTH = 20;
31  
32   //---STATIC METHODS---
33  
# Line 41 | Line 41 | public class StringDataComponent extends VisibleDataCo
41       * @param attribute the data attribute we look after
42       */
43      public StringDataComponent(String name, String attribute) {
44        this(name, attribute, DEFAULT_DISPLAY_LENGTH);
45    }
46
47    /**
48     * Creates the component with a friendly name to be
49     * used as label
50     *
51     * @param name the friendly name
52     * @param attribute the data attribute we look after
53     * @param displayLength the length of the JTextField
54     */
55    public StringDataComponent(String name, String attribute, int displayLength) {
44          _name = name;
45          _attribute = attribute;
46 <        _displayLength = displayLength;
59 <        _item = new JTextField("", _displayLength);
46 >        _item = new JTextField("", DEFAULT_TEXT_LENGTH);
47          _item.setEditable(false);
48          _label = new JLabel(_name + ": ");
49          _label.setHorizontalAlignment(JLabel.RIGHT);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines