/[classpath]/classpath/javax/swing/JTree.java
ViewVC logotype

Diff of /classpath/javax/swing/JTree.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by rabbit78, Mon May 30 14:40:23 2005 UTC revision 1.23 by rabbit78, Mon Jun 6 12:36:52 2005 UTC
# Line 1780  public class JTree extends JComponent Line 1780  public class JTree extends JComponent
1780        }        }
1781      return foundPath;      return foundPath;
1782    }    }
1783    
1784      /**
1785       * Removes any paths in the current set of selected paths that are
1786       * descendants of <code>path</code>. If <code>includePath</code> is
1787       * set to <code>true</code> and <code>path</code> itself is selected,
1788       * then it will be removed too.
1789       *
1790       * @param path the path from which selected descendants are to be
1791       *     removed
1792       * @param includePath if <code>true</code> then <code>path</code>
1793       *     itself will also be remove if it's selected
1794       *
1795       * @return <code>true</code> if something has been removed,
1796       *     <code>false</code> otherwise
1797       *
1798       * @since 1.3
1799       */
1800      protected boolean removeDescendantSelectedPaths(TreePath path,
1801                                                        boolean includeSelected)
1802      {
1803        boolean removedSomething = false;
1804        TreePath[] selected = getSelectionPaths();
1805        for (int index = 0; index < selected.length; index++)
1806          {
1807            if ((selected[index] == path && includeSelected)
1808                || (selected[index].isDescendant(path)))
1809              {
1810                removeSelectionPath(selected[index]);
1811                removedSomething = true;
1812              }
1813          }
1814        return removedSomething;
1815      }
1816  }  }

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26