In JSplitPane.setDividerLocation() we need to substract the divider location when computing the absolute size. Fixed by the attached patch.
2006-06-21 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JSplitPane.java
(setDividerLocation): Substract divider size when computing
the absolute size.
/Roman
--
“Improvement makes straight roads, but the crooked roads, without
Improvement, are roads of Genius.” - William Blake
Index: javax/swing/JSplitPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JSplitPane.java,v
retrieving revision 1.18
diff -u -1 -0 -r1.18 JSplitPane.java
--- javax/swing/JSplitPane.java 6 Jun 2006 15:12:10 -0000 1.18
+++ javax/swing/JSplitPane.java 21 Jun 2006 12:37:46 -0000
@@ -701,21 +701,22 @@
*
* @throws IllegalArgumentException if <code>proportionalLocation</code> is
* not in the range from 0.0 to 1.0 inclusive.
*/
public void setDividerLocation(double proportionalLocation)
{
if (proportionalLocation > 1 || proportionalLocation < 0)
throw new IllegalArgumentException
("proportion has to be between 0 and 1.");
- int max = (orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight();
+ int max = ((orientation == HORIZONTAL_SPLIT) ? getWidth() : getHeight())
+ - getDividerSize();
setDividerLocation((int) (proportionalLocation * max));
}
/**
* This method sets the location of the divider.
*
* @param location The location of the divider. The negative value forces to
* compute the new location from the preferred sizes of the split
* pane components.
*/
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
