Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.treetable
Interface TreeTableComparator

All Superinterfaces:
Comparator
All Known Implementing Classes:
DefaultTreeTableComparator, TreeNodeComparator

public interface TreeTableComparator
extends Comparator

The comparator used in order to group the rows of a TreeTable component. Implementations of this class either compare tree nodes (TreeNodeComparator) or the user objects of a DefaultMutableTreeNode (DefaultTreeTableComparator).


Method Summary
 boolean getAlwaysCreateGroup()
          Returns true if a group node should be used if there is only one child at the this comparator's tree level.
 boolean isGroupedByColumn(int column)
          Returns true if column was used by this comparator in order to group the rows of a TreeTable component.
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Method Detail

getAlwaysCreateGroup

boolean getAlwaysCreateGroup()
Returns true if a group node should be used if there is only one child at the this comparator's tree level. This method is used by ComparableTreeTableModel when a new node is added to the model.

Returns:
true if a group node should always be created, false otherwise.

isGroupedByColumn

boolean isGroupedByColumn(int column)
Returns true if column was used by this comparator in order to group the rows of a TreeTable component.

Parameters:
column - the index of the column
Returns:
true if the column was used in grouping, false otherwise

Copyright © 2005 Scientific Applications. All Rights Reserved.