BoxView should override View.preferenceChanged and indicate that its
cached layout information is no longer valid, then call the super
implementation. This is done now.
2005-10-14 Anthony Balkissoon <[EMAIL PROTECTED]>
* javax/swing/text/BoxView.java:
(preferenceChanged): New method (overrides method in View). Set flag
indicating that cached layout information is invalid, then call super
implementation.
--Tony
Index: javax/swing/text/BoxView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/BoxView.java,v
retrieving revision 1.7
diff -u -r1.7 BoxView.java
--- javax/swing/text/BoxView.java 14 Oct 2005 18:16:46 -0000 1.7
+++ javax/swing/text/BoxView.java 14 Oct 2005 18:45:52 -0000
@@ -714,4 +714,20 @@
else
return baselineRequirements(axis, null).alignment;
}
+
+ /**
+ * Called by a child View when its preferred span has changed.
+ *
+ * @param width indicates that the preferred width of the child changed.
+ * @param height indicates that the preferred height of the child changed.
+ * @param child the child View.
+ */
+ public void preferenceChanged (View child, boolean width, boolean height)
+ {
+ if (width)
+ xLayoutValid = false;
+ if (height)
+ yLayoutValid = false;
+ super.preferenceChanged(child, width, height);
+ }
}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches