Class GroupByDataLayer<T>
- Type Parameters:
T- The type of the row objects.
- All Implemented Interfaces:
Observer,ILayer,ILayerListener,IUniqueIndexLayer,IPersistable
DataLayer that needs to be used in the body layer stack
for adding the groupBy feature to a NatTable composition. Internally creates
a TreeList and a IDataProvider for Objects, necessary as
dynamically new GroupByObjects will be added to the TreeList
by the GroupByTreeFormat.
This layer also supports calculating summary values for created groups. Note
that it is necessary to call
initializeTreeComparator(ISortModel, IUniqueIndexLayer, boolean)
after creation to ensure that sorting is working correctly with the groupBy
feature.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTo find out if an element is part of a group -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLabel prefix for labels that are added to cells for a group by object.static final StringLabel that indicates the shown tree item object as GroupByObjectstatic final StringLabel that indicates the shown tree item object as GroupByObject and contains a summary value.static final StringLabel prefix for labels that are added to cells for a group by object summary.Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.DataLayer
columnWidthConfig, dataProvider, DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, PERSISTENCE_KEY_COLUMN_WIDTH, PERSISTENCE_KEY_ROW_HEIGHT, rowHeightConfigFields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainterFields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionGroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor) Create a newGroupByDataLayerwith the given configuration that: uses the defaultGroupByExpansionModelwhich shows all nodes initially expanded has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done uses the defaultGroupByDataLayerConfigurationdoes not support groupBy summary values because of the missingIConfigRegistryreferenceGroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that: uses the defaultGroupByExpansionModelwhich shows all nodes initially expanded has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done does not support groupBy summary values because of the missingIConfigRegistryreferenceGroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, ca.odell.glazedlists.TreeList.ExpansionModel<Object> expansionModel, IConfigRegistry configRegistry, boolean smoothUpdates, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration.GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a newGroupByDataLayerwith the given configuration that: uses the defaultGroupByExpansionModelwhich shows all nodes initially expanded has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done uses the defaultGroupByDataLayerConfigurationGroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that: uses the defaultGroupByExpansionModelwhich shows all nodes initially expanded has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is doneGroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry, boolean smoothUpdates, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that: uses the defaultGroupByExpansionModelwhich shows all nodes initially expanded -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the internal cache to trigger new calculations.protected GroupByTreeFormat<T>createGroupByTreeFormat(GroupByModel groupByModel, IColumnAccessor<T> groupByColumnAccessor) booleandoCommand(ILayerCommand command) Opportunity to respond to a command as it flows down the stack.voidenableFilterSupport(FilterRowDataProvider<T> provider) getConfigLabelsByPosition(int columnPosition, int rowPosition) Returns the config labels for the cell at the given coordinates.getDataValueByPosition(int columnPosition, int rowPosition) Returns the data value for the cell at the given coordinates.getDataValueByPosition(int columnPosition, int rowPosition, LabelStack labelStack, boolean calculateInBackground) This method is used to retrieve a data value of anILayerCell.getGroupBySummaryProvider(LabelStack labelStack) protected ca.odell.glazedlists.matchers.Matcher<T>getGroupDescriptorMatcher(GroupByObject group, IColumnAccessor<T> columnAccessor) getItemsInGroup(GroupByObject group) Get the list of the items in a group.ca.odell.glazedlists.TreeList<Object>voidhandleLayerEvent(ILayerEvent event) Handle layer event notification.voidinitializeTreeComparator(ISortModel sortModel, IUniqueIndexLayer treeLayer, boolean setDataLayerReference) Initialize theComparatorthat is used to build the tree structure.voidClears all values in the internal cache to trigger new calculations.voidsetComparator(IGroupByComparator<T> comparator) voidsetValueCache(ICalculatedValueCache valueCache) Set theICalculatedValueCachethat should be used internally to calculate the summary values in a background thread and cache the results.voidupdate(Observable o, Object arg) protected voidMethod to update the tree list after filter or TreeList.Format changed.Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.DataLayer
downScaleColumnWidth, downScaleRowHeight, getColumnCount, getColumnIndexByPosition, getColumnPositionByIndex, getColumnPositionByX, getColumnWidthByPosition, getConfiguredColumnWidthByPosition, getConfiguredColumnWidthPercentageByPosition, getConfiguredMinColumnWidthByPosition, getConfiguredMinRowHeightByPosition, getConfiguredRowHeightByPosition, getConfiguredRowHeightPercentageByPosition, getDataProvider, getDataValue, getDefaultColumnWidth, getDefaultMinColumnWidth, getDefaultMinRowHeight, getDefaultRowHeight, getHeight, getMinColumnWidth, getMinRowHeight, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRowCount, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByIndex, getRowPositionByY, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, isColumnPercentageSizing, isColumnPercentageSizing, isColumnPositionResizable, isDistributeRemainingColumnSpace, isDistributeRemainingRowSpace, isFixColumnPercentageValuesOnResize, isFixRowPercentageValuesOnResize, isMinColumnWidthConfigured, isMinColumnWidthConfigured, isMinRowHeightConfigured, isMinRowHeightConfigured, isRowPercentageSizing, isRowPercentageSizing, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, registerCommandHandlers, resetColumnWidth, resetColumnWidthConfiguration, resetMinColumnWidth, resetMinRowHeight, resetRowHeight, resetRowHeightConfiguration, saveState, setColumnPercentageSizing, setColumnPercentageSizing, setColumnPositionResizable, setColumnsResizableByDefault, setColumnWidthByPosition, setColumnWidthByPosition, setColumnWidthPercentageByPosition, setColumnWidthPercentageByPosition, setDataProvider, setDataValue, setDataValueByPosition, setDefaultColumnWidth, setDefaultColumnWidthByPosition, setDefaultMinColumnWidth, setDefaultMinRowHeight, setDefaultRowHeight, setDefaultRowHeightByPosition, setDistributeRemainingColumnSpace, setDistributeRemainingRowSpace, setFixColumnPercentageValuesOnResize, setFixRowPercentageValuesOnResize, setMinColumnWidth, setMinRowHeight, setRowHeightByPosition, setRowHeightByPosition, setRowHeightPercentageByPosition, setRowHeightPercentageByPosition, setRowPercentageSizing, setRowPercentageSizing, setRowPositionResizable, setRowsResizableByDefault, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions, upScaleColumnWidth, upScaleRowHeightMethods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, configure, dispose, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getConfigLabelAccumulator, getDisplayModeByPosition, getLayerPainter, getRegionLabelsByXY, getRegionName, hasLayerListener, isDynamicSizeLayer, registerCommandHandler, registerEventHandler, registerPersistable, removeLayerListener, setClientAreaProvider, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.nebula.widgets.nattable.layer.ILayer
addLayerListener, configure, dispose, fireLayerEvent, getBoundsByPosition, getCellByPosition, getCellPainter, getClientAreaProvider, getDisplayModeByPosition, getLayerPainter, getRegionLabelsByXY, hasLayerListener, isDynamicSizeLayer, registerCommandHandler, registerPersistable, removeLayerListener, setClientAreaProvider, unregisterCommandHandler, unregisterPersistable
-
Field Details
-
GROUP_BY_OBJECT
Label that indicates the shown tree item object as GroupByObject- See Also:
-
GROUP_BY_COLUMN_PREFIX
Label prefix for labels that are added to cells for a group by object.- See Also:
-
GROUP_BY_SUMMARY
Label that indicates the shown tree item object as GroupByObject and contains a summary value.- See Also:
-
GROUP_BY_SUMMARY_COLUMN_PREFIX
Label prefix for labels that are added to cells for a group by object summary.- See Also:
-
-
Constructor Details
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor) Create a newGroupByDataLayerwith the given configuration that:- uses the default
GroupByExpansionModelwhich shows all nodes initially expanded - has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done
- uses the default
GroupByDataLayerConfiguration - does not support groupBy summary values because of the missing
IConfigRegistryreference
- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.
- uses the default
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that:- uses the default
GroupByExpansionModelwhich shows all nodes initially expanded - has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done
- does not support groupBy summary values because of the missing
IConfigRegistryreference
- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.useDefaultConfiguration-trueto add the defaultGroupByDataLayerConfiguration,falsefor not adding the default configuration.
- uses the default
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry) Create a newGroupByDataLayerwith the given configuration that:- uses the default
GroupByExpansionModelwhich shows all nodes initially expanded - has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done
- uses the default
GroupByDataLayerConfiguration
- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.configRegistry- TheIConfigRegistryneeded to retrieve the groupBy summary configurations.
- uses the default
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that:- uses the default
GroupByExpansionModelwhich shows all nodes initially expanded - has smoothUpdates enabled which leads to showing the summary values that were calculated before until the new value calculation is done
- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.configRegistry- TheIConfigRegistryneeded to retrieve the groupBy summary configurations.useDefaultConfiguration-trueto add the defaultGroupByDataLayerConfiguration,falsefor not adding the default configuration.
- uses the default
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, IConfigRegistry configRegistry, boolean smoothUpdates, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration that:- uses the default
GroupByExpansionModelwhich shows all nodes initially expanded
- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.configRegistry- TheIConfigRegistryneeded to retrieve the groupBy summary configurations.smoothUpdates-trueif the summary values that were calculated before should be returned until the new value calculation is done,falseifnullshould be returned until the calculation is finished.useDefaultConfiguration-trueto add the defaultGroupByDataLayerConfiguration,falsefor not adding the default configuration.
- uses the default
-
GroupByDataLayer
public GroupByDataLayer(GroupByModel groupByModel, ca.odell.glazedlists.EventList<T> eventList, IColumnAccessor<T> columnAccessor, ca.odell.glazedlists.TreeList.ExpansionModel<Object> expansionModel, IConfigRegistry configRegistry, boolean smoothUpdates, boolean useDefaultConfiguration) Create a newGroupByDataLayerwith the given configuration.- Parameters:
groupByModel- TheGroupByModelthat is used to define the tree structure based on the groupBy state. Needs to be provided as it is at least shared between theGroupByDataLayerand theGroupByHeaderLayer.eventList- TheEventListthat should be used as source of the internally createdTreeList. This should be highest list in theEventListstack in use, e.g. if sorting and filtering is also enabled and the lists are created like this:EventList<T> eventList = GlazedLists.eventList(values); TransformedList<T, T> rowObjectsGlazedList = GlazedLists.threadSafeList(eventList); SortedList<T> sortedList = new SortedList<>(rowObjectsGlazedList, null); FilterList<T> filterList = new FilterList<>(sortedList);theFilterListneeds to be used as parameter here.columnAccessor- TheIColumnAccessorthat should be used to access the base row objects.expansionModel- TheTreeList.ExpansionModelthat should be used on the internally createdTreeList. If set tonullthe internal default GroupByExpansionModel will be used that shows all nodes initially expanded.configRegistry- TheIConfigRegistryneeded to retrieve the groupBy summary configurations.smoothUpdates-trueif the summary values that were calculated before should be returned until the new value calculation is done,falseifnullshould be returned until the calculation is finished.useDefaultConfiguration-trueto add the defaultGroupByDataLayerConfiguration,falsefor not adding the default configuration.
-
-
Method Details
-
createGroupByTreeFormat
protected GroupByTreeFormat<T> createGroupByTreeFormat(GroupByModel groupByModel, IColumnAccessor<T> groupByColumnAccessor) - Parameters:
groupByModel- TheGroupByModelthat is used to specify the tree structure.groupByColumnAccessor- TheIColumnAccessorthat is used to access the values in the data model, should be of typeGroupByColumnAccessor.- Returns:
- The
GroupByTreeFormatthat is used to build the tree structure.
-
initializeTreeComparator
public void initializeTreeComparator(ISortModel sortModel, IUniqueIndexLayer treeLayer, boolean setDataLayerReference) Initialize theComparatorthat is used to build the tree structure. Adding all the below information will enable correct sorting of the tree structure taking the summary values and the groupBy values correctly into account.- Parameters:
sortModel- TheISortModelthat should be set to theIGroupByComparator. Setting theISortModelenables the usage of the configuredComparatorper column on creating the sorted tree structure.treeLayer- TheIUniqueIndexLayerthat should be set to theIGroupByComparator. Typically theTreeLayerand is needed to determine if the sort operation is performed on the tree column. Will only be inspected if a validISortModelis set.setDataLayerReference-truefor setting theGroupByDataLayerreference to this instance to theGroupByComparator,falseto set the reference tonull. TheGroupByDataLayerreference is used in the comparator to be able to sort by summary values. If summary values are not configured or the sorting by summary value is not needed, you should avoid setting the reference.- See Also:
-
enableFilterSupport
- Parameters:
provider- TheFilterRowDataProviderthat is used in the composition. Needed to be able to re-apply possible filter states on tree updates.- Since:
- 2.1
-
setComparator
- Parameters:
comparator- TheIGroupByComparatorthat is necessary to create the sorted tree structure. Can not benull.
-
getSortModel
- Returns:
- The
ISortModelthat is set to theIGroupByComparator. - Since:
- 1.6
- See Also:
-
updateTree
protected void updateTree()Method to update the tree list after filter or TreeList.Format changed. Need this workaround to update the tree list for presentation because of http://java.net/ jira /browse/GLAZEDLISTS-521For more information you can also have a look at this discussion: http://glazedlists.1045722.n5.nabble.com/sorting-a-treelist-td4704550. html
-
update
-
getTreeRowModel
- Returns:
- The ITreeRowModel that is responsible to retrieve information and operate on tree items.
-
getTreeList
- Returns:
- The TreeList that is created internally by this GroupByDataLayer to enable groupBy.
-
getConfigLabelsByPosition
Description copied from interface:ILayerReturns the config labels for the cell at the given coordinates. Needed to retrieve the corresponding configurations out of theIConfigRegistry.- Specified by:
getConfigLabelsByPositionin interfaceILayer- Overrides:
getConfigLabelsByPositionin classAbstractLayer- Parameters:
columnPosition- The column position of the cell.rowPosition- The row position of the cell.- Returns:
- The
LabelStackwith the config labels for the cell at the given coordinates.
-
getProvidedLabels
- Specified by:
getProvidedLabelsin interfaceILayer- Overrides:
getProvidedLabelsin classAbstractLayer- Returns:
- The collection of labels that are provided by this layer.
-
getDataValueByPosition
Description copied from interface:ILayerReturns the data value for the cell at the given coordinates.- Specified by:
getDataValueByPositionin interfaceILayer- Overrides:
getDataValueByPositionin classDataLayer- Parameters:
columnPosition- The column position of the cell.rowPosition- The row position of the cell.- Returns:
- The data value for the cell at the given coordinates.
-
getDataValueByPosition
public Object getDataValueByPosition(int columnPosition, int rowPosition, LabelStack labelStack, boolean calculateInBackground) This method is used to retrieve a data value of anILayerCell. It is intended to be used for conditional formatting. It allows to specify theLabelStackand to disable background calculation processing, since the conditional formatting needs the summary value without a delay.- Parameters:
columnPosition- The column position of the cell whose data value is requested.rowPosition- The row position of the cell whose data value is requested.labelStack- TheLabelStackof the cell whose data value is requested. Needed to retrieve a possible existingIGroupBySummaryProvider.calculateInBackground-trueto calculate the summary value in the background,falseif the calculation should be processed in the UI thread.- Returns:
- The data value for the
ILayerCellat the given coordinates.
-
getGroupBySummaryProvider
-
handleLayerEvent
Description copied from class:AbstractLayerHandle layer event notification. Convert it to your context and propagate UP. If you override this method you MUST NOT FORGET to raise the event up the layer stack by callingsuper.fireLayerEvent(event)- unless you plan to eat the event yourself.- Specified by:
handleLayerEventin interfaceILayerListener- Overrides:
handleLayerEventin classAbstractLayer- Parameters:
event- the event
-
clearCache
public void clearCache()Clear the internal cache to trigger new calculations.Usually it is not necessary to call this method manually. But for certain use cases it might be useful, e.g. changing the summary provider implementation at runtime.
- See Also:
-
killCache
public void killCache()Clears all values in the internal cache to trigger new calculations. This will also clear all values in the cache copy and will result in rendering like there was never a summary value calculated before.Usually it is not necessary to call this method manually. But for certain use cases it might be useful, e.g. changing the summary provider implementation at runtime.
- See Also:
-
doCommand
Description copied from interface:ILayerOpportunity to respond to a command as it flows down the stack. If the layer is not interested in the command it should allow the command to keep traveling down the stack.Note: Before the layer can process a command it must convert the command to its local coordinates using
ILayerCommand.convertToTargetLayer(ILayer) -
getValueCache
- Returns:
- The
ICalculatedValueCachethat contains the summary values and performs summary calculation in background processes if necessary.
-
setValueCache
Set theICalculatedValueCachethat should be used internally to calculate the summary values in a background thread and cache the results.Note: By default the
CalculatedValueCacheis used. Be sure you know what you are doing when you are trying to exchange the implementation.- Parameters:
valueCache- TheICalculatedValueCachethat contains the summary values and performs summary calculation in background processes if necessary.
-
getItemsInGroup
Get the list of the items in a group. Used for example to calculate the group summary values or group item count.Note: This method returns a new list and is therefore thread safe.
- Parameters:
group- TheGroupByObjectfor which the children should be retrieved.- Returns:
- The list of items in the group specified by the given
GroupByObject - Since:
- 1.5
-
getGroupDescriptorMatcher
protected ca.odell.glazedlists.matchers.Matcher<T> getGroupDescriptorMatcher(GroupByObject group, IColumnAccessor<T> columnAccessor) - Parameters:
group- TheGroupByObjectfor which the children should be retrieved.columnAccessor- TheIColumnAccessorthat is used to retrieve column value of an element.- Returns:
- The
Matcherthat is used to identify the children of aGroupByObject - See Also:
-