Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.filter.tree
Interface FilterTreeRenderer

All Known Implementing Classes:
DefaultFilterTreeRenderer

public interface FilterTreeRenderer

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


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

Method Detail

checkForFilter

boolean checkForFilter(MouseEvent e,
                       PopupTreeFilterHeaderModel 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 tree filter header model containing information about installed filters
Returns:
true if the arrow button was pressed

getFilterableTreeComponent

Component getFilterableTreeComponent(JTable table,
                                     Object value,
                                     boolean isSelected,
                                     boolean hasFocus,
                                     int row,
                                     int column,
                                     PopupTreeFilterHeaderModel 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
model - the tree filter header model that contains information about installed filters
cellRenderer - the renderer of the 'unfiltered' component
Returns:
the component used for drawing the filterable tree header column

Copyright © 2011 Citra Technologies. All Rights Reserved.