|
|
Re: List view is not updated while filtering [message #1816867 is a reply to message #1816855] |
Fri, 08 November 2019 22:34 |
Ralf Heydenreich Messages: 235 Registered: July 2009 |
Senior Member |
|
|
I assume it lies in the layer stack. It's built like this:
public TreeBodyLayerStack(List<K> values,
IColumnPropertyAccessor<K> columnPropertyAccessor,
TreeList.Format<K> treeFormat) {
// wrapping of the list to show into GlazedLists
// see http://publicobject.com/glazedlists/ for further information
EventList<K> eventList = GlazedLists.eventList(values);
TransformedList<K, K> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList);
// use the SortedList constructor with 'null' for the Comparator
// because the Comparator will be set by configuration
SortedList<K> sortedList = new SortedList<>(rowObjectsGlazedList, null);
// wrap the SortedList with the TreeList
this.treeList = new TreeList<K>(sortedList, treeFormat, TreeList.NODES_START_COLLAPSED);
this.bodyDataProvider = new ListDataProvider<K>(this.treeList, columnPropertyAccessor);
bodyDataLayer = new DataLayer(this.bodyDataProvider);
// simply apply labels for every column by index
bodyDataLayer.setConfigLabelAccumulator(new ColumnLabelAccumulator());
// layer for event handling of GlazedLists and PropertyChanges
GlazedListsEventLayer<K> glazedListsEventLayer = new GlazedListsEventLayer<>(bodyDataLayer, this.treeList);
GlazedListTreeData<K> treeData = new GlazedListTreeData<>(this.treeList);
ITreeRowModel<K> treeRowModel = new GlazedListTreeRowModel<>(treeData);
this.selectionLayer = new SelectionLayer(glazedListsEventLayer);
this.treeLayer = new TreeLayer(this.selectionLayer, treeRowModel);
treeLayer.setRegionName(GridRegion.BODY);
setUnderlyingLayer(new ViewportLayer(this.treeLayer));
}
Is that correct or should I build it otherwise?
TIA,
Ralf.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02254 seconds