Index: javax/swing/JTextField.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JTextField.java,v retrieving revision 1.25 diff -u -r1.25 JTextField.java --- javax/swing/JTextField.java 27 Oct 2005 14:53:41 -0000 1.25 +++ javax/swing/JTextField.java 31 Oct 2005 16:20:56 -0000 @@ -120,6 +120,11 @@ private PropertyChangeListener actionPropertyChangeListener; /** + * The horizontal visibility of the textfield. + */ + private BoundedRangeModel horizontalVisibility; + + /** * Creates a new instance of JTextField. */ public JTextField() @@ -185,6 +190,9 @@ // default value for alignment align = LEADING; + + // Initialize the horizontal visibility model. + horizontalVisibility = new DefaultBoundedRangeModel(); } /** @@ -486,5 +494,21 @@ if (accessibleContext == null) accessibleContext = new AccessibleJTextField(); return accessibleContext; + } + + /** + * Returns the bounded range model that describes the horizontal visibility + * of the text field in the case when the text does not fit into the + * available space. The actual values of this model are managed by the look + * and feel implementation. + * + * @return the bounded range model that describes the horizontal visibility + */ + public BoundedRangeModel getHorizontalVisibility() + { + // TODO: The real implementation of this property is still missing. + // However, this is not done in JTextField but must instead be handled in + // javax.swing.text.FieldView. + return horizontalVisibility; } }