@SuppressWarnings("unchecked") protected ContainerTableItems createContainerTableSource(CollectionContainer container) { return new ContainerTableItems(container); }
@Override public Object getItem(Object itemId) { return ContainerTableItems.this.getItem(itemId); }
@Override public Object getItemValue(MetaPropertyPath property, Object itemId) { return ContainerTableItems.this.getItemValue(itemId, property); } };
@Override public void sort(Object[] propertyId, boolean[] ascending) { sortProperties = propertyId; sortAscending = ascending; if (hasGroups()) { Sort sort = createSort(propertyId, ascending); doGroupSort(sort); } else { super.sort(propertyId, ascending); } }
@Override public void sort(Object[] propertyId, boolean[] ascending) { if (container.getSorter() != null) { container.getSorter().sort(createSort(propertyId, ascending)); } else { log.debug("Container {} sorter is null", container); } }
public ContainerTableItems(CollectionContainer<E> container) { this.container = container; this.container.addItemChangeListener(this::containerItemChanged); this.container.addCollectionChangeListener(this::containerCollectionChanged); this.container.addItemPropertyChangeListener(this::containerItemPropertyChanged); this.aggregatableDelegate = createAggregatableDelegate(); }
@Override public void groupBy(Object[] properties) { if (isGrouping) { return; } isGrouping = true; try { if (properties != null) { groupProperties = properties; if (!ArrayUtils.isEmpty(groupProperties)) { doGroup(); } else { roots = null; parents = null; children = null; groupItems = null; itemGroups = null; } } } finally { isGrouping = false; if (sortProperties != null && sortProperties.length > 0) { if (hasGroups()) { doGroupSort(createSort(sortProperties, sortAscending)); } else { super.sort(sortProperties, sortAscending); } } } }