Class 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
    • 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().
        Specified by:
        sort in interface SortAgent
        Parameters:
        ascending - true indicates ascending; false indicates descending.