< prev index next >

src/java.desktop/share/classes/javax/swing/JTextField.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


 130 &nbsp;            for (int i = 0; i &lt; upper.length; i++) {
 131 &nbsp;                upper[i] = Character.toUpperCase(upper[i]);
 132 &nbsp;            }
 133 &nbsp;            super.insertString(offs, new String(upper), a);
 134 &nbsp;        }
 135 &nbsp;    }
 136 &nbsp;}
 137 
 138  * </code></pre>
 139  * <p>
 140  * <strong>Warning:</strong> Swing is not thread safe. For more
 141  * information see <a
 142  * href="package-summary.html#threading">Swing's Threading
 143  * Policy</a>.
 144  * <p>
 145  * <strong>Warning:</strong>
 146  * Serialized objects of this class will not be compatible with
 147  * future Swing releases. The current serialization support is
 148  * appropriate for short term storage or RMI between applications running
 149  * the same version of Swing.  As of 1.4, support for long term storage
 150  * of all JavaBeans&trade;
 151  * has been added to the <code>java.beans</code> package.
 152  * Please see {@link java.beans.XMLEncoder}.
 153  *
 154  * @author  Timothy Prinzing
 155  * @see #setActionCommand
 156  * @see JPasswordField
 157  * @see #addActionListener
 158  * @since 1.2
 159  */
 160 @JavaBean(defaultProperty = "UIClassID", description = "A component which allows for the editing of a single line of text.")
 161 @SwingContainer(false)
 162 @SuppressWarnings("serial") // Same-version serialization only
 163 public class JTextField extends JTextComponent implements SwingConstants {
 164 
 165     /**
 166      * Constructs a new <code>TextField</code>.  A default model is created,
 167      * the initial string is <code>null</code>,
 168      * and the number of columns is set to 0.
 169      */
 170     public JTextField() {


 926      */
 927     @BeanProperty(bound = false)
 928     public AccessibleContext getAccessibleContext() {
 929         if (accessibleContext == null) {
 930             accessibleContext = new AccessibleJTextField();
 931         }
 932         return accessibleContext;
 933     }
 934 
 935     /**
 936      * This class implements accessibility support for the
 937      * <code>JTextField</code> class.  It provides an implementation of the
 938      * Java Accessibility API appropriate to text field user-interface
 939      * elements.
 940      * <p>
 941      * <strong>Warning:</strong>
 942      * Serialized objects of this class will not be compatible with
 943      * future Swing releases. The current serialization support is
 944      * appropriate for short term storage or RMI between applications running
 945      * the same version of Swing.  As of 1.4, support for long term storage
 946      * of all JavaBeans&trade;
 947      * has been added to the <code>java.beans</code> package.
 948      * Please see {@link java.beans.XMLEncoder}.
 949      */
 950     @SuppressWarnings("serial") // Same-version serialization only
 951     protected class AccessibleJTextField extends AccessibleJTextComponent {
 952 
 953         /**
 954          * Gets the state set of this object.
 955          *
 956          * @return an instance of AccessibleStateSet describing the states
 957          * of the object
 958          * @see AccessibleState
 959          */
 960         public AccessibleStateSet getAccessibleStateSet() {
 961             AccessibleStateSet states = super.getAccessibleStateSet();
 962             states.add(AccessibleState.SINGLE_LINE);
 963             return states;
 964         }
 965     }
 966 }


 130 &nbsp;            for (int i = 0; i &lt; upper.length; i++) {
 131 &nbsp;                upper[i] = Character.toUpperCase(upper[i]);
 132 &nbsp;            }
 133 &nbsp;            super.insertString(offs, new String(upper), a);
 134 &nbsp;        }
 135 &nbsp;    }
 136 &nbsp;}
 137 
 138  * </code></pre>
 139  * <p>
 140  * <strong>Warning:</strong> Swing is not thread safe. For more
 141  * information see <a
 142  * href="package-summary.html#threading">Swing's Threading
 143  * Policy</a>.
 144  * <p>
 145  * <strong>Warning:</strong>
 146  * Serialized objects of this class will not be compatible with
 147  * future Swing releases. The current serialization support is
 148  * appropriate for short term storage or RMI between applications running
 149  * the same version of Swing.  As of 1.4, support for long term storage
 150  * of all JavaBeans
 151  * has been added to the <code>java.beans</code> package.
 152  * Please see {@link java.beans.XMLEncoder}.
 153  *
 154  * @author  Timothy Prinzing
 155  * @see #setActionCommand
 156  * @see JPasswordField
 157  * @see #addActionListener
 158  * @since 1.2
 159  */
 160 @JavaBean(defaultProperty = "UIClassID", description = "A component which allows for the editing of a single line of text.")
 161 @SwingContainer(false)
 162 @SuppressWarnings("serial") // Same-version serialization only
 163 public class JTextField extends JTextComponent implements SwingConstants {
 164 
 165     /**
 166      * Constructs a new <code>TextField</code>.  A default model is created,
 167      * the initial string is <code>null</code>,
 168      * and the number of columns is set to 0.
 169      */
 170     public JTextField() {


 926      */
 927     @BeanProperty(bound = false)
 928     public AccessibleContext getAccessibleContext() {
 929         if (accessibleContext == null) {
 930             accessibleContext = new AccessibleJTextField();
 931         }
 932         return accessibleContext;
 933     }
 934 
 935     /**
 936      * This class implements accessibility support for the
 937      * <code>JTextField</code> class.  It provides an implementation of the
 938      * Java Accessibility API appropriate to text field user-interface
 939      * elements.
 940      * <p>
 941      * <strong>Warning:</strong>
 942      * Serialized objects of this class will not be compatible with
 943      * future Swing releases. The current serialization support is
 944      * appropriate for short term storage or RMI between applications running
 945      * the same version of Swing.  As of 1.4, support for long term storage
 946      * of all JavaBeans
 947      * has been added to the <code>java.beans</code> package.
 948      * Please see {@link java.beans.XMLEncoder}.
 949      */
 950     @SuppressWarnings("serial") // Same-version serialization only
 951     protected class AccessibleJTextField extends AccessibleJTextComponent {
 952 
 953         /**
 954          * Gets the state set of this object.
 955          *
 956          * @return an instance of AccessibleStateSet describing the states
 957          * of the object
 958          * @see AccessibleState
 959          */
 960         public AccessibleStateSet getAccessibleStateSet() {
 961             AccessibleStateSet states = super.getAccessibleStateSet();
 962             states.add(AccessibleState.SINGLE_LINE);
 963             return states;
 964         }
 965     }
 966 }
< prev index next >