|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.widget.grid.filters.GridFilters
public class GridFilters
GridFilter is a plugin for grids that allow for a slightly more robust representation of filtering than what is provided by the default store.
Filtering is adjusted by the user using the grid's column header menu (this menu can be disabled through configuration). Through this menu users can configure, enable, and disable filters for each column.
| Nested Class Summary | |
|---|---|
static class |
GridFilters.GridFiltersMessages
|
| Field Summary | |
|---|---|
protected Grid<ModelData> |
grid
|
| Constructor Summary | |
|---|---|
GridFilters()
|
|
| Method Summary | |
|---|---|
void |
addFilter(Filter filter)
Adds the given filter. |
protected void |
bindStore(ListStore<ModelData> store,
boolean initial)
|
java.util.List<FilterConfig> |
buildQuery(java.util.List<Filter> filters)
Function to take the active filters data and build it into a query. |
void |
cleanParams(FilterPagingLoadConfig config)
Removes filter related query parameters from the provided object. |
void |
clearFilters()
Turns all filters off. |
Filter |
getFilter(java.lang.String dataIndex)
|
java.util.List<Filter> |
getFilterData()
Returns a list of the currently active filters. |
protected Filter |
getMenuFilter(MenuEvent me)
|
GridFilters.GridFiltersMessages |
getMessages()
|
protected StoreFilter<ModelData> |
getModelFilter()
|
int |
getUpdateBuffer()
Returns the number of milliseconds to defer store updates. |
void |
init(Component component)
Initializes the plugin when the component is created. |
boolean |
isAutoReload()
Returns true if auto load is enabled. |
boolean |
isLocal()
Returns true if local filtering is enabled. |
protected void |
onBeforeCheck(MenuEvent me)
|
protected void |
onBeforeLoad(LoadEvent le)
|
protected void |
onCheckChange(MenuEvent me)
|
protected void |
onContextMenu(GridEvent be)
|
protected void |
onLoad(LoadEvent le)
|
protected void |
onReconfigure()
|
protected void |
onStateChange(Filter filter)
|
protected void |
reload()
|
void |
removeAll()
Removes all filters. |
void |
removeFilter(Filter filter)
Removes the given filter. |
protected void |
saveState(Grid grid,
java.util.Map<java.lang.String,java.lang.Object> state)
|
void |
setAutoReload(boolean autoLoad)
Tree to reload the datasource when a filter change happens (defaults to true). |
void |
setLocal(boolean local)
True to use Store filter functions (local filtering) instead of the default server side filtering (defaults to false). |
void |
setMessages(GridFilters.GridFiltersMessages messages)
|
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Grid<ModelData> grid
| Constructor Detail |
|---|
public GridFilters()
| Method Detail |
|---|
public void addFilter(Filter filter)
filter - the filter to be addedpublic java.util.List<FilterConfig> buildQuery(java.util.List<Filter> filters)
filters - the active filters
public void cleanParams(FilterPagingLoadConfig config)
config - the load configpublic void clearFilters()
removeAll()).
public Filter getFilter(java.lang.String dataIndex)
public java.util.List<Filter> getFilterData()
public GridFilters.GridFiltersMessages getMessages()
public int getUpdateBuffer()
public void init(Component component)
ComponentPlugin
init in interface ComponentPlugincomponent - the source componentpublic boolean isAutoReload()
public boolean isLocal()
public void removeAll()
public void removeFilter(Filter filter)
filter - the filter to be removedpublic void setAutoReload(boolean autoLoad)
autoLoad - true to enable auto reloadpublic void setLocal(boolean local)
local - true for localpublic void setMessages(GridFilters.GridFiltersMessages messages)
public void setUpdateBuffer(int updateBuffer)
updateBuffer - the buffer in millisecondspublic void updateColumnHeadings()
protected void bindStore(ListStore<ModelData> store,
boolean initial)
protected Filter getMenuFilter(MenuEvent me)
protected StoreFilter<ModelData> getModelFilter()
protected void onBeforeCheck(MenuEvent me)
protected void onBeforeLoad(LoadEvent le)
protected void onCheckChange(MenuEvent me)
protected void onContextMenu(GridEvent be)
protected void onLoad(LoadEvent le)
protected void onReconfigure()
protected void onStateChange(Filter filter)
protected void reload()
protected void saveState(Grid grid,
java.util.Map<java.lang.String,java.lang.Object> state)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||