M
- the model typeV
- the ListStore
typepublic class ListFilter<M,V> extends Filter<M,V>
Constructor and Description |
---|
ListFilter(ValueProvider<? super M,V> valueProvider,
ListStore<V> store)
Creates a list filter for the specified value provider, matching the items in the specified list store.
|
Modifier and Type | Method and Description |
---|---|
protected List<V> |
convertValuesFromString(String values) |
protected String |
convertValueToString() |
List<FilterConfig> |
getFilterConfig()
Returns a list of filter configurations.
|
ListStore<V> |
getStore()
Returns the list store.
|
protected Class<V> |
getType() |
Object |
getValue()
Template method to be implemented by all subclasses that is to get and return the value of the filter.
|
boolean |
isActivatable()
Template method to be implemented by all subclasses that is to return
true if the filter has enough
configuration information to be activated. |
boolean |
isUseStoreKeys()
Returns
true if store keys are being used. |
protected void |
onCheckChange(CheckChangeEvent<CheckMenuItem> event) |
void |
setFilterConfig(List<FilterConfig> configs)
Sets the filters values using the given filter configs.
|
void |
setUseStoreKeys(boolean useStoreKeys)
True to serialize values using the store key rather than toString on the model value (defaults to false).
|
void |
setValue(List<V> values)
Sets the value of this filter.
|
protected boolean |
validateModel(M model)
Template method to be implemented by all subclasses that is to validates the provided Model against the filters
configuration.
|
addActivateHandler, addDeactivateHandler, addUpdateHandler, createNewFilterConfig, fireUpdate, getHandler, getMenu, getUpdateBuffer, getValueProvider, isActive, setActive, setHandler, setUpdateBuffer
public ListFilter(ValueProvider<? super M,V> valueProvider, ListStore<V> store)
Filter.Filter(ValueProvider)
for more information.valueProvider
- the value providerstore
- contains the items to matchpublic List<FilterConfig> getFilterConfig()
Filter
getFilterConfig
in class Filter<M,V>
public Object getValue()
Filter
public boolean isActivatable()
Filter
true
if the filter has enough
configuration information to be activated.isActivatable
in class Filter<M,V>
public boolean isUseStoreKeys()
true
if store keys are being used.public void setFilterConfig(List<FilterConfig> configs)
Filter
setFilterConfig
in class Filter<M,V>
configs
- the list of filter configurationspublic void setUseStoreKeys(boolean useStoreKeys)
useStoreKeys
- true to use store keys, false to use model as a stringpublic void setValue(List<V> values)
Filter.setActive(boolean, boolean)
must be
called when setting filter value programmatically.values
- the valuesprotected String convertValueToString()
protected void onCheckChange(CheckChangeEvent<CheckMenuItem> event)
protected boolean validateModel(M model)
Filter
validateModel
in class Filter<M,V>
model
- the modelCopyright © 2018. All rights reserved.