Class SwitchedSortAgentImpl
java.lang.Object
org.zkoss.zats.mimic.impl.operation.AgentDelegator<ComponentAgent>
org.zkoss.zats.mimic.impl.operation.SwitchedSortAgentImpl
- All Implemented Interfaces:
Agent,OperationAgent,SortAgent
public abstract class SwitchedSortAgentImpl
extends AgentDelegator<ComponentAgent>
implements SortAgent
For Treecol & Listheader, their sorting order's switching is pre-defined. Initially, it's unsorted (natural).
When clicking first time, it become ascending. Then it switches between ascending and descending.
natural --> ascending, descending <--> ascending
natural --> ascending, descending <--> ascending
- Author:
- Hawk
-
Field Summary
FieldsFields inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
target -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
getClient, getDelegateeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
Field Details
-
ASCENDING
- See Also:
-
DESCENDING
- See Also:
-
-
Constructor Details
-
SwitchedSortAgentImpl
- Parameters:
target-
-
-
Method Details
-
getSortDirection
-
sort
public void sort(boolean ascending) Send AU data based on the component's current sorting direction. For Treecol & Listheader, it only sends AU when desired order is different from current sorted order. Their sorted order's switching is pre-defined, natural --> ascending, ascending <--> descending. Please refer Listheader.onSort().
-