Interface Container.Sortable

    • Method Detail

      • sort

        void sort​(Object[] propertyId,
                  boolean[] ascending)
        Sorts the container items.

        Sorting a container can irreversibly change the order of its items or only change the order temporarily, depending on the container.

        Parameters:
        propertyId - Array of container property IDs, whose values are used to sort the items in container as primary, secondary, ... sorting criterion. All of the item IDs must be in the collection returned by getSortableContainerPropertyIds()
        ascending - Array of sorting order flags corresponding to each property ID used in sorting. If this array is shorter than propertyId array, ascending order is assumed for items where the order is not specified. Use true to sort in ascending order, false to use descending order.
      • getSortableContainerPropertyIds

        Collection<?> getSortableContainerPropertyIds()
        Gets the container property IDs which can be used to sort the items.
        Returns:
        the IDs of the properties that can be used for sorting the container