Class CmsResourceTreeTable.FileSorter
java.lang.Object
com.vaadin.v7.data.util.DefaultItemSorter
org.opencms.ui.components.fileselect.CmsResourceTreeTable.FileSorter
- All Implemented Interfaces:
com.vaadin.v7.data.util.ItemSorter
,Serializable
,Cloneable
,Comparator<Object>
,I_CmsItemSorter
- Enclosing class:
- CmsResourceTreeTable
public static class CmsResourceTreeTable.FileSorter
extends com.vaadin.v7.data.util.DefaultItemSorter
implements I_CmsItemSorter
Extends the default sorting to differentiate between files and folder when sorting by name.
Also allows sorting by navPos property for the Resource icon column.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.v7.data.util.DefaultItemSorter
com.vaadin.v7.data.util.DefaultItemSorter.DefaultPropertyValueComparator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareProperty
(Object propertyId, boolean sortDirection, com.vaadin.v7.data.Item item1, com.vaadin.v7.data.Item item2) Collection<?>
getSortableContainerPropertyIds
(com.vaadin.v7.data.Container container) Returns the sortable container property ids.Methods inherited from class com.vaadin.v7.data.util.DefaultItemSorter
compare, setSortProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface com.vaadin.v7.data.util.ItemSorter
compare, setSortProperties
-
Constructor Details
-
FileSorter
public FileSorter()
-
-
Method Details
-
getSortableContainerPropertyIds
Description copied from interface:I_CmsItemSorter
Returns the sortable container property ids.- Specified by:
getSortableContainerPropertyIds
in interfaceI_CmsItemSorter
- Parameters:
container
- the container to be sorted- Returns:
- the sortable container property ids
- See Also:
-
compareProperty
protected int compareProperty(Object propertyId, boolean sortDirection, com.vaadin.v7.data.Item item1, com.vaadin.v7.data.Item item2) - Overrides:
compareProperty
in classcom.vaadin.v7.data.util.DefaultItemSorter
- See Also:
-
DefaultItemSorter.compareProperty(java.lang.Object, boolean, com.vaadin.v7.data.Item, com.vaadin.v7.data.Item)
-