M
- the model in the store and in each grid rowV
- the numeric type in the column to filterpublic class NumericFilter<M,V extends Number> extends Filter<M,V>
double
before comparing, but this behavior can
be change by overriding equals(Number, Number)
and greaterThan(Number, Number)
. See Filter
for more information.Modifier and Type | Class and Description |
---|---|
class |
NumericFilter.DefaultNumericFilterMessages
The default locale-sensitive messages used by this class.
|
static interface |
NumericFilter.NumericFilterMessages
The locale-sensitive messages used by this class.
|
Constructor and Description |
---|
NumericFilter(ValueProvider<? super M,V> valueProvider,
NumberPropertyEditor<V> propertyEditor)
Creates a numeric filter for the specified value provider.
|
Modifier and Type | Method and Description |
---|---|
List<FilterConfig> |
getFilterConfig()
Returns a list of filter configurations.
|
NumericFilter.NumericFilterMessages |
getMessages()
Returns the locale-sensitive messages used by this class.
|
Object |
getValue()
Template method to be implemented by all subclasses that is to get and return the value of the filter.
|
int |
getWidth()
Returns the width used for the range sub-menu.
|
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. |
void |
setEqualValue(V value)
Sets the equal value.
|
void |
setFilterConfig(List<FilterConfig> configs)
Sets the filters values using the given filter configs.
|
void |
setGreaterThanValue(V value)
Sets the greater than value.
|
void |
setLessThanValue(V value)
Sets the less than value.
|
void |
setMessages(NumericFilter.NumericFilterMessages messages) |
void |
setValue(List<FilterConfig> values) |
void |
setWidth(int width)
Sets the width to use for the range sub-menu (defaults to 125).
|
addActivateHandler, addDeactivateHandler, addUpdateHandler, getHandler, getMenu, getUpdateBuffer, getValueProvider, isActive, setActive, setHandler, setUpdateBuffer
public NumericFilter(ValueProvider<? super M,V> valueProvider, NumberPropertyEditor<V> propertyEditor)
Filter.Filter(ValueProvider)
for more
information.valueProvider
- the value providerpropertyEditor
- property editor for numeric type <V>
public void setLessThanValue(V value)
value
- the valuepublic void setGreaterThanValue(V value)
value
- the valuepublic void setEqualValue(V value)
value
- the equal valuepublic void setValue(List<FilterConfig> values)
public List<FilterConfig> getFilterConfig()
Filter
getFilterConfig
in class Filter<M,V extends Number>
public NumericFilter.NumericFilterMessages getMessages()
public Object getValue()
Filter
public int getWidth()
public boolean isActivatable()
Filter
true
if the filter has enough
configuration information to be activated.public void setMessages(NumericFilter.NumericFilterMessages messages)
public void setWidth(int width)
width
- the width used for the range sub-menu.public void setFilterConfig(List<FilterConfig> configs)
Filter
setFilterConfig
in class Filter<M,V extends Number>
configs
- the list of filter configurationsCopyright © 2015. All rights reserved.