Class ComboBoxFilterRowHeaderComposite<T>
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
-
- org.eclipse.nebula.widgets.nattable.layer.CompositeLayer
-
- org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.ComboBoxFilterRowHeaderComposite<T>
-
- All Implemented Interfaces:
IFilterRowComboUpdateListener
,ILayer
,ILayerListener
,IPersistable
public class ComboBoxFilterRowHeaderComposite<T> extends CompositeLayer implements IFilterRowComboUpdateListener
CompositeLayer that is build out of the columnheader layer stack and a filter row layer. The column header layer stack needs to be provided at creation time while the filter row layer is created in here.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
Fields Modifier and Type Field Description protected FilterRowComboBoxDataProvider<T>
comboBoxDataProvider
The IComboBoxDataProvider that is used to fill the filter row comboboxes.protected FilterRowDataLayer<T>
filterRowDataLayer
The FilterRowDataLayer which serves as the filter row layer.protected boolean
filterRowVisible
Flag that allows to set the filter row visible or invisible.protected ComboBoxGlazedListsFilterStrategy<T>
filterStrategy
The IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.-
Fields inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
commandHandlers, eventHandlers, eventHelperLock, layerPainter
-
Fields inherited from interface org.eclipse.nebula.widgets.nattable.persistence.IPersistable
DOT, VALUE_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description 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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doCommand(ILayerCommand command)
Opportunity to respond to a command as it flows down the stack.FilterRowComboBoxDataProvider<T>
getComboBoxDataProvider()
FilterRowDataLayer<T>
getFilterRowDataLayer()
ComboBoxGlazedListsFilterStrategy<T>
getFilterStrategy()
Returns the IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.int
getHeight()
Returns the total height in pixels of this layer.ca.odell.glazedlists.matchers.CompositeMatcherEditor<T>
getMatcherEditor()
int
getRowCount()
void
handleEvent(FilterRowComboUpdateEvent event)
Handles the update of the value cache of the FilterRowComboBoxDataProviderboolean
isFilterRowVisible()
void
loadState(String prefix, Properties properties)
Restore the state out of the given Properties identified by the specified prefix.void
setAllValuesSelected()
Sets all values for all comboboxes as selected.void
setFilterRowVisible(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, getDataValueByPosition, 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, saveState, setChildLayer, setConfigLabelAccumulatorForRegion, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions
-
Methods inherited from class org.eclipse.nebula.widgets.nattable.layer.AbstractLayer
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getClientAreaProvider, getConfigLabelAccumulator, getLayerPainter, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setClientAreaProvider, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterEventHandler, unregisterPersistable
-
-
-
-
Field Detail
-
filterRowDataLayer
protected final FilterRowDataLayer<T> filterRowDataLayer
The FilterRowDataLayer which serves as the filter row layer.
-
filterRowVisible
protected boolean filterRowVisible
Flag that allows to set the filter row visible or invisible.
-
comboBoxDataProvider
protected final FilterRowComboBoxDataProvider<T> comboBoxDataProvider
The IComboBoxDataProvider that is used to fill the filter row comboboxes.
-
filterStrategy
protected final ComboBoxGlazedListsFilterStrategy<T> filterStrategy
The IFilterStrategy that is used by this ComboBoxFilterRowHeaderComposite.
-
-
Constructor Detail
-
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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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 istrue
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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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 istrue
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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
- TheIDataProvider
of the column header needed to retrieve the real column count of the column header and not a transformed one.configRegistry
- TheIConfigRegistry
needed 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
-
-
Method Detail
-
loadState
public void loadState(String prefix, Properties properties)
Description copied from interface:IPersistable
Restore 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:
loadState
in interfaceIPersistable
- Overrides:
loadState
in 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
public FilterRowDataLayer<T> getFilterRowDataLayer()
- Returns:
- The FilterRowDataLayer which serves as the filter row layer.
-
getMatcherEditor
public ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> 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
public ComboBoxGlazedListsFilterStrategy<T> 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
public FilterRowComboBoxDataProvider<T> getComboBoxDataProvider()
- Returns:
- The IComboBoxDataProvider that is used to fill the filter row comboboxes.
-
isFilterRowVisible
public boolean isFilterRowVisible()
- Returns:
true
if the filter row is visible,false
if not.
-
setFilterRowVisible
public void setFilterRowVisible(boolean filterRowVisible)
Sets the visibility state of the filter row.- Parameters:
filterRowVisible
-true
to set the filter row visible,false
to 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.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.
-
getHeight
public int getHeight()
Description copied from interface:ILayer
Returns the total height in pixels of this layer.- Specified by:
getHeight
in interfaceILayer
- Overrides:
getHeight
in classCompositeLayer
- Returns:
- The total height in pixels of this layer.
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceILayer
- Overrides:
getRowCount
in classCompositeLayer
- Returns:
- The number of rows in this layer.
-
doCommand
public boolean doCommand(ILayerCommand command)
Description copied from class:CompositeLayer
Opportunity 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:
doCommand
in interfaceILayer
- Overrides:
doCommand
in classCompositeLayer
- Parameters:
command
- The command to execute.- Returns:
true
if the command has been handled and was therefore consumed,false
otherwise.
-
handleEvent
public void handleEvent(FilterRowComboUpdateEvent event)
Description copied from interface:IFilterRowComboUpdateListener
Handles the update of the value cache of the FilterRowComboBoxDataProvider- Specified by:
handleEvent
in interfaceIFilterRowComboUpdateListener
- Parameters:
event
- The FilterRowComboUpdateEvent that should be handled
-
-