org.gnu.gtk

Class TreeSortableHelper


public class TreeSortableHelper
extends java.lang.Object

Internal helper class for classes that implement the TreeSortable interface. Applications normally shouldn't use this class.

Method Summary

static TreeIterComparison
getMethod(TreeSortable sortable, int column)
Get the TreeIterComparison object stored for this column.
static DataColumn
getSortColumn(TreeSortable sortable)
Get a DataColumn object representing the currently sorted column.
static SortType
getSortOrder(TreeSortable sortable)
Get the current sorting order of the store.
static Type
getType()
Retrieve the runtime type used by the GLib library.
static void
setSortColumn(TreeSortable sortable, DataColumn column, SortType order)
Set the column in the list to sort on.
static void
setSortMethod(TreeSortable sortable, TreeIterComparison method, DataColumn column)
Set the class used to sort the list according to the values stored in the given DataColumn.

Method Details

getMethod

public static TreeIterComparison getMethod(TreeSortable sortable,
                                           int column)
Get the TreeIterComparison object stored for this column. For internal use only.

getSortColumn

public static DataColumn getSortColumn(TreeSortable sortable)
Get a DataColumn object representing the currently sorted column. This is not the same DataColumn used to create the store. It is only of type DataColumn (not DataColumnString, etc). It can be compared with another DataColumn object using the DataColumn.equals(DataColumn) method.
Returns:
A DataColumn object representing the currently sorted column or null if there is no column currently sorted.

getSortOrder

public static SortType getSortOrder(TreeSortable sortable)
Get the current sorting order of the store.
Returns:
A SortType object defining the current sorting order of the store or null if there is no current sort order.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.

setSortColumn

public static void setSortColumn(TreeSortable sortable,
                                 DataColumn column,
                                 SortType order)
Set the column in the list to sort on.

setSortMethod

public static void setSortMethod(TreeSortable sortable,
                                 TreeIterComparison method,
                                 DataColumn column)
Set the class used to sort the list according to the values stored in the given DataColumn.

"handleCompareFunc" is part of the TreeSortable interface.