Hey,
These fixes are minor and now pass failing Intel tests.
2006-10-13 Tania Bento <[EMAIL PROTECTED]>
* java/awt/ScrollPane.java
(addImpl): When calling super, index should be value passed,
not -1.
(getIsValidString): New helper method for paramString().
(getScrollbarDisplayString): New helper method for
paramString().
(paramString): Changed format of outputted string.
Index: java/awt/ScrollPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/ScrollPane.java,v
retrieving revision 1.27
diff -u -r1.27 ScrollPane.java
--- java/awt/ScrollPane.java 13 Jul 2006 17:30:24 -0000 1.27
+++ java/awt/ScrollPane.java 13 Oct 2006 14:20:49 -0000
@@ -393,7 +393,7 @@
h.setValue(x);
if (v != null)
v.setValue(y);
-
+
ScrollPanePeer spp = (ScrollPanePeer)getPeer();
if (spp != null)
spp.setScrollPosition(x, y);
@@ -453,7 +453,7 @@
if ((list != null) && (list.length > 0))
remove(list[0]);
- super.addImpl(component, constraints, -1);
+ super.addImpl(component, constraints, index);
doLayout();
}
@@ -553,16 +553,37 @@
+ getX() + ","
+ getY() + ","
+ getWidth() + "x" + getHeight() + ","
- + "ScrollPosition=(" + scrollPosition.getX() + ","
- + scrollPosition.getY() + "),"
+ + getIsValidString() + ","
+ + "ScrollPosition=(" + scrollPosition.x + ","
+ + scrollPosition.y + "),"
+ "Insets=(" + insets.top + ","
+ insets.left + ","
+ insets.bottom + ","
+ insets.right + "),"
- + "ScrollbarDisplayPolicy=" + getScrollbarDisplayPolicy() + ","
+ + "ScrollbarDisplayPolicy=" + getScrollbarDisplayPolicyString() + ","
+ "wheelScrollingEnabled=" + isWheelScrollingEnabled();
}
+private String
+getScrollbarDisplayPolicyString()
+{
+ if (getScrollbarDisplayPolicy() == 0)
+ return "as-needed";
+ else if (getScrollbarDisplayPolicy() == 1)
+ return "always";
+ else
+ return "never";
+}
+
+private String
+getIsValidString()
+{
+ if (isValid())
+ return "valid";
+ else
+ return "invalid";
+}
+
/**
* Tells whether or not an event is enabled.
*