Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.filter
Interface FilterRenderer

All Known Implementing Classes:
DefaultFilterRenderer

public interface FilterRenderer

FilterRenderer defines methods for displaying a filterable header component and also for determining the start of a filter action on a column.


Method Summary
 boolean checkForFilter(MouseEvent e, PopupFilterHeaderModel model)
          Determines whether the mouse event triggered the start of a filter action on the column.
 Component getFilterableComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column, int rollOverColumn, PopupFilterHeaderModel model, TableCellRenderer cellRenderer)
          Returns the component used for drawing the filterable header column.
 

Method Detail

checkForFilter

boolean checkForFilter(MouseEvent e,
                       PopupFilterHeaderModel model)
Determines whether the mouse event triggered the start of a filter action on the column. If so, a popup menu containing available filter expression values is displayed for the column.

Parameters:
e - the mouse event generated on the table's header
model - the filter header model containing information about installed filters
Returns:
true if the arrow button was pressed

getFilterableComponent

Component getFilterableComponent(JTable table,
                                 Object value,
                                 boolean isSelected,
                                 boolean hasFocus,
                                 int row,
                                 int column,
                                 int rollOverColumn,
                                 PopupFilterHeaderModel model,
                                 TableCellRenderer cellRenderer)
Returns the component used for drawing the filterable header column. This method is used to configure the renderer appropriately before drawing.

Parameters:
table - the table that is asking the renderer to draw
value - the value of the column to be rendered
isSelected - true if the column is to be rendered with the selection highlighted, false otherwise
hasFocus - if true, render appropriately.
row - the row index of the column being drawn. usually -1
column - the column index of the column being drawn
rollOverColumn - the column that the mouse is rolled over at the time of drawing or -1 if there is no rollover column
model - the filter header model that contains information about installed filters
cellRenderer - the renderer of the 'unfiltered' component
Returns:
the component used for drawing the filterable header column

Copyright © 2005 Scientific Applications. All Rights Reserved.