M
- the model typepublic class DateFilter<M> extends Filter<M,Date>
Filter
for more information.Modifier and Type | Class and Description |
---|---|
static interface |
DateFilter.DateFilterMessages
The locale-sensitive messages used by this class.
|
class |
DateFilter.DefaultDateFilterMessages
The default locale-sensitive messages used by this class.
|
Constructor and Description |
---|
DateFilter(ValueProvider<? super M,Date> valueProvider)
Creates a date filter for the specified value provider.
|
Modifier and Type | Method and Description |
---|---|
DateMenu |
getAfterMenu() |
DateMenu |
getBeforeMenu() |
List<FilterConfig> |
getFilterConfig()
Returns a list of filter configurations.
|
Date |
getMaxDate()
Returns the max date.
|
DateFilter.DateFilterMessages |
getMessages()
Returns the locale-sensitive messages used by this class.
|
Date |
getMinDate()
Returns the minimum date.
|
DateMenu |
getOnMenu() |
protected Class<Date> |
getType() |
Object |
getValue()
Template method to be implemented by all subclasses that is to get and return the value of the filter.
|
protected void |
handleCheckChange(CheckChangeEvent<CheckMenuItem> event) |
void |
handleMenuSelect(<any> event)
Handles the menu select event generated by the filter 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 |
setAfterDate(Date date)
Sets the after date.
|
void |
setBeforeDate(Date date)
Sets the before date.
|
void |
setFilterConfig(List<FilterConfig> configs)
Sets the filters values using the given filter configs.
|
void |
setMaxDate(Date maxDate)
Sets the max date as passed to the date picker.
|
void |
setMessages(DateFilter.DateFilterMessages messages)
Sets the local-sensitive messages used by this class.
|
void |
setMinDate(Date minDate)
Set's the minimum date as passed to the date picker.
|
void |
setOnDate(Date date)
Sets the on date.
|
void |
setValue(List<FilterConfig> values)
Sets the filter's values.
|
protected void |
updateMenuState(CheckMenuItem item,
boolean checked) |
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 DateFilter(ValueProvider<? super M,Date> valueProvider)
Filter.Filter(ValueProvider)
for more
information.valueProvider
- the value providerpublic DateMenu getAfterMenu()
public DateMenu getBeforeMenu()
public List<FilterConfig> getFilterConfig()
Filter
getFilterConfig
in class Filter<M,Date>
public Date getMaxDate()
public DateFilter.DateFilterMessages getMessages()
public Date getMinDate()
public DateMenu getOnMenu()
public Object getValue()
Filter
public void handleMenuSelect(<any> event)
event
- the menu select eventpublic boolean isActivatable()
Filter
true
if the filter has enough
configuration information to be activated.isActivatable
in class Filter<M,Date>
public void setAfterDate(Date date)
Filter.setActive(boolean, boolean)
must be called
when setting filter value programmatically.date
- the after datepublic void setBeforeDate(Date date)
Filter.setActive(boolean, boolean)
must be called
when setting filter value programmatically.date
- the before datepublic void setMaxDate(Date maxDate)
maxDate
- the max datepublic void setMessages(DateFilter.DateFilterMessages messages)
messages
- the locale sensitive messages used by this class.public void setMinDate(Date minDate)
minDate
- the minimum datepublic void setOnDate(Date date)
Filter.setActive(boolean, boolean)
must be called when
setting filter value programmatically.date
- the on datepublic void setValue(List<FilterConfig> values)
values
- the valuesprotected void handleCheckChange(CheckChangeEvent<CheckMenuItem> event)
protected void updateMenuState(CheckMenuItem item, boolean checked)
protected boolean validateModel(M model)
Filter
validateModel
in class Filter<M,Date>
model
- the modelpublic void setFilterConfig(List<FilterConfig> configs)
Filter
setFilterConfig
in class Filter<M,Date>
configs
- the list of filter configurationsCopyright © 2018. All rights reserved.