|
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.Objectcom.citra.table.search.TableStyleSelector
public class TableStyleSelector
A simple SearchModelListener implementation that uses a Style to paint the matching cells of a table when searching with a different background color.
Field Summary | |
---|---|
protected TableModel |
searchModel
the search model |
protected ColorStyle |
style
the style that will be used to paint the matching cells |
protected JTable |
table
the associated table |
Constructor Summary | |
---|---|
TableStyleSelector(JTable table)
Constructs a TableStyleSelector. |
Method Summary | |
---|---|
TableModel |
getSearchModel()
Retrieves the tabular search model to use when searching. |
Color |
getSelectionColor()
Retrieves the matching selection color. |
ColorStyle |
getStyle()
Retrieves the style that will be used to paint the matching cells. |
void |
search(SearchModelEvent e)
Called whenever searching of a table has been requested. |
void |
setSearchModel(TableModel searchModel)
Assigns the tabular search model to use when searching. |
void |
setSelectionColor(Color color)
Assigns the selection color. |
void |
setStyle(ColorStyle style)
Assigns the style that will be used to paint the matching cells. |
void |
setTable(JTable table)
Assigns the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JTable table
protected ColorStyle style
protected TableModel searchModel
Constructor Detail |
---|
public TableStyleSelector(JTable table)
Method Detail |
---|
public TableModel getSearchModel()
setSearchModel
.
public Color getSelectionColor()
public ColorStyle getStyle()
public void search(SearchModelEvent e)
search
in interface SearchModelListener
e
- the SearchModelEvent objectpublic void setSearchModel(TableModel searchModel)
The default model is one that returns the values of the table, by calling the table's getValueAt method.
searchModel
- the model to assignpublic void setSelectionColor(Color color)
color
- the color to assignpublic void setStyle(ColorStyle style)
style
- the style to assignpublic void setTable(JTable table)
table
- the table to assign
|
Copyright © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |