public class ComboBoxFilterRowHeaderComposite<T> extends CompositeLayer implements IFilterRowComboUpdateListener
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.
CompositeLayer.CompositeLayerPainter
Modifier and Type | Field and 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.
|
protected ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> |
matcherEditor
The CompositeMatcherEditor that is used for filtering.
|
layerPainter
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor,
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.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.matchers.CompositeMatcherEditor<T> matcherEditor,
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.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,
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.
|
Modifier and Type | Method and 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 FilterRowComboBoxDataProvider
|
boolean |
isFilterRowVisible() |
void |
setAllValuesSelected()
Sets all values for all comboboxes as selected.
|
void |
setFilterRowVisible(boolean filterRowVisible)
Sets the visibility state of the filter row.
|
addConfigLabelAccumulatorForRegion, configure, dispose, doCommandOnChildLayers, getBoundsByPosition, getCellByPosition, getCellPainter, getChildLayerByLayoutCoordinate, getColumnCount, getColumnIndexByPosition, getColumnPositionByX, getColumnPositionOffset, getColumnWidthByPosition, getConfigLabelAccumulatorByRegionName, getConfigLabelsByPosition, getDataValueByPosition, getDisplayModeByPosition, getHeightOffset, getLayerPainter, getLayoutXByColumnPosition, getLayoutXByPixelX, getLayoutXYByChildLayer, getLayoutXYByPixelXY, getLayoutXYByPosition, getLayoutYByPixelY, getLayoutYByRowPosition, getPreferredColumnCount, getPreferredHeight, getPreferredRowCount, getPreferredWidth, getRegionLabelsByXY, getRowHeightByPosition, getRowIndexByPosition, getRowPositionByY, getRowPositionOffset, getStartXOfColumnPosition, getStartYOfRowPosition, getUnderlyingLayerByPosition, getUnderlyingLayersByColumnPosition, getUnderlyingLayersByRowPosition, getWidth, getWidthOffset, isColumnPositionResizable, isRowPositionResizable, loadState, localToUnderlyingColumnPosition, localToUnderlyingRowPosition, saveState, setChildLayer, setConfigLabelAccumulatorForRegion, underlyingToLocalColumnPosition, underlyingToLocalColumnPositions, underlyingToLocalRowPosition, underlyingToLocalRowPositions
addConfiguration, addLayerListener, clearConfiguration, fireLayerEvent, getClientAreaProvider, getConfigLabelAccumulator, getRegionName, handleLayerEvent, hasLayerListener, registerCommandHandler, registerCommandHandlers, registerEventHandler, registerPersistable, removeLayerListener, setClientAreaProvider, setConfigLabelAccumulator, setLayerPainter, setRegionName, toString, unregisterCommandHandler, unregisterPersistable
protected final FilterRowDataLayer<T> filterRowDataLayer
protected boolean filterRowVisible
protected final ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor
protected final FilterRowComboBoxDataProvider<T> comboBoxDataProvider
protected final ComboBoxGlazedListsFilterStrategy<T> filterStrategy
public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry)
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
needed to retrieve various configurations.public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry)
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
needed to retrieve various configurations.public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration)
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
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 ComboBoxFilterRowConfigurationpublic ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.FilterList<T> filterList, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration)
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
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 ComboBoxFilterRowConfigurationpublic ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry)
Note: Using this constructor implies that you added the given CompositeMatcherEditor to the FilterList this ComboBoxFilterRowHeaderComposite operates on yourself.
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
needed to retrieve various configurations.public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, ILayer bodyLayer, Collection<T> baseCollection, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration)
Note: Using this constructor implies that you added the given CompositeMatcherEditor to the FilterList this ComboBoxFilterRowHeaderComposite operates on yourself.
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
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 ComboBoxFilterRowConfigurationpublic ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry)
Note: Using this constructor implies that you added the given CompositeMatcherEditor to the FilterList this ComboBoxFilterRowHeaderComposite operates on yourself.
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
needed to retrieve various configurations.public ComboBoxFilterRowHeaderComposite(ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> matcherEditor, FilterRowComboBoxDataProvider<T> comboBoxDataProvider, IColumnAccessor<T> bodyDataColumnAccessor, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry, boolean useDefaultConfiguration)
Note: Using this constructor implies that you added the given CompositeMatcherEditor to the FilterList this ComboBoxFilterRowHeaderComposite operates on yourself.
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
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
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 ComboBoxFilterRowConfigurationpublic FilterRowDataLayer<T> getFilterRowDataLayer()
public ca.odell.glazedlists.matchers.CompositeMatcherEditor<T> getMatcherEditor()
public ComboBoxGlazedListsFilterStrategy<T> getFilterStrategy()
public FilterRowComboBoxDataProvider<T> getComboBoxDataProvider()
public boolean isFilterRowVisible()
true
if the filter row is visible, false
if not.public void setFilterRowVisible(boolean filterRowVisible)
filterRowVisible
- true
to set the filter row visible, false
to hide it.public void setAllValuesSelected()
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.
public int getHeight()
ILayer
getHeight
in interface ILayer
getHeight
in class CompositeLayer
public int getRowCount()
getRowCount
in interface ILayer
getRowCount
in class CompositeLayer
public boolean doCommand(ILayerCommand command)
CompositeLayer
ILayerCommand.convertToTargetLayer(ILayer)
Handle commandsdoCommand
in interface ILayer
doCommand
in class CompositeLayer
command
- the command to performpublic void handleEvent(FilterRowComboUpdateEvent event)
IFilterRowComboUpdateListener
handleEvent
in interface IFilterRowComboUpdateListener
event
- The FilterRowComboUpdateEvent that should be handledCopyright © 2013. All Rights Reserved.