@Override public String getSortDirection() { return target.as(Treecol.class).getSortDirection(); }
final String dir = getSortDirection(); if (ascending) { if ("ascending".equals(dir))
/** It invokes {@link #sort(boolean)} to sort list items and maintain * {@link #getSortDirection}. * @since 5.0.6 */ public void onSort() { final String dir = getSortDirection(); if ("ascending".equals(dir)) sort(false); else if ("descending".equals(dir)) sort(true); else if (!sort(true)) sort(false); }
private static boolean doSort(Tree tree) { Treecols cols = tree.getTreecols(); if (!tree.isAutosort() || cols == null) return false; for (Component c : cols.getChildren()) { final Treecol hd = (Treecol) c; String dir = hd.getSortDirection(); if (!"natural".equals(dir)) { hd.doSort("ascending".equals(dir)); return true; } } return false; }