[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: BasicTreeUI, fix for when root is hidden
From: |
Lillian Angel |
Subject: |
[cp-patches] Patch: BasicTreeUI, fix for when root is hidden |
Date: |
Wed, 20 Jul 2005 09:56:38 -0400 |
A user tested his program with custom icons and had the root hidden. He
tested it with Sun, and noticed that it worked properly by showing the
children of the root to appear as independant trees. Now our JTree works
the same.
Attached is a screen shot to further explain what I mean.
On the left is the JTree using Classpath, and on the right is Sun's.
2005-07-20 Lillian Angel <address@hidden>
* javax/swing/plaf/basic/BasicTreeUI.java
(paint): Changed to paint children of root as roots if the
root is not visible, but the root path is expanded.
(getPathForRow): If the root is not visible, but expanded,
the first child should be considered row 0.
(getRowCount): Likewise.
(getPathBounds): Likewise.
(getCellLocation): If root is not visible, but expanded, the
level of each node is lowered by 1.
(paintRecursive): If root is not visible, but expanded, there
should be no indentation when the children are drawn. Also,
there should be no line drawn connecting the children. This
makes it look like there are 2 independant trees (works same as
JDK).
current.diff
Description: Text Data
jtree.png
Description: PNG image
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: BasicTreeUI, fix for when root is hidden,
Lillian Angel <=