Class ComboBoxFilterRowHeaderComposite<T>
- All Implemented Interfaces:
IFilterRowComboUpdateListener,ILayer,ILayerListener,IPersistable
The special about this ComboBoxFilterRowHeaderComposite is that it creates a filter row that behaves and looks like the Excel filter. So it doesn't provide text fields for free filtering but adds comboboxes for all columns that contain all available values for that column that can be de-/selected via checkboxes.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.nebula.widgets.nattable.layer.CompositeLayer
CompositeLayer.CompositeLayerPainter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FilterRowComboBoxDataProvider<T>The IComboBoxDataProvider that is used to fill the filter row comboboxes.protected final FilterRowDataLayer<T>The FilterRowDataLayer which serves as the filter row layer.protected booleanFlag that allows to set the filter row visible or invisible.protected final ComboBoxGlazedListsFilterStrategy<T>The IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.Fields 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
ConstructorsConstructorDescriptionComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, boolean lazyLoading, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, boolean lazyLoading, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ComboBoxGlazedListsFilterStrategy<T> filterStrategy, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations.ComboBoxFilterRowHeaderComposite(ComboBoxGlazedListsFilterStrategy<T> filterStrategy, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, ILayer columnHeaderLayer, FilterRowDataLayer<T> filterRowDataLayer, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoCommand(ILayerCommand command) Opportunity to respond to a command as it flows down the stack.getDataValueByPosition(int compositeColumnPosition, int compositeRowPosition) Returns the data value for the cell at the given coordinates.Returns the IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.intReturns the total height in pixels of this layer.ca.odell.glazedlists.matchers.CompositeMatcherEditor<T>intvoidHandles the update of the value cache of the FilterRowComboBoxDataProvidervoidhandleLayerEvent(ILayerEvent event) Handle layer event notification.booleanvoidloadState(String prefix, Properties properties) Restore the state out of the given Properties identified by the specified prefix.voidsaveState(String prefix, Properties properties) Saves the state to the given Properties using the specified prefix.voidSets all values for all comboboxes as selected.voidsetAllValuesSelected(boolean performEditorCheck) Sets all values for all comboboxes as selected.voidsetFilterRowVisible(boolean filterRowVisible) Sets the visibility state of the filter row.Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.CompositeLayer
addConfigLabelAccumulatorForRegion, configure, dispose, doCommandOnChildLayers, getBoundsByPosition, getCellByPosition, getCellPainter, getChildLayerByLayoutCoordinate, getChildLayerByRegionName, getChildLayerLayout, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnPositionOffset, getColumnWidthByPosition, getConfigLabelAccumulatorByRegionName, getConfigLabelsByPosition, getDisplayModeByPosition, getHeightOffset, getLayoutXByColumnPosition, getLayoutXByPixelX, getLayoutXCount, getLayoutXYByChildLayer, getLayoutXYByPixelXY, getLayoutXYByPosition, getLayoutYByPixelY, getLayoutYByRowPosition, getLayoutYCount, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getProvidedLabels, getRegionLabelsByXY, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getRowPositionOffset, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, getWidthOffset, isColumnPositionResizable, isDynamicSizeLayer, isRowPositionResizable, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, setChildLayer, setConfigLabelAccumulatorForRegion, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositionsMethods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getClientAreaProvider, getConfigLabelAccumulator, getLayerPainter, getRegionName, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setClientAreaProvider, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
-
Field Details
-
filterRowDataLayer
The FilterRowDataLayer which serves as the filter row layer. -
filterRowVisible
protected boolean filterRowVisibleFlag that allows to set the filter row visible or invisible. -
comboBoxDataProvider
The IComboBoxDataProvider that is used to fill the filter row comboboxes. -
filterStrategy
The IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.
-
-
Constructor Details
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will create the FilterRowComboBoxDataProvider needed for filtering and add the default ComboBoxFilterRowConfiguration.- Parameters:
filterList- The FilterList that will be used for filtering.bodyLayer- A layer in the body region. Usually the DataLayer or a layer that is responsible for list event handling. Needed for creation of the FilterRowComboBoxDataProvider.baseCollection- The base collection that is used to fill the body. Needed to determine the values to show in the filter comboboxes and initially pre-select them.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will create the FilterRowComboBoxDataProvider needed for filtering .- Parameters:
filterList- The FilterList that will be used for filtering.bodyLayer- A layer in the body region. Usually the DataLayer or a layer that is responsible for list event handling. Needed for creation of the FilterRowComboBoxDataProvider.baseCollection- The base collection that is used to fill the body. Needed to determine the values to show in the filter comboboxes and initially pre-select them.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, boolean lazyLoading, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will create the FilterRowComboBoxDataProvider needed for filtering .- Parameters:
filterList- The FilterList that will be used for filtering.bodyLayer- A layer in the body region. Usually the DataLayer or a layer that is responsible for list event handling. Needed for creation of the FilterRowComboBoxDataProvider.baseCollection- The base collection that is used to fill the body. Needed to determine the values to show in the filter comboboxes and initially pre-select them.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.lazyLoading- Flag to configure whether the content of the comboboxes should be loaded lazily or not. Default istruecolumnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will create the FilterRowComboBoxDataProvider needed for filtering .Note:This constructor should only be used in cases where it is absolutely necessary to use a custom CompositeMatcherEditor. This could be for example to create a complex NatTable instance where several filter rows need to be combined.
- Parameters:
filterList- The FilterList that will be used for filtering.matcherEditor- The CompositeMatcherEditor that is set to the FilterList and needs to be used by the ComboBoxGlazedListsFilterStrategy to apply the filters via filter row.bodyLayer- A layer in the body region. Usually the DataLayer or a layer that is responsible for list event handling. Needed for creation of the FilterRowComboBoxDataProvider.baseCollection- The base collection that is used to fill the body. Needed to determine the values to show in the filter comboboxes and initially pre-select them.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, boolean lazyLoading, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will create the FilterRowComboBoxDataProvider needed for filtering .Note:This constructor should only be used in cases where it is absolutely necessary to use a custom CompositeMatcherEditor. This could be for example to create a complex NatTable instance where several filter rows need to be combined.
- Parameters:
filterList- The FilterList that will be used for filtering.matcherEditor- The CompositeMatcherEditor that is set to the FilterList and needs to be used by the ComboBoxGlazedListsFilterStrategy to apply the filters via filter row.bodyLayer- A layer in the body region. Usually the DataLayer or a layer that is responsible for list event handling. Needed for creation of the FilterRowComboBoxDataProvider.baseCollection- The base collection that is used to fill the body. Needed to determine the values to show in the filter comboboxes and initially pre-select them.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.lazyLoading- Flag to configure whether the content of the comboboxes should be loaded lazily or not. Default istruecolumnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Using this constructor will add the default ComboBoxFilterRowConfiguration.- Parameters:
filterList- The FilterList that will be used for filtering.comboBoxDataProvider- The FilterRowComboBoxDataProvider that should be used to fill the filter comboboxes.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Will use the given FilterList for creating the ComboBoxGlazedListsFilterStrategy and the given FilterRowComboBoxDataProvider instead of creating a new one.- Parameters:
filterList- The FilterList that will be used for filtering.comboBoxDataProvider- The FilterRowComboBoxDataProvider that should be used to fill the filter comboboxes.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Will use the given FilterList and MatcherEditor for creating the ComboBoxGlazedListsFilterStrategy and the given FilterRowComboBoxDataProvider instead of creating a new one.Note:This constructor should only be used in cases where it is absolutely necessary to use a custom CompositeMatcherEditor. This could be for example to create a complex NatTable instance where several filter rows need to be combined.
- Parameters:
filterList- The FilterList that will be used for filtering.matcherEditor- The CompositeMatcherEditor that is set to the FilterList and needs to be used by the ComboBoxGlazedListsFilterStrategy to apply the filters via filter row.comboBoxDataProvider- The FilterRowComboBoxDataProvider that should be used to fill the filter comboboxes.bodyDataColumnAccessor- The IColumnAccessor that is needed by the IFilterStrategy to perform filtering.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ComboBoxGlazedListsFilterStrategy<T> filterStrategy, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Will use the given ComboBoxGlazedListsFilterStrategy instead of creating a new one.- Parameters:
filterStrategy- The ComboBoxGlazedListsFilterStrategy that should be used for filtering.comboBoxDataProvider- The FilterRowComboBoxDataProvider that should be used to fill the filter comboboxes.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.columnHeaderDataProvider- TheIDataProviderof the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration
-
ComboBoxFilterRowHeaderComposite
public ComboBoxFilterRowHeaderComposite(ComboBoxGlazedListsFilterStrategy<T> filterStrategy, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, ILayer columnHeaderLayer, FilterRowDataLayer<T> filterRowDataLayer, IConfigRegistry configRegistry, boolean useDefaultConfiguration) Creates a new ComboBoxFilterRowHeaderComposite based on the given informations. Will use the given ComboBoxGlazedListsFilterStrategy instead of creating a new one.- Parameters:
filterStrategy- The ComboBoxGlazedListsFilterStrategy that should be used for filtering.comboBoxDataProvider- The FilterRowComboBoxDataProvider that should be used to fill the filter comboboxes.columnHeaderLayer- The columnheader layer the filter row layer is related to. Needed for building this CompositeLayer, dimensionally connect the filter row to and retrieve information and perform actions related to filtering.filterRowDataLayer- TheFilterRowDataLayerwhich is used for backing the filter data and is rendered in the second row of thisCompositeLayer.configRegistry- TheIConfigRegistryneeded to retrieve various configurations.useDefaultConfiguration- Tell whether the default configuration should be used or not. If not you need to ensure to add a configuration that adds at least the needed configuration specified in ComboBoxFilterRowConfiguration- Since:
- 2.3
-
-
Method Details
-
saveState
Description copied from interface:IPersistableSaves the state to the given Properties using the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- Specified by:
saveStatein interfaceIPersistable- Overrides:
saveStatein classCompositeLayer- Parameters:
prefix- The prefix to use for the state keys. Is also used as the state configuration name.properties- The Properties instance to save the state to.
-
loadState
Description copied from interface:IPersistableRestore the state out of the given Properties identified by the specified prefix. Note: The prefix must be prepended to the property key to support multiple states within one Properties instance.- Specified by:
loadStatein interfaceIPersistable- Overrides:
loadStatein classCompositeLayer- Parameters:
prefix- The prefix to use for the state keys. Is also used as the state configuration name.properties- The Properties instance to load the state from.
-
getFilterRowDataLayer
- Returns:
- The FilterRowDataLayer which serves as the filter row layer.
-
getMatcherEditor
- Returns:
- The CompositeMatcherEditor that is used for filtering. As this one is filled with MatcherEditors by the IFilterStrategy, direct modifications may be overridden on changing cell values in the filter row.
-
getFilterStrategy
Returns the IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite. This is needed to integrate static filters, e.g. using GlazedListsRowHideShowLayer together with this ComboBoxFilterRowHeaderComposite by adding the MatcherEditor as static filter to the ComboBoxGlazedListsFilterStrategy.- Returns:
- The IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.
-
getComboBoxDataProvider
- Returns:
- The IComboBoxDataProvider that is used to fill the filter row comboboxes.
-
isFilterRowVisible
public boolean isFilterRowVisible()- Returns:
trueif the filter row is visible,falseif not.
-
setFilterRowVisible
public void setFilterRowVisible(boolean filterRowVisible) Sets the visibility state of the filter row.- Parameters:
filterRowVisible-trueto set the filter row visible,falseto hide it.
-
setAllValuesSelected
public void setAllValuesSelected()Sets all values for all comboboxes as selected. This is needed because selecting all items in the comboboxes mean to have no filter applied.Simply applies the SELECT_ALL value to all columns, irrespective of the configured filter editor.
Note: The filter row IDataProvider is filled by modifying the Map of filter objects directly instead of calling setDataValue(). This is because calling setDataValue() will transform indexes which is not necessary on initialization and causes strange behaviour in some compositions.
-
setAllValuesSelected
public void setAllValuesSelected(boolean performEditorCheck) Sets all values for all comboboxes as selected. This is needed because selecting all items in the comboboxes mean to have no filter applied.Note: The filter row IDataProvider is filled by modifying the Map of filter objects directly instead of calling setDataValue(). This is because calling setDataValue() will transform indexes which is not necessary on initialization and causes strange behaviour in some compositions.
- Parameters:
performEditorCheck- Whether it should be checked if the filter editor is a combobox editor or not. If set tofalsethe SELECT_ALL value will be applied for all columns, otherwise the value will be only applied for columns that have a combobox filter editor configured.- Since:
- 2.2
-
getDataValueByPosition
Description copied from interface:ILayerReturns the data value for the cell at the given coordinates.- Specified by:
getDataValueByPositionin interfaceILayer- Overrides:
getDataValueByPositionin classCompositeLayer- Parameters:
compositeColumnPosition- The column position of the cell.compositeRowPosition- The row position of the cell.- Returns:
- The data value for the cell at the given coordinates.
-
getHeight
public int getHeight()Description copied from interface:ILayerReturns the total height in pixels of this layer.- Specified by:
getHeightin interfaceILayer- Overrides:
getHeightin classCompositeLayer- Returns:
- The total height in pixels of this layer.
-
getRowCount
public int getRowCount()- Specified by:
getRowCountin interfaceILayer- Overrides:
getRowCountin classCompositeLayer- Returns:
- The number of rows in this layer.
-
doCommand
Description copied from class:CompositeLayerOpportunity 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)Handle commands- Specified by:
doCommandin interfaceILayer- Overrides:
doCommandin classCompositeLayer- Parameters:
command- The command to execute.- Returns:
trueif the command has been handled and was therefore consumed,falseotherwise.
-
handleEvent
Description copied from interface:IFilterRowComboUpdateListenerHandles the update of the value cache of the FilterRowComboBoxDataProvider- Specified by:
handleEventin interfaceIFilterRowComboUpdateListener- Parameters:
event- The FilterRowComboUpdateEvent that should be handled
-
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
-