The method JTree.isRowSelected() should delegate directly to the
TreeSelectionModel method with the same name, rather than going through
getPathForRow() and isPathSelected() as a Mauve test shows that
accompanies this fix.
2006-10-09 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/JTree.java
(isSelected): Delegate to the selection model directly.
/Roman
Index: javax/swing/JTree.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTree.java,v
retrieving revision 1.74
diff -u -1 -5 -r1.74 JTree.java
--- javax/swing/JTree.java 17 Sep 2006 23:05:08 -0000 1.74
+++ javax/swing/JTree.java 8 Oct 2006 22:21:32 -0000
@@ -2423,31 +2423,31 @@
return selectionModel.getSelectionPaths();
}
public int[] getSelectionRows()
{
return selectionModel.getSelectionRows();
}
public boolean isPathSelected(TreePath path)
{
return selectionModel.isPathSelected(path);
}
public boolean isRowSelected(int row)
{
- return selectionModel.isPathSelected(getPathForRow(row));
+ return selectionModel.isRowSelected(row);
}
public boolean isSelectionEmpty()
{
return selectionModel.isSelectionEmpty();
}
/**
* Return the value of the <code>dragEnabled</code> property.
*
* @return the value
*
* @since 1.4
*/
public boolean getDragEnabled()