|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcreme.swing.table.colormodel.DefaultTableColorModel
org.jcreme.swing.table.colormodel.LayeredColorModel
This class enables to layer color models. The first ColorModel is the top layer. Each layer hides the layers underneath it.
Field Summary |
Fields inherited from class org.jcreme.swing.table.colormodel.DefaultTableColorModel |
MINIMUM_COLOR_DISTANCE |
Constructor Summary | |
LayeredColorModel()
|
Method Summary | |
void |
addLayer(TableColorModel layer)
Enables to add a layer to the model. |
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. |
TableColorModel[] |
getLayers()
Gives access to the layers that compose the model. |
void |
removeLayer(TableColorModel layer)
Enables to remove a layer from the model. |
void |
removeLayerAt(int position)
Enables to remove the layer at a given depth from the model. |
void |
setLayerAt(TableColorModel layer,
int position)
Enables to add a layer to the model at a given depth. |
Methods inherited from class org.jcreme.swing.table.colormodel.DefaultTableColorModel |
addTableColorModelListener, ensureMinimumDistance, fireTableColorModelChanged, getDistance, getListeners, getTableModel, mixColors, removeTableColorModelListener, setTableModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jcreme.swing.table.TableColorModel |
addTableColorModelListener, getListeners, getTableModel, removeTableColorModelListener, setTableModel |
Constructor Detail |
public LayeredColorModel()
Method Detail |
public void addLayer(TableColorModel layer)
layer
- the layer to add.public void setLayerAt(TableColorModel layer, int position)
layer
- the layer to add.position
- the depth of the layer in the model.public TableColorModel[] getLayers()
public void removeLayer(TableColorModel layer)
layer
- the layer to remove.public void removeLayerAt(int position)
position
- the depth of the layer to remove.public java.awt.Color getBackgroundColor(int row, int column, boolean selected, java.awt.Component renderer)
getBackgroundColor
in interface TableColorModel
getBackgroundColor
in class DefaultTableColorModel
row
- the cell's row.column
- the cell's column.selected
- whether the cell is currently selected or not.renderer
- the renderer used to display the cell.
public java.awt.Color getForegroundColor(int row, int column, boolean selected, java.awt.Component renderer)
getForegroundColor
in interface TableColorModel
getForegroundColor
in class DefaultTableColorModel
row
- the cell's row.column
- the cell's column.selected
- whether the cell is currently selected or not.renderer
- the renderer used to display the cell.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |