[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Patch: BasicTreeUI painting fix
From: |
Lillian Angel |
Subject: |
[cp-patches] Patch: BasicTreeUI painting fix |
Date: |
Tue, 15 Nov 2005 14:50:29 -0500 |
Roman noticed that JTree painting was rather inefficent with big trees.
This was due to the recursion. I fixed this to only paint the rows
contained in the clip, using a loop.
Also, I did a bit of cleaning up in the class.
2005-11-15 Lillian Angel <address@hidden>
* javax/swing/plaf/basic/BasicTreeUI.java:
Removed unneeded field.
(getPathBounds): Reimplemented to use getNodeDimensions.
(getRowCount): Removed call to updateCurrentVisiblePath.
(uninstallKeyboardActions): Implemented.
(paint): Reimplemented to only paint rows contained in clip.
No longer uses recursion.
(mousePressed): If control icon is clicked, should scroll to
that path.
(getNodeDimensions): Implemented.
(getRowX): Implemented.
(getCellBounds): Removed.
(getCellLocation): Removed.
(paintRecursive): Removed.
(paintControlIcons): Removed.
(getPreviousVisibleNode): Removed call to
updateCurrentVisiblePath.
(getLevel): Added check for invisible root.
(paintVerticalLine): Set graphics color.
(paintHorizontalLine): Likewise.
(drawCentered): Added negative check.
(drawDashedHorizontalLine): Set graphics color.
(drawDashedVerticalLine): Likewise.
(paintExpandControl): Implemented.
(paintHorizontalPartOfLeg): Likewise.
(paintVerticalPartOfLeg): Likewise.
(paintRow): Added call to paint the control icons.
(updateCurrentVisiblePath): Cleaned up function.
patch.diff
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Patch: BasicTreeUI painting fix,
Lillian Angel <=