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- Author:
- Hawk
-
-
Field Summary
Fields Modifier and Type Field Description static StringASCENDINGstatic StringDESCENDING-
Fields inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
target
-
-
Constructor Summary
Constructors Constructor Description SwitchedSortAgentImpl(ComponentAgent target)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetSortDirection()voidsort(boolean ascending)Send AU data based on the component's current sorting direction.-
Methods inherited from class org.zkoss.zats.mimic.impl.operation.AgentDelegator
getClient, getDelegatee
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zats.mimic.Agent
getClient, getDelegatee
-
-
-
-
Field Detail
-
ASCENDING
public static final String ASCENDING
- See Also:
- Constant Field Values
-
DESCENDING
public static final String DESCENDING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SwitchedSortAgentImpl
public SwitchedSortAgentImpl(ComponentAgent target)
- Parameters:
target-
-
-
Method Detail
-
getSortDirection
protected abstract String 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().
-
-