|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.CellRendererPane
com.citra.table.WrapperCellRendererPane
com.citra.filter.tree.DefaultFilterTreeRenderer
public class DefaultFilterTreeRenderer
DefaultFilterTreeRenderer is the default FilterTreeRenderer implementation that uses an arrow button to present users with filter options for a column.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.CellRendererPane |
---|
CellRendererPane.AccessibleCellRendererPane |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ArrowButton |
arrow
The button that is showing on the header |
protected int |
arrowMode
the current positioning mode of the arrow (left or right) |
Fields inherited from class com.citra.table.WrapperCellRendererPane |
---|
opaqueFalse |
Fields inherited from class javax.swing.CellRendererPane |
---|
accessibleContext |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
DefaultFilterTreeRenderer()
Constructs a DefaultFilterTreeRenderer. |
Method Summary | |
---|---|
boolean |
checkForFilter(MouseEvent e,
PopupTreeFilterHeaderModel model)
Determines whether the mouse event triggered the start of a filter action on the column. |
ArrowButton |
getArrowButton()
Returns the arrow button that is showing when a filter is installed 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. |
Component |
getMainComponent()
Returns the main wrapped component. |
Dimension |
getPreferredSize()
Returns the preferred size of this container. |
String |
getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event. |
protected void |
prepareRenderer(PopupTreeFilterHeaderModel model,
int modelIndex)
This method is called just before the renderer paints the column with the supplied model index for columns that have a filter installed. |
void |
setBounds(int x,
int y,
int w,
int h)
Moves and resizes this component. |
Methods inherited from class com.citra.table.WrapperCellRendererPane |
---|
getMainComponent, paint, paintComponent |
Methods inherited from class javax.swing.CellRendererPane |
---|
addImpl, getAccessibleContext, invalidate, paintComponent, paintComponent, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ArrowButton arrow
protected int arrowMode
Constructor Detail |
---|
public DefaultFilterTreeRenderer()
Method Detail |
---|
public boolean checkForFilter(MouseEvent e, PopupTreeFilterHeaderModel model)
checkForFilter
in interface FilterTreeRenderer
e
- the mouse event generated on the table's headermodel
- the tree filter header model containing information about installed filters
public ArrowButton getArrowButton()
public Component getFilterableTreeComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column, PopupTreeFilterHeaderModel model, TableCellRenderer cellRenderer)
getFilterableTreeComponent
in interface FilterTreeRenderer
table
- the table that is asking the renderer to drawvalue
- the value of the column to be renderedisSelected
- true if the column is to be rendered with the selection highlighted, false otherwisehasFocus
- if true, render appropriatelyrow
- the row index of the column being drawn. usually -1column
- the column index of the column being drawnmodel
- the tree filter header model that contains information about installed filterscellRenderer
- the renderer of the 'unfiltered' component
public Component getMainComponent()
getMainComponent
in class WrapperCellRendererPane
public Dimension getPreferredSize()
getPreferredSize
in class Container
Dimension
that represents
the preferred size of this container.Container.getMinimumSize()
,
Container.getLayout()
,
LayoutManager.preferredLayoutSize(Container)
,
Component.getPreferredSize()
public String getToolTipText(MouseEvent event)
getToolTipText
in class WrapperCellRendererPane
event
- the mouse event producing the tooltip
protected void prepareRenderer(PopupTreeFilterHeaderModel model, int modelIndex)
model
- the tree filter header model that contains information about installed filtersmodelIndex
- the column's index in the modelpublic void setBounds(int x, int y, int w, int h)
x
and y
, and the
new size is specified by width
and height
.
setBounds
in class Component
x
- the new x-coordinate of this componenty
- the new y-coordinate of this componentw
- the new width
of this componenth
- the new height
of this
componentComponent.getBounds()
,
Component.setLocation(int, int)
,
Component.setLocation(Point)
,
Component.setSize(int, int)
,
Component.setSize(Dimension)
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |