|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.table.AbstractTableModel com.jidesoft.grid.AbstractPageTableModel com.jidesoft.grid.AdvancePageTableModel
public abstract class AdvancePageTableModel
AdvancedPageTableModel
extends AbstractPageTableModel
and provides more advanced features
such as sorting and filtering. However it doesn't implement it by leaving it to the subclass. For example, if you are
using Hibernate, you can ask Hibernate to do the filtering or sorting for you. Or if you have a business logic layer
in your application, you can handle it in the business logic layer. All other logic is implemented in this class and
you only need to implement refreshData(SortItemSupport, FilterItemSupport, int, int)
method to provide the
content for the current page.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jidesoft.grid.ISortableTableModel |
---|
ISortableTableModel.SortItem |
Nested classes/interfaces inherited from interface com.jidesoft.grid.IFilterableTableModel |
---|
IFilterableTableModel.FilterItem |
Nested classes/interfaces inherited from interface com.jidesoft.grid.AutoFilterTableHeaderAdapter |
---|
AutoFilterTableHeaderAdapter.FilterTitleFormatter |
Field Summary | |
---|---|
protected FilterItemSupport |
_filterItemSupport
|
protected SortItemSupport |
_sortItemSupport
|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Fields inherited from interface com.jidesoft.grid.ISortableTableModel |
---|
SORT_PRIORITY_FIFO, SORT_PRIORITY_FILO |
Fields inherited from interface com.jidesoft.grid.IFilterableTableModel |
---|
ALL_COLUMNS, ANY_COLUMNS, IDENTIFIER_ALL_COLUMNS, IDENTIFIER_ANY_COLUMNS |
Fields inherited from interface com.jidesoft.grid.MultiTableModel |
---|
FOOTER_COLUMN, HEADER_COLUMN, REGULAR_COLUMN |
Constructor Summary | |
---|---|
|
AdvancePageTableModel()
|
protected |
AdvancePageTableModel(int pageSize)
|
Method Summary | |
---|---|
void |
addFilter(Filter filter)
Adds a filter to all columns. |
void |
addFilter(IFilterableTableModel.FilterItem filterItem)
Adds a FilterItem. |
void |
addFilter(int column,
Filter filter)
Adds a filter to the specified column. |
void |
addFilterableTableModelListener(FilterableTableModelListener l)
Adds a listener to the list that's notified each time a change to the filter occurs. |
void |
addSortListener(SortListener l)
Adds the specified listener to receive SortEvents pane events from this SortableTableModel. |
void |
clearFilters()
Removes all filters from all columns. |
void |
fireFilterAdded(int column,
Filter filter)
|
void |
fireFilterChanged(FilterableTableModelEvent e)
Forwards the given notification event to all FilterableTableModelListeners that registered
themselves as listeners for this table model. |
void |
fireFilterRemoved(int column,
Filter filter)
|
void |
fireSortEvent()
Fires sort event. |
void |
fireSortingEvent()
Fires sort event. |
int |
getActualRowAt(int row)
Gets the actual row. |
Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
String |
getColumnName(int column)
|
int |
getColumnSortRank(int column)
In the case of sort by multiple columns, this method will return the rank of this column within all sorted columns. |
TableModel |
getCurrentPageModel()
|
DynamicTableFilter[] |
getDynamicTableFilters(int modelIndex)
Gets all the DynamicTableFilter s. |
FilterableTableModelListener[] |
getFilterableTableModelListeners()
Returns an array of all the FilterableTableModel listeners registered on this filter. |
Icon |
getFilterIcon(int column)
Gets the filter icon for a particular column. |
List<IFilterableTableModel.FilterItem> |
getFilterItems()
Gets all the FilterItems added to this FilterableTableModel. |
Filter[] |
getFilters(int column)
Gets the filters for the specified column. |
AutoFilterTableHeaderAdapter.FilterTitleFormatter |
getFilterTitleFormatter(int column)
Gets the formatter that will format the title for the AutoFilterTableHeader. |
ListCellRenderer |
getListCellRenderer(int column)
Gets the list cell renderer for the drop down filter list. |
int[] |
getMasterSortColumns()
Gets the master sort columns. |
int |
getMaximumSortColumns()
Gets the maximum columns can be sorted at once. |
Object[] |
getPossibleValues(int columnIndex,
Comparator comparator)
Gets all possible values of the table model. |
Object[] |
getPossibleValuesAndConverters(int columnIndex,
Comparator comparator)
|
int |
getSortedRowAt(int actualRow)
Gets the visual row. |
List<ISortableTableModel.SortItem> |
getSortingColumns()
Gets the sorting columns. |
SortListener[] |
getSortListeners()
Returns an array of all the SortListener s added to this SortableTableModel with
addSortListener . |
int |
getSortPriority()
Gets the sort priority. |
StringConverter |
getTitleConverter(int column)
Gets the title converter to convert the column name. |
int |
getTotalRecordCount()
Gets the total record/row count. |
Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
hasFilter()
Checks if the FilterableTableModel has any filters. |
boolean |
hasFilter(int columnIndex)
Checks if the FilterableTableModel has any filters on the specified column. |
boolean |
isAdjusting()
Checks if the FilterableTableModel is adjusting. |
boolean |
isAllowCustomFilter(int column)
Checks if the AutoFilterTableHeader allows custom filter. |
boolean |
isAllowMultipleValues(int column)
Checks if the AutoFilterTableHeader allows multiple values as the filter for the column index. |
boolean |
isAndMode()
Sets the logic of filters on the same column. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isColumnAscending(int column)
Checks if the column is sorted ascendingly. |
boolean |
isColumnAutoFilterable(int column)
Checks if the column is auto-filterable. |
boolean |
isColumnFilterable(int column)
Checks if the column is filterable for the filters that are added to IFilterableTableModel.ALL_COLUMNS . |
boolean |
isColumnSortable(int column)
Check if a certain column is sortable. |
boolean |
isColumnSorted(int column)
Checks if the column is sorted. |
boolean |
isColumnVisible(int column)
Checks if the column is visible. |
boolean |
isFilteringPaused()
Checks if the filtering is paused. |
boolean |
isFiltersApplied()
Checks if the filters are in effect. |
boolean |
isMultiColumnSortable()
Does this table allow sort by multiple columns. |
boolean |
isSameConverterAt(int columnIndex)
Check if each converter in this column for each row is the same. |
boolean |
isSortable()
Checks if the sortable table model is sortable. |
boolean |
isUseTableCellRenderer(int column)
Checks if the table cell renderer will be used for the list. |
boolean |
isValuePredetermined(int column)
Checks if the column is type-filterable. |
protected void |
pageCountChanged(int oldPageCount,
int newPageCount)
|
protected void |
pageIndexChanged(int oldPageIndex,
int newPageIndex)
|
void |
refresh()
Reapply all filters after they are changed. |
abstract void |
refreshData(SortItemSupport sortItemSupport,
FilterItemSupport filterItemSupport,
int currentPage,
int pageSize)
Submits the query. |
void |
removeAllFilters()
Removes all filters that are added using IFilterableTableModel.addFilter(Filter) . |
void |
removeAllFilters(int column)
Removes all filters from the specified column. |
void |
removeFilter(Filter filter)
Removes the filter from all columns. |
void |
removeFilter(IFilterableTableModel.FilterItem filterItem)
Removes the filter item. |
void |
removeFilter(int column,
Filter filter)
Removes the filter from the specified column. |
void |
removeFilterableTableModelListener(FilterableTableModelListener l)
Removes a listener from the list that's notified each time a change to the filter occurs. |
void |
removeSortListener(SortListener l)
Removes the specified SortListener so that it no longer receives SortEvents from this SortableTableModel . |
void |
reset()
Resets. |
void |
resort()
Resort the table. |
void |
reverseColumnSortOrder(int column)
Reverses the sort order of the column. |
void |
setAdjusting(boolean adjusting)
Sets the FilterableTableModel to adjusting mode. |
void |
setAndMode(boolean andMode)
Sets the logic among the filters. |
void |
setColumnSortable(int column,
boolean sortable)
Sets a column sortable or not sortable. |
void |
setCurrentPageModel(TableModel model)
|
void |
setFilteringPaused(boolean pause)
If filtering is paused, keep rows in same relative positions Inserts/Deletes shift rows without re-ordering |
void |
setFiltersApplied(boolean apply)
Applies or unapplies the filters. |
void |
setMasterSortColumns(int[] masterSortColumns)
Sets the master sort column. |
void |
setMaximumSortColumns(int maximumSortColumns)
Set the maximum number of columns that can be sorted at once. |
void |
setMultiColumnSortable(boolean multiColumnSortable)
Set the value if this table allows sort by multiple columns. |
void |
setSortable(boolean sortable)
Sets the table model sortable. |
void |
setSortingColumns(List<ISortableTableModel.SortItem> list)
Sets the soring columns. |
void |
setSortPriority(int sortPriority)
Sets the sort priority. |
void |
setTotalRecordCount(int totalRecordCount)
Sets the total record/row count. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
|
protected void |
sort()
|
void |
sortColumn(int column)
Sort the column, equals to sortColumn(column, false). |
void |
sortColumn(int column,
boolean reset)
If reset is true, it will remove all existing sort-by columns and only sorts by column . |
void |
sortColumn(int column,
boolean reset,
boolean ascending)
Sorts a column. |
void |
toggleSortOrder(int column,
boolean extend)
Toggles the sort order on the specified column. |
void |
unsortColumn(int column)
Unsorts the column. |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, getRowCount, removeTableModelListener |
Field Detail |
---|
protected SortItemSupport _sortItemSupport
protected FilterItemSupport _filterItemSupport
Constructor Detail |
---|
public AdvancePageTableModel()
protected AdvancePageTableModel(int pageSize)
Method Detail |
---|
protected void pageCountChanged(int oldPageCount, int newPageCount)
pageCountChanged
in class AbstractPageTableModel
protected void pageIndexChanged(int oldPageIndex, int newPageIndex)
pageIndexChanged
in class AbstractPageTableModel
public void setTotalRecordCount(int totalRecordCount)
PageNavigationSupport
setTotalRecordCount
in interface PageNavigationSupport
totalRecordCount
- the new total row count.public int getTotalRecordCount()
PageNavigationSupport
getTotalRecordCount
in interface PageNavigationSupport
public int getColumnCount()
getColumnCount
in interface TableModel
public Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
public void setValueAt(Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface TableModel
setValueAt
in class AbstractTableModel
public Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
public int getSortedRowAt(int actualRow)
ISortableTableModel
getSortedRowAt
in interface ISortableTableModel
actualRow
- the actual row in actual model.
public int getActualRowAt(int row)
ISortableTableModel
getActualRowAt
in interface ISortableTableModel
row
- the row on the UI.
public void sortColumn(int column)
ISortableTableModel
sortColumn
in interface ISortableTableModel
column
- column to be sortedpublic void sortColumn(int column, boolean reset)
ISortableTableModel
column
. If reset is
false, it will keep existing sort-by columns and add the column
as a new sort-by column.
sortColumn
in interface ISortableTableModel
column
- the column index.reset
- true to reset all existing sorting columns before sorting the new column.public void unsortColumn(int column)
ISortableTableModel
unsortColumn
in interface ISortableTableModel
column
- column to be removed from sort-by columnspublic void reverseColumnSortOrder(int column)
ISortableTableModel
reverseColumnSortOrder
in interface ISortableTableModel
column
- the column index.public void sortColumn(int column, boolean reset, boolean ascending)
ISortableTableModel
sortColumn
in interface ISortableTableModel
column
- the column index.reset
- true to reset all existing sorting columns before sorting the new column.ascending
- true to sort ascending. False to sort descending.public boolean isColumnSorted(int column)
ISortableTableModel
isColumnSorted
in interface ISortableTableModel
column
- the column index.
public boolean isColumnAscending(int column)
ISortableTableModel
isColumnAscending
in interface ISortableTableModel
column
- the column index.
public void reset()
ISortableTableModel
reset
in interface ISortableTableModel
public void toggleSortOrder(int column, boolean extend)
ISortableTableModel
toggleSortOrder
in interface ISortableTableModel
column
- the column index.extend
- if true, extend the current sort to add more sorted columns.public List<ISortableTableModel.SortItem> getSortingColumns()
ISortableTableModel
getSortingColumns
in interface ISortableTableModel
public void setSortingColumns(List<ISortableTableModel.SortItem> list)
ISortableTableModel
setSortingColumns
in interface ISortableTableModel
list
- a list of SortItems.public int getColumnSortRank(int column)
ISortableTableModel
getColumnSortRank
in interface ISortableTableModel
column
- the column index.
public void setMasterSortColumns(int[] masterSortColumns)
ISortableTableModel
setMasterSortColumns
in interface ISortableTableModel
masterSortColumns
- the new master sort columns.public int[] getMasterSortColumns()
ISortableTableModel
getMasterSortColumns
in interface ISortableTableModel
public boolean isMultiColumnSortable()
ISortableTableModel
isMultiColumnSortable
in interface ISortableTableModel
public void setMultiColumnSortable(boolean multiColumnSortable)
ISortableTableModel
setMultiColumnSortable
in interface ISortableTableModel
multiColumnSortable
- pass in true if this you want this table allows sort by multiple columnspublic boolean isSortable()
ISortableTableModel
isSortable
in interface ISortableTableModel
public void setSortable(boolean sortable)
ISortableTableModel
ISortableTableModel.toggleSortOrder(int,boolean)
will have no
effect.
setSortable
in interface ISortableTableModel
sortable
- true or false.public void resort()
ISortableTableModel
resort
in interface ISortableTableModel
public int getSortPriority()
ISortableTableModel
getSortPriority
in interface ISortableTableModel
ISortableTableModel.SORT_PRIORITY_FILO
(the default) or
ISortableTableModel.SORT_PRIORITY_FIFO
.public void setSortPriority(int sortPriority)
ISortableTableModel
setSortPriority
in interface ISortableTableModel
sortPriority
- must be one the following value: SORT_PRIORITY_FILO (the default), or SORT_PRIORITY_FIFOpublic int getMaximumSortColumns()
ISortableTableModel
ISortableTableModel.getSortPriority()
, the behavior is different. If sort priority is FILO,
nothing will happen when user tries to sort one column. If FIFO, it will push the column with the largest sort
rank out.
getMaximumSortColumns
in interface ISortableTableModel
public void setMaximumSortColumns(int maximumSortColumns)
ISortableTableModel
setMaximumSortColumns
in interface ISortableTableModel
maximumSortColumns
- the maximum number of columns that can be sorted at once.public void addSortListener(SortListener l)
addSortListener
in interface ISortableTableModel
l
- the SortListenerpublic void removeSortListener(SortListener l)
removeSortListener
in interface ISortableTableModel
l
- the SortableTableModel listenerpublic SortListener[] getSortListeners()
SortListener
s added to this SortableTableModel
with
addSortListener
.
getSortListeners
in interface ISortableTableModel
SortListener
s added or an empty array if no listeners have been addedaddSortListener(com.jidesoft.grid.SortListener)
public void fireSortEvent()
public void fireSortingEvent()
public boolean isColumnSortable(int column)
isColumnSortable
in interface ISortableTableModel
column
- the column index.
setColumnSortable(int, boolean)
public void setColumnSortable(int column, boolean sortable)
setColumnSortable
in interface ISortableTableModel
column
- the column index.sortable
- true to make the column sortable.protected void sort()
public void refresh()
IFilterableTableModel
refresh
in interface IFilterableTableModel
public boolean isColumnFilterable(int column)
IFilterableTableModel
IFilterableTableModel.ALL_COLUMNS
. The column will be
excluded if it returns false (same as IFilterableTableModel.isColumnVisible(int)
in this case. There is also AutoFilterTableHeaderAdapter.isColumnAutoFilterable(int)
which is used for AutoFilterHeader
to control if the filter button is
visible.
isColumnFilterable
in interface IFilterableTableModel
column
- the column index.
public boolean isColumnVisible(int column)
IFilterableTableModel
isColumnVisible
in interface IFilterableTableModel
column
- the column index.
public boolean isColumnAutoFilterable(int column)
AutoFilterTableHeaderAdapter
AutoFilterHeader
. If it
returns false, we will not show the filter button on the header for that column.
isColumnAutoFilterable
in interface AutoFilterTableHeaderAdapter
column
- the column index.
public boolean isValuePredetermined(int column)
AutoFilterTableHeaderAdapter
AutoFilterHeader
at multiple
line mode. If it returns false, we will not show the filter field on the header for that column.
isValuePredetermined
in interface AutoFilterTableHeaderAdapter
column
- the column index.
public void addFilter(int column, Filter filter)
IFilterableTableModel
addFilter
in interface IFilterableTableModel
column
- the column index. It could also be two special values - IFilterableTableModel.ALL_COLUMNS
or IFilterableTableModel.ANY_COLUMNS
. If the value is IFilterableTableModel.ANY_COLUMNS
, this method will be the same as IFilterableTableModel.addFilter(Filter)
.filter
- the filter to be added.public void addFilter(Filter filter)
IFilterableTableModel
You
can use AbstractFilter
to create new filter. If you need the row index or column index in order to decide
if the value should be filtered, you can use AbstractTableFilter
and use getRowIndex() and
getColumnInde() to find out current row or column index.
addFilter
in interface IFilterableTableModel
filter
- the filter to be added.public void addFilter(IFilterableTableModel.FilterItem filterItem)
IFilterableTableModel
addFilter
in interface IFilterableTableModel
filterItem
- the FilterItempublic void removeFilter(int column, Filter filter)
IFilterableTableModel
IFilterableTableModel.addFilter(int, Filter)
.
Please note, removeFilter will not change the FilterableTableModel data right away. You still need to call
setFiltersApplied(true) to apply the filter. The reason is to give developers a chance to add/remove multiple
filters and only updates the data once at the end.
removeFilter
in interface IFilterableTableModel
column
- the column index. It could also be two special values - IFilterableTableModel.ALL_COLUMNS
or IFilterableTableModel.ANY_COLUMNS
. If the value is IFilterableTableModel.ANY_COLUMNS
, this method will be the same as IFilterableTableModel.removeFilter(Filter)
.filter
- the filter to be removed.public void removeFilter(Filter filter)
IFilterableTableModel
IFilterableTableModel.addFilter(Filter)
.
Please note, removeFilter will not change the FilterableTableModel data right away. You still need to call
setFiltersApplied(true) to apply the filter. The reason is to give developers a chance to add/remove multiple
filters and only updates the data once at the end.
removeFilter
in interface IFilterableTableModel
filter
- the filter to be removed.public void removeFilter(IFilterableTableModel.FilterItem filterItem)
IFilterableTableModel
removeFilter
in interface IFilterableTableModel
filterItem
- the FilterItem to be removed.public void removeAllFilters(int column)
IFilterableTableModel
IFilterableTableModel.addFilter(int, Filter)
.
Please note, removeAllFilters will not change the FilterableTableModel data right away. You still need to call
setFiltersApplied(true) to apply the filter. The reason is to give developers a chance to add/remove multiple
filters and only updates the data once at the end.
removeAllFilters
in interface IFilterableTableModel
column
- the column index where all filters for that column should be removed.public void removeAllFilters()
IFilterableTableModel
IFilterableTableModel.addFilter(Filter)
. If you want to remove all filters that
either added using IFilterableTableModel.addFilter(int, Filter)
or IFilterableTableModel.addFilter(Filter)
, you should use IFilterableTableModel.clearFilters()
.
Please note, removeAllFilters will not change the FilterableTableModel data right away. You still need to call
setFiltersApplied(true) to apply the filter. The reason is to give developers a chance to add/remove multiple
filters and only updates the data once at the end.
removeAllFilters
in interface IFilterableTableModel
public void clearFilters()
IFilterableTableModel
clearFilters
in interface IFilterableTableModel
public Filter[] getFilters(int column)
IFilterableTableModel
getFilters
in interface IFilterableTableModel
column
- the column index.
public List<IFilterableTableModel.FilterItem> getFilterItems()
IFilterableTableModel
getFilterItems
in interface IFilterableTableModel
public void setFiltersApplied(boolean apply)
IFilterableTableModel
setFiltersApplied
in interface IFilterableTableModel
apply
- true to apply the filters.public boolean isFiltersApplied()
IFilterableTableModel
isFiltersApplied
in interface IFilterableTableModel
public boolean hasFilter()
IFilterableTableModel
FilterableTableModel
has any filters.
hasFilter
in interface IFilterableTableModel
public boolean hasFilter(int columnIndex)
IFilterableTableModel
FilterableTableModel
has any filters on the specified column.
hasFilter
in interface IFilterableTableModel
columnIndex
- the column index to check if there is a filter on it.
public boolean isAndMode()
IFilterableTableModel
IFilterableTableModel.ALL_COLUMNS
and IFilterableTableModel.ANY_COLUMNS
.
isAndMode
in interface IFilterableTableModel
public void setAndMode(boolean andMode)
IFilterableTableModel
FitlerableTableModel
. In order to do more complex
expression, you would need multiple FilterableTableModel
, one wraps the other. You make filters in
each FilterableTableModel
to be OR logic, then the logic among the pipe of
FilterableTableModel
s will always be AND logic.
setAndMode
in interface IFilterableTableModel
andMode
- true or false.public boolean isAdjusting()
isAdjusting
in interface IFilterableTableModel
public void setAdjusting(boolean adjusting)
setAdjusting
in interface IFilterableTableModel
adjusting
- true or false.public Object[] getPossibleValues(int columnIndex, Comparator comparator)
IFilterableTableModel
AutoFilterTableHeader
to populate the drop down filter list.
getPossibleValues
in interface IFilterableTableModel
columnIndex
- the column index.comparator
- the comparator. It is used to sort the values.
public Object[] getPossibleValuesAndConverters(int columnIndex, Comparator comparator)
getPossibleValuesAndConverters
in interface IFilterableTableModel
public boolean isSameConverterAt(int columnIndex)
IFilterableTableModel
isSameConverterAt
in interface IFilterableTableModel
columnIndex
- the column index
public void setFilteringPaused(boolean pause)
IFilterableTableModel
setFilteringPaused
in interface IFilterableTableModel
pause
- TRUE = Filtering is Paused; FALSE = Filtering is Activepublic boolean isFilteringPaused()
IFilterableTableModel
isFilteringPaused
in interface IFilterableTableModel
public void addFilterableTableModelListener(FilterableTableModelListener l)
addFilterableTableModelListener
in interface IFilterableTableModel
l
- the FilterableTableModelListenerpublic void removeFilterableTableModelListener(FilterableTableModelListener l)
removeFilterableTableModelListener
in interface IFilterableTableModel
l
- the FilterableTableModelListenerpublic FilterableTableModelListener[] getFilterableTableModelListeners()
getFilterableTableModelListeners
in interface IFilterableTableModel
FilterableTableModelListener
s or an empty array if no filter listeners
are currently registeredaddFilterableTableModelListener(com.jidesoft.grid.FilterableTableModelListener)
,
removeFilterableTableModelListener(com.jidesoft.grid.FilterableTableModelListener)
public void fireFilterChanged(FilterableTableModelEvent e)
FilterableTableModelListeners
that registered
themselves as listeners for this table model.
e
- the event to be forwardedaddFilterableTableModelListener(com.jidesoft.grid.FilterableTableModelListener)
,
FilterableTableModelEvent
,
EventListenerList
public void fireFilterAdded(int column, Filter filter)
public void fireFilterRemoved(int column, Filter filter)
public Icon getFilterIcon(int column)
getFilterIcon
in interface IFilterableTableModel
column
- the column index.
public TableModel getCurrentPageModel()
public void setCurrentPageModel(TableModel model)
public abstract void refreshData(SortItemSupport sortItemSupport, FilterItemSupport filterItemSupport, int currentPage, int pageSize)
setCurrentPageModel(javax.swing.table.TableModel)
.
sortItemSupport
- the information for sort items.filterItemSupport
- the information for filter items.currentPage
- the current page.pageSize
- the page size.public DynamicTableFilter[] getDynamicTableFilters(int modelIndex)
AutoFilterTableHeaderAdapter
DynamicTableFilter
s.
DynamicTableFilter
allows to add your own customize filter to the drop down filter list. Any
DynamicTableFilter
will become an entry in the list. If user clicks on that entry, the filter will
be used to filter the column. What's special about DynamicTableFilter
is it allows to to create a
filter on fly. For example, in initializeFilter method of DynamicTableFilter, you can pop up a dialog to allow
user to select certain information and you return a filter based on user selection. If returning null, no filter
will be added. If not null, the filter you just created will be added to the IFilterableTableModel
.
getDynamicTableFilters
in interface AutoFilterTableHeaderAdapter
modelIndex
- the column in the model to add the DynamicTableFilter
DynamicTableFilter
s.public boolean isAllowMultipleValues(int column)
AutoFilterTableHeaderAdapter
AutoFilterTableHeader
allows multiple values as the filter for the column index. The
difference will be to use a CheckBoxList or a regular JList as the popup panel when clicking on the filter button.
isAllowMultipleValues
in interface AutoFilterTableHeaderAdapter
column
- the column index.
public StringConverter getTitleConverter(int column)
AutoFilterTableHeaderAdapter
getTitleConverter
in interface AutoFilterTableHeaderAdapter
column
- the column index
public AutoFilterTableHeaderAdapter.FilterTitleFormatter getFilterTitleFormatter(int column)
AutoFilterTableHeaderAdapter
getFilterTitleFormatter
in interface AutoFilterTableHeaderAdapter
column
- the column index
public ListCellRenderer getListCellRenderer(int column)
AutoFilterTableHeaderAdapter
getListCellRenderer
in interface AutoFilterTableHeaderAdapter
column
- the column in the model to add the DynamicTableFilter
DynamicTableFilter
s.public boolean isUseTableCellRenderer(int column)
AutoFilterTableHeaderAdapter
isUseTableCellRenderer
in interface AutoFilterTableHeaderAdapter
column
- the column index.
public boolean isAllowCustomFilter(int column)
AutoFilterTableHeaderAdapter
AutoFilterTableHeader
allows custom filter. The difference is there will be a (Custom...)
item in the drop down list.when clicking on the filter button. The value is only considered when
AutoFilterTableHeader.isAllowMultipleValues()
returns false.
isAllowCustomFilter
in interface AutoFilterTableHeaderAdapter
column
- the column index.
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |