{
Object rowKey = getRowKey();
if(rowKey == null)
return Collections.emptyList();
TreeModel treeModel = getTreeModel();
List<Integer> rowIndices = new ArrayList<Integer>();
// Use model APIs for moving currency(setRowIndex/Key) vs component API to avoid performance issue
// associated with stamp state saving
try
{
rowIndices.add(treeModel.getRowIndex());
Object childRowKey = treeModel.getContainerRowKey(rowKey);
while(childRowKey != null)
{
treeModel.setRowKey(childRowKey);
rowIndices.add(treeModel.getRowIndex());
childRowKey = treeModel.getContainerRowKey(childRowKey);
}
Collections.reverse(rowIndices);
}
finally
{
// make sure that we restore our currency to the original state
treeModel.setRowKey(rowKey);
}
return rowIndices;
}
@Override