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

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.grid.filters.AbstractGridFilters<M>
All Implemented Interfaces:
ComponentPlugin<Grid<M>>
Direct Known Subclasses:
GridFilters

public abstract class AbstractGridFilters<M>
extends Object
implements ComponentPlugin<Grid<M>>


Nested Class Summary
 class AbstractGridFilters.DefaultGridFilterMessages
           
static interface AbstractGridFilters.GridFilterMessages
           
 
Constructor Summary
AbstractGridFilters()
           
AbstractGridFilters(Loader<FilterPagingLoadConfig,?> loader)
           
 
Method Summary
 void addFilter(Filter<M,?> filter)
          Adds a filter.
 List<FilterConfig> buildQuery(List<Filter<M,?>> filters)
           
 void cleanParams(FilterPagingLoadConfig config)
          Removes filter related query parameters from the provided object.
 void clearFilters()
          Turns all filters off.
 Filter<M,?> getFilter(String path)
          Returns the filter based on the value provider path.
 List<Filter<M,?>> getFilterData()
          Returns a list of the currently active filters.
 AbstractGridFilters.GridFilterMessages getMessages()
           
 void initPlugin(Grid<M> component)
          Initializes the plugin.
 boolean isAutoReload()
          Returns true if auto load is enabled.
 void removeAll()
          Removes all filters.
 void removeFilter(Filter<M,?> filter)
          Removes the given filter.
 void setAutoReload(boolean autoLoad)
          Tree to reload the datasource when a filter change happens (defaults to true).
 void setUpdateBuffer(int updateBuffer)
          Number of milliseconds to defer store updates since the last filter change (defaults to 500).
 void updateColumnHeadings()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGridFilters

public AbstractGridFilters()

AbstractGridFilters

public AbstractGridFilters(Loader<FilterPagingLoadConfig,?> loader)
Method Detail

addFilter

public void addFilter(Filter<M,?> filter)
Adds a filter.

Parameters:
filter - the filter

buildQuery

public List<FilterConfig> buildQuery(List<Filter<M,?>> filters)

cleanParams

public void cleanParams(FilterPagingLoadConfig config)
Removes filter related query parameters from the provided object.

Parameters:
config - the load config

clearFilters

public void clearFilters()
Turns all filters off. This does not clear the configuration information (see removeAll()).


getFilter

public Filter<M,?> getFilter(String path)
Returns the filter based on the value provider path.

Parameters:
path - the path
Returns:
the matching filter or null

getFilterData

public List<Filter<M,?>> getFilterData()
Returns a list of the currently active filters.

Returns:
the list of active filters

getMessages

public AbstractGridFilters.GridFilterMessages getMessages()

initPlugin

public void initPlugin(Grid<M> component)
Description copied from interface: ComponentPlugin
Initializes the plugin.

Specified by:
initPlugin in interface ComponentPlugin<Grid<M>>
Parameters:
component - the target component

isAutoReload

public boolean isAutoReload()
Returns true if auto load is enabled.

Returns:
the auto load state

removeAll

public void removeAll()
Removes all filters.


removeFilter

public void removeFilter(Filter<M,?> filter)
Removes the given filter.

Parameters:
filter - the filter to be removed

setAutoReload

public void setAutoReload(boolean autoLoad)
Tree to reload the datasource when a filter change happens (defaults to true). Set this to false to prevent the datastore from being reloaded if there are changes to the filters.

Parameters:
autoLoad - true to enable auto reload

setUpdateBuffer

public void setUpdateBuffer(int updateBuffer)
Number of milliseconds to defer store updates since the last filter change (defaults to 500).

Parameters:
updateBuffer - the buffer in milliseconds

updateColumnHeadings

public void updateColumnHeadings()


Copyright © 2012. All Rights Reserved.