com.sciapp.filter
Class CustomPopupFilterHeaderModel

java.lang.Object
  extended by com.sciapp.filter.FilterHeaderModel
      extended by com.sciapp.filter.PopupFilterHeaderModel
          extended by com.sciapp.filter.CustomPopupFilterHeaderModel
All Implemented Interfaces:
FilterHeaderCallback

public class CustomPopupFilterHeaderModel
extends PopupFilterHeaderModel

CustomPopupFilterHeaderModel overrides PopupFilterHeaderModel in order to supply a custom filter.


Field Summary
protected  JAutoFilter autoFilter
          the auto filter component
protected  String CUSTOM_STRING
          a string for the 'custom' filter selection
protected  JDialog dialog
          the dialog component.
 
Fields inherited from class com.sciapp.filter.PopupFilterHeaderModel
allString, arrow, BLANK_STRING, box, NON_BLANK_STRING, renderer
 
Fields inherited from class com.sciapp.filter.FilterHeaderModel
ALL_VALUES_MODE, autoCreateAllFilters, columnShowing, defaultFiltersByColumnClass, filterHeader, filterMode, filterModel, ORDERED_MODE, PROGRESSIVE_MODE, tableModel
 
Constructor Summary
CustomPopupFilterHeaderModel()
          Creates a new CustomPopupFilterHeaderModel object.
 
Method Summary
 void bringUpDialog(int c)
          Displays the custom auto filter dialog for column c.
protected  JAutoFilter createAutoFilter()
          Returns a new instance of a custom auto filter.
 JAutoFilter getAutoFilter()
          Returns the custom auto filter.
 JDialog getDialog()
          Returns the dialog to show when a custom filter is selected.
 void installFilter(TableFilter tableFilter, Object listValue, Object filterValue, int c)
          Assigns a new table filter to the column c.
protected  void preparePopup(int c)
          Makes final preparations before the popup is shown on screen.
 void updateUI()
          Calls to this method should update all components that are used to display the filter on the header.
 
Methods inherited from class com.sciapp.filter.PopupFilterHeaderModel
checkForFilter, filterSelected, getArrowButton, getCollectionForColumn, getComboBox, populatePopup, popupWillShow, prepareRenderer, removeFromTable, removeRenderer, setRenderer, shouldProcessEvent
 
Methods inherited from class com.sciapp.filter.FilterHeaderModel
addFilterInColumn, addFilterInColumns, attachToTable, attachToTable, createDefaultFilters, createTableHeader, getAutoCreateAllFilters, getColumnShowing, getDefaultFilter, getFilter, getFilterMode, getFilterOrder, getFilterValue, getFilterValues, getFilterValues, getListValue, getTableFilter, getTableFilterForObject, getTableHeader, hasFilter, inferColumnClass, installFilter, installFilter, removeFilter, removeFilterFromColumn, removeFilterInColumns, sendFilterEvent, setAutoCreateAllFilters, setColumnShowing, setDefaultFilter, setFilterMode, setModel, setModel, setTableHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CUSTOM_STRING

protected String CUSTOM_STRING
a string for the 'custom' filter selection


dialog

protected JDialog dialog
the dialog component.


autoFilter

protected JAutoFilter autoFilter
the auto filter component

Constructor Detail

CustomPopupFilterHeaderModel

public CustomPopupFilterHeaderModel()
Creates a new CustomPopupFilterHeaderModel object.

Method Detail

bringUpDialog

public void bringUpDialog(int c)
Displays the custom auto filter dialog for column c.

Parameters:
c - the column

createAutoFilter

protected JAutoFilter createAutoFilter()
Returns a new instance of a custom auto filter.

Returns:
a new instance of an auto filter.

getAutoFilter

public JAutoFilter getAutoFilter()
Returns the custom auto filter.

Returns:
the auto filter.

getDialog

public JDialog getDialog()
Returns the dialog to show when a custom filter is selected.

Returns:
the dialog that contains the custom filter panel.

installFilter

public void installFilter(TableFilter tableFilter,
                          Object listValue,
                          Object filterValue,
                          int c)
Assigns a new table filter to the column c.

Overrides:
installFilter in class PopupFilterHeaderModel
Parameters:
tableFilter - the new table filter to assign.
listValue - the label of the filter.
filterValue - the value of the filter.
c - the view index of the column.

preparePopup

protected void preparePopup(int c)
Makes final preparations before the popup is shown on screen. This implementation will add an "ALL" filter option to the popup at the top for all columns, and a "Blanks" and "Non Blanks" for String column classes.

Overrides:
preparePopup in class PopupFilterHeaderModel
Parameters:
c - the column for which the popup filter will be displayed.

updateUI

public void updateUI()
Calls to this method should update all components that are used to display the filter on the header.

Overrides:
updateUI in class PopupFilterHeaderModel