## org.gnu.gtk
Class TreeModelSort

    java.lang.Object
      org.gnu.glib.GObject
          org.gnu.gtk.TreeModel
              org.gnu.gtk.TreeModelSort

All Implemented Interfaces:
  TreeSortable

public class TreeModelSort
extends TreeModel
implements TreeSortable

Class for sorting the rows of a base `TreeModel`. The underlying TreeModel us sorted using a comparison function. The comparison function is set with the ``setSortMethod(org.gnu.gtk.TreeIterComparison, org.gnu.gtk.DataColumn)`` method.

Field Summary
`protected java.util.HashMap` `sortMethods`

Fields inherited from class org.gnu.glib.GObject
`eventsInitialized`

Constructor Summary
`protected` `TreeModelSort(Handle handle)` For internal use only.
`` `TreeModelSort(TreeModel model)` Create a new TreeModelSort using the given TreeModel as the underlying data model.

Method Summary
`TreeModel` `getModel()` Return the underlying data model.
`DataColumn` `getSortColumn()` Get a DataColumn object representing the currently sorted column.
`SortType` `getSortOrder()` Get the current sorting order of the store.
`static Type` `getType()` Retrieve the runtime type used by the GLib library.
`protected static void` `gtk_tree_model_sort_clear_cache(Handle treeModel)`
`protected static void` `gtk_tree_model_sort_convert_child_iter_to_iter(Handle treeModel, Handle childIter, Handle sortIter)`
`protected static Handle` `gtk_tree_model_sort_convert_child_path_to_path(Handle treeModel, Handle childPath)`
`protected static void` `gtk_tree_model_sort_convert_iter_to_child_iter(Handle treeModel, Handle childIter, Handle sortedIter)`
`protected static Handle` `gtk_tree_model_sort_convert_path_to_child_path(Handle treeModel, Handle sortedPath)`
`protected static Handle` `gtk_tree_model_sort_get_model(Handle treeModel)`
`protected static int` `gtk_tree_model_sort_get_type()`
`protected static Handle` `gtk_tree_model_sort_new_with_model(Handle childModel)`
`int` `handleCompareFunc(Handle model, Handle aIter, Handle bIter, int col)` Call-back method invoked by the JNI code when sorting is required.
`void` `setSortColumn(DataColumn column, SortType order)` Set the column in the list to sort on.
`void` `setSortMethod(TreeIterComparison method, DataColumn column)` Set the class used to sort the list according to the values stored in the given DataColumn.

Methods inherited from class org.gnu.gtk.TreeModel

`addListener, findListener, fireTreeModelEvent, getDataBlockCount, getEventListenerClass, getEventType, getFirstIter, getIter, getIter, getType, getValue, getValue, getValue, getValue, getValue, gtk_tree_model_get_column_type, gtk_tree_model_get_iter_first, gtk_tree_model_get_iter_from_string, gtk_tree_model_get_iter, gtk_tree_model_get_n_columns, gtk_tree_model_get_path, gtk_tree_model_get_string_from_iter, gtk_tree_model_get_value, gtk_tree_model_iter_children, gtk_tree_model_iter_has_child, gtk_tree_model_iter_n_children, gtk_tree_model_iter_next, gtk_tree_model_iter_nth_child, gtk_tree_model_iter_parent, removeListener`

Methods inherited from class org.gnu.glib.GObject

`addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, equals, freezeNotify, getBooleanProperty, getData, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getHandle, getIntFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getNullHandle, getPixbufProperty, getProperty, getStringFromHandle, getStringProperty, hashCode, hasProperty, instantiateJGObjectFromGType, notify, removeEventHandler, removeListener, retrieveGObject, setBooleanProperty, setData, setData, setDoubleProperty, setFloatProperty, setHandle, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.gnu.gtk.TreeSortable
`getHandle`

Field Detail

### sortMethods

    protected java.util.HashMap sortMethods

Constructor Detail

### TreeModelSort

    protected TreeModelSort(Handle handle)

  For internal use only.

### TreeModelSort

    public TreeModelSort(TreeModel model)

  Create a new TreeModelSort using the given TreeModel as the underlying data model.

Method Detail

### getType

    public static Type getType()

  Retrieve the runtime type used by the GLib library.

### getModel

    public TreeModel getModel()

  Return the underlying data model.

### setSortColumn

    public void setSortColumn(DataColumn column,
                              SortType order)

  Set the column in the list to sort on.

  Specified by:
    `setSortColumn` in interface `TreeSortable`

### getSortColumn

    public DataColumn getSortColumn()

  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(org.gnu.gtk.DataColumn)`` method.

  Specified by:
    `getSortColumn` in interface `TreeSortable`
  Returns:
    A DataColumn object representing the currently sorted column or `null` if there is no column currently sorted.

### getSortOrder

    public SortType getSortOrder()

  Get the current sorting order of the store.

  Specified by:
    `getSortOrder` in interface `TreeSortable`
  Returns:
    A SortType object defining the current sorting order of the store or `null` if there is no current sort order.

### setSortMethod

    public void setSortMethod(TreeIterComparison method,
                              DataColumn column)

  Set the class used to sort the list according to the values stored in the given DataColumn.

  Specified by:
    `setSortMethod` in interface `TreeSortable`

### handleCompareFunc

    public int handleCompareFunc(Handle model,
                                 Handle aIter,
                                 Handle bIter,
                                 int col)

  Call-back method invoked by the JNI code when sorting is required. This is for internal use only.

  Specified by:
    `handleCompareFunc` in interface `TreeSortable`

### gtk_tree_model_sort_get_type

    protected static final int gtk_tree_model_sort_get_type()

### gtk_tree_model_sort_new_with_model

    protected static final Handle gtk_tree_model_sort_new_with_model(Handle childModel)

### gtk_tree_model_sort_get_model

    protected static final Handle gtk_tree_model_sort_get_model(Handle treeModel)

### gtk_tree_model_sort_convert_child_path_to_path

    protected static final Handle gtk_tree_model_sort_convert_child_path_to_path(Handle treeModel,
                                                                                 Handle childPath)

### gtk_tree_model_sort_convert_child_iter_to_iter

    protected static final void gtk_tree_model_sort_convert_child_iter_to_iter(Handle treeModel,
                                                                               Handle childIter,
                                                                               Handle sortIter)

### gtk_tree_model_sort_convert_path_to_child_path

    protected static final Handle gtk_tree_model_sort_convert_path_to_child_path(Handle treeModel,
                                                                                 Handle sortedPath)

### gtk_tree_model_sort_convert_iter_to_child_iter

    protected static final void gtk_tree_model_sort_convert_iter_to_child_iter(Handle treeModel,
                                                                               Handle childIter,
                                                                               Handle sortedIter)

### gtk_tree_model_sort_clear_cache

    protected static final void gtk_tree_model_sort_clear_cache(Handle treeModel)