com.extjs.gxt.ui.client.widget.grid.filters
Class DateFilter

java.lang.Object
  extended by com.extjs.gxt.ui.client.event.BaseObservable
      extended by com.extjs.gxt.ui.client.widget.grid.filters.Filter
          extended by com.extjs.gxt.ui.client.widget.grid.filters.DateFilter
All Implemented Interfaces:
Observable

public class DateFilter
extends Filter

Date filter type to displays a before, after, and on date picker.


Nested Class Summary
static class DateFilter.DateFilterMessages
           
 
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.grid.filters.Filter
Filter.FilterMessages
 
Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.widget.grid.filters.Filter
dataIndex, menu
 
Constructor Summary
DateFilter(java.lang.String dataIndex)
          Creates a new date filter.
 
Method Summary
 java.util.Date getMaxDate()
          Returns the max date.
 DateFilter.DateFilterMessages getMessages()
           
 java.util.Date getMinDate()
          Returns the minimum date.
 java.util.List<FilterConfig> getSerialArgs()
          Template method to be implemented by all subclasses that is to get and return serialized filter data for transmission to the server.
 java.lang.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.
protected  void onCheckChange(MenuEvent be)
           
protected  void onMenuSelect(MenuEvent be)
           
 void setMaxDate(java.util.Date maxDate)
          Sets the max date as passed to the date picker.
 void setMessages(Filter.FilterMessages messages)
           
 void setMinDate(java.util.Date minDate)
          Set's the minimum date as passed to the date picker.
 void setValue(java.lang.Object value)
          Template method to be implemented by all subclasses that is to set the value of the filter and fire the 'Update' event.
protected  void updateMenuState(Component item, boolean isChecked)
           
 boolean validateModel(ModelData model)
          Template method to be implemented by all subclasses that is to validates the provided Model against the filters configuration.
 
Methods inherited from class com.extjs.gxt.ui.client.widget.grid.filters.Filter
fireUpdate, getDataIndex, getMenu, getModelValue, getUpdateBuffer, isActive, serialize, setActive, setUpdateBuffer
 
Methods inherited from class com.extjs.gxt.ui.client.event.BaseObservable
addListener, callListener, fireEvent, fireEvent, getFiresEvents, getListeners, hasActiveEvent, hasListeners, hasListeners, removeAllListeners, removeListener, setFiresEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFilter

public DateFilter(java.lang.String dataIndex)
Creates a new date filter.

Parameters:
dataIndex - the date index the filter is mapped to
Method Detail

getMaxDate

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

Returns:
the max date

getMessages

public DateFilter.DateFilterMessages getMessages()
Overrides:
getMessages in class Filter

getMinDate

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

Returns:
the minimum date

getSerialArgs

public java.util.List<FilterConfig> getSerialArgs()
Description copied from class: Filter
Template method to be implemented by all subclasses that is to get and return serialized filter data for transmission to the server.

Specified by:
getSerialArgs in class Filter

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

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.

Overrides:
isActivatable in class Filter
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(Filter.FilterMessages messages)
Overrides:
setMessages in class Filter

setMinDate

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

Parameters:
minDate - the minimum date

setValue

public void setValue(java.lang.Object value)
Description copied from class: Filter
Template method to be implemented by all subclasses that is to set the value of the filter and fire the 'Update' event.

Specified by:
setValue in class Filter
Parameters:
value - the filter value

validateModel

public boolean validateModel(ModelData model)
Description copied from class: Filter
Template method to be implemented by all subclasses that is to validates the provided Model against the filters configuration. Defaults to return true.

Overrides:
validateModel in class Filter
Parameters:
model - the model
Returns:
true if valid

onCheckChange

protected void onCheckChange(MenuEvent be)

onMenuSelect

protected void onMenuSelect(MenuEvent be)

updateMenuState

protected void updateMenuState(Component item,
                               boolean isChecked)