com.sencha.gxt.widget.core.client.grid.filters
Class DateFilter<M>

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.grid.filters.Filter<M,java.util.Date>
      extended by com.sencha.gxt.widget.core.client.grid.filters.DateFilter<M>
Type Parameters:
M - the model type
All Implemented Interfaces:
ActivateEvent.HasActivateHandlers<Filter<M,?>>, DeactivateEvent.HasDeactivateHandlers<Filter<M,?>>, UpdateEvent.HasUpdateHandlers

public class DateFilter<M>
extends Filter<M,java.util.Date>

A date filter. See Filter for more information.


Nested Class Summary
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 Summary
DateFilter(ValueProvider<? super M,java.util.Date> valueProvider)
          Creates a date filter for the specified value provider.
 
Method Summary
 java.util.List<FilterConfig> getFilterConfig()
          Returns a list of filter configurations.
 java.util.Date getMaxDate()
          Returns the max date.
 DateFilter.DateFilterMessages getMessages()
          Returns the locale-sensitive messages used by this class.
 java.util.Date getMinDate()
          Returns the minimum date.
 java.lang.Object getValue()
          Template method to be implemented by all subclasses that is to get and return the value of the filter.
 void handleMenuSelect(ValueChangeEvent<java.util.Date> 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 setMaxDate(java.util.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(java.util.Date minDate)
          Set's the minimum date as passed to the date picker.
 
Methods inherited from class com.sencha.gxt.widget.core.client.grid.filters.Filter
addActivateHandler, addDeactivateHandler, addUpdateHandler, getHandler, getMenu, getUpdateBuffer, getValueProvider, isActive, setActive, setHandler, setUpdateBuffer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFilter

public DateFilter(ValueProvider<? super M,java.util.Date> valueProvider)
Creates a date filter for the specified value provider. See Filter.Filter(ValueProvider) for more information.

Parameters:
valueProvider - the value provider
Method Detail

getFilterConfig

public java.util.List<FilterConfig> getFilterConfig()
Description copied from class: Filter
Returns a list of filter configurations. Note that a filter may consist of multiple criteria (e.g. "date after" and "date before"). There is a filter configuration for each of these criteria.

Specified by:
getFilterConfig in class Filter<M,java.util.Date>
Returns:
a list of filter configurations

getMaxDate

public java.util.Date getMaxDate()
Returns the max date.

Returns:
the max date

getMessages

public DateFilter.DateFilterMessages getMessages()
Returns the locale-sensitive messages used by this class.

Returns:
the local-sensitive messages used by this class.

getMinDate

public java.util.Date getMinDate()
Returns the minimum date.

Returns:
the minimum date

getValue

public java.lang.Object getValue()
Description copied from class: Filter
Template method to be implemented by all subclasses that is to get and return the value of the filter.

Specified by:
getValue in class Filter<M,java.util.Date>

handleMenuSelect

public void handleMenuSelect(ValueChangeEvent<java.util.Date> event)
Handles the menu select event generated by the filter menu.

Parameters:
event - the menu select event

isActivatable

public boolean isActivatable()
Description copied from class: Filter
Template method to be implemented by all subclasses that is to return true if the filter has enough configuration information to be activated.

Returns:
true if if the filter has enough configuration information to be activated

setMaxDate

public void setMaxDate(java.util.Date maxDate)
Sets the max date as passed to the date picker.

Parameters:
maxDate - the max date

setMessages

public void setMessages(DateFilter.DateFilterMessages messages)
Sets the local-sensitive messages used by this class.

Parameters:
messages - the locale sensitive messages used by this class.

setMinDate

public void setMinDate(java.util.Date minDate)
Set's the minimum date as passed to the date picker.

Parameters:
minDate - the minimum date


Copyright © 2012. All Rights Reserved.