/** * Sort base implementation to be used to implement {@link Sortable}. * * Subclasses should call this from a public * {@link #sort(Object[], boolean[])} method when implementing Sortable. * * @see Container.Sortable#sort(java.lang.Object[], boolean[]) */ protected void sortContainer(Object[] propertyId, boolean[] ascending) { if (!(this instanceof Sortable)) { throw new UnsupportedOperationException( "Cannot sort a Container that does not implement Sortable"); } // Set up the item sorter for the sort operation getItemSorter().setSortProperties((Sortable) this, propertyId, ascending); // Perform the actual sort doSort(); // Post sort updates if (isFiltered()) { filterAll(); } else { fireItemSetChange(); } }