Package ch.bailu.gtk.gtk
Class NumericSorter
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.Sorter
ch.bailu.gtk.gtk.NumericSorter
- All Implemented Interfaces:
PointerInterface
`GtkNumericSorter` is a `GtkSorter` that compares numbers.
To obtain the numbers to compare, this sorter evaluates a
[class@Gtk.Expression].
To obtain the numbers to compare, this sorter evaluates a
[class@Gtk.Expression].
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gtk.Sorter
Sorter.OnChanged
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gtk.Sorter
SIGNAL_ON_CHANGED
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionNumericSorter
(Expression expression) Creates a new numeric sorter using the given @expression.NumericSorter
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
Gets the expression that is evaluated to obtain numbers from items.static int
static long
static TypeSystem.TypeSize
int
Gets whether this sorter will sort smaller numbers first.static long
static TypeSystem.TypeSize
void
setExpression
(Expression expression) Sets the expression that is evaluated to obtain numbers from items.void
setSortOrder
(int sort_order) Sets whether to sort smaller numbers before larger ones.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
NumericSorter
-
NumericSorter
Creates a new numeric sorter using the given @expression.
Smaller numbers will be sorted first. You can call
[method@Gtk.NumericSorter.set_sort_order] to change this.- Parameters:
expression
- The expression to evaluate
-
-
Method Details
-
getClassHandler
-
getExpression
Gets the expression that is evaluated to obtain numbers from items.- Returns:
- a `GtkExpression`
-
getSortOrder
public int getSortOrder()Gets whether this sorter will sort smaller numbers first.- Returns:
- the order of the numbers
-
setExpression
Sets the expression that is evaluated to obtain numbers from items.
Unless an expression is set on @self, the sorter will always
compare items as invalid.
The expression must have a return type that can be compared
numerically, such as %G_TYPE_INT or %G_TYPE_DOUBLE.- Parameters:
expression
- a `GtkExpression`
-
setSortOrder
public void setSortOrder(int sort_order) Sets whether to sort smaller numbers before larger ones.- Parameters:
sort_order
- whether to sort smaller numbers first
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-