Hi, the FieldView.viewToModel() method missed a call to adjust the allocation area.
The result was that mouse clicks on text in right and center aligned text fields
did not select the right characters (PR 26498). This is now fixed.
2006-03-17 Robert Schuster <[EMAIL PROTECTED]>
* javax/swing/text/FieldView.java:
(viewToModel): Added call to adjust allocation area.
cya
Robert
Index: javax/swing/text/FieldView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/FieldView.java,v
retrieving revision 1.10
diff -u -r1.10 FieldView.java
--- javax/swing/text/FieldView.java 11 Nov 2005 12:46:56 -0000 1.10
+++ javax/swing/text/FieldView.java 17 Mar 2006 17:47:00 -0000
@@ -180,7 +180,7 @@
public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
{
- return super.viewToModel(fx, fy, a, bias);
+ return super.viewToModel(fx, fy, adjustAllocation(a), bias);
}
}
signature.asc
Description: OpenPGP digital signature
