|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This class enables to set the color scheme for a JColoredTable. It can give a different color for the background and the foreground of any cell. A typical use is to implement a consistent color scheme whatever the renderer are.
| Method Summary | |
void |
addTableColorModelListener(TableColorModelListener listener)
Enables to add listeners for the modifications of the color scheme. |
java.awt.Color |
getBackgroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
Gives access to the background color of a cell. |
java.awt.Color |
getForegroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
Gives access to the foreground color of a cell. |
java.util.EventListener[] |
getListeners(java.lang.Class listenerType)
Gets the list of the listeners registered for the modifications of the color scheme. |
javax.swing.table.TableModel |
getTableModel()
Gives access to the TableModel colored by this TableColorModel. |
void |
removeTableColorModelListener(TableColorModelListener listener)
Unregisters the listener for the modifications of the color model. |
void |
setTableModel(javax.swing.table.TableModel model)
Sets the model that will be colored by this TableColorModel. |
| Method Detail |
public java.awt.Color getBackgroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
row - the cell's row.column - the cell's column.selected - whether the cell is currently selected or not.renderer -
public java.awt.Color getForegroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
row - the cell's row.column - the cell's column.selected - whether the cell is currently selected or not.renderer -
public void addTableColorModelListener(TableColorModelListener listener)
listener - the listener to add.public void removeTableColorModelListener(TableColorModelListener listener)
listener - the listener to remove.public java.util.EventListener[] getListeners(java.lang.Class listenerType)
listenerType - The class of listeners to retrieve.
public void setTableModel(javax.swing.table.TableModel model)
model - the data to be colored by this model.public javax.swing.table.TableModel getTableModel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||