classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: expand/collapse for JTree


From: Lillian Angel
Subject: [cp-patches] FYI: expand/collapse for JTree
Date: Wed, 06 Jul 2005 14:55:35 -0400

I committed a minor fix for my last patch.

2005-07-06  Lillian Angel  <address@hidden>

        * javax/swing/plaf/basic/BasicTreeUI.java
        (getNextVisibleNode): Implemented
        (getPathForRow): Fixed so the next node retrieved is visible.


On Wed, 2005-07-06 at 13:53 -0400, Lillian Angel wrote:
> Here is the patch for expanding and collapsing the JTree. It appears to
> be fully functional. The only remaining issues with expand/collapse are:
> the extra long lines drawn vertically for subfolders and the
> expand/collapse icons do not appear. The reason for the icons is that,
> they are not loaded in the BasicLookAndFeel class.
> 
> For selection, I still need to implement the CONTIGUOUS_TREE_SELECTION
> option.
> 
> There are some other functions/features that I still need to implement.
> 
> 2005-07-06  Lillian Angel  <address@hidden>
> 
>       * javax/swing/JTree.java
>               Initialized the HashTable.
>               (addSelectionPath): removed redundant code.
>               (doExpandParents): added in line so that state is 
>               changed for current path. Changed while loop to if 
>               statement, an infinite loop was occurring.
>       * javax/swing/plaf/basic/BasicTreeUI.java
>               (getPathForRow): Implemented to work with visibility.
>               (isLeaf): Implemented
>               (mouseClicked): add in check for expand/collapse. 
>               Selection for DISCONTIGUOUS tree selection is 
>               implemented.
>               (treeExpanded): called repaint, so the tree updates 
>               visually when something is expanded.
>               (treeCollapse): Similar to treeExpanded.
>               (paintLeaf): changed to paint leaf only when visible.
>               (paintNonLeaf): paints only when visible.
>               (paintRecursive): lines for tree are only painted when 
>               needed. checked for visibility of current object and 
>               parent.
>       * javax/swing/tree/DefaultTreeCellRenderer.java
>               (getTreeCellRendererComponent): setting icons when 
>               expanded.
>       * javax/swing/tree/DefaultTreeSelectionModel.java
>               (clearSelection): set leadPath to null because selection
>               should be completely reset.
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches





reply via email to

[Prev in Thread] Current Thread [Next in Thread]