|
|||||||||||
| 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.ChangeHighlightingColorModel
This TableColorModel enables to highlight the changes that occur in a TableModel. The cells that change are colored (background, foreground or both) for a short period (blink). This model can be used alone or combined with another ColorModel. In this case, the colors of the other model will be temporarily overriden by the highlight colors.
| Nested Class Summary | |
protected class |
ChangeHighlightingColorModel.ChangeTimer
This class enables to keep track of the event that has to be timed out. |
| Field Summary |
| Fields inherited from class org.jcreme.swing.table.colormodel.DefaultTableColorModel |
MINIMUM_COLOR_DISTANCE |
| Constructor Summary | |
ChangeHighlightingColorModel()
Creates a new instance of ChangeHighlightingColorModel |
|
| Method Summary | |
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 |
getBackgroundHighlightColor()
Gives access to the background color that is applied when a cell is highlighted. |
protected java.util.Vector |
getChangeEvents()
|
java.awt.Color |
getForegroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
Gives access to the foreground color of a cell. |
java.awt.Color |
getForegroundHighlightColor()
Gives access to the foreground color that is applied when a cell is highlighted. |
int |
getResiliencePeriod()
Gives access to the resilience period (the number of milliseconds that the highlighting lasts). |
protected java.awt.event.ActionListener |
getTimerListener()
|
TableColorModel |
getUnderlyingModel()
Gives access to the underlying TableColorModel. |
void |
setBackgroundHighlightColor(java.awt.Color color)
Enables to change the background color to apply when highlighting a change. |
void |
setForegroundHighlightColor(java.awt.Color color)
Enables to change the foreground color to apply when highlighting a change. |
void |
setResiliencePeriod(int period)
Enables the change resilience period. |
void |
setTableModel(javax.swing.table.TableModel model)
Sets the model that will be colored by this TableColorModel. |
void |
setUnderlyingModel(TableColorModel model)
Enables to change the underlying TableColorModel. |
| Methods inherited from class org.jcreme.swing.table.colormodel.DefaultTableColorModel |
addTableColorModelListener, ensureMinimumDistance, fireTableColorModelChanged, getDistance, getListeners, getTableModel, mixColors, removeTableColorModelListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ChangeHighlightingColorModel()
| Method Detail |
protected java.util.Vector getChangeEvents()
protected java.awt.event.ActionListener getTimerListener()
public java.awt.Color getBackgroundColor(int row,
int column,
boolean selected,
java.awt.Component renderer)
getBackgroundColor in interface TableColorModelgetBackgroundColor in class DefaultTableColorModelrow - 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 TableColorModelgetForegroundColor in class DefaultTableColorModelrow - 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 getBackgroundHighlightColor()
public void setBackgroundHighlightColor(java.awt.Color color)
color - the background color to use for the highlighted cells.public java.awt.Color getForegroundHighlightColor()
public void setForegroundHighlightColor(java.awt.Color color)
color - the foreground color to use for the highlighted cells.public int getResiliencePeriod()
public void setResiliencePeriod(int period)
period - the new number of milliseconds for which the cell must stay
highlighted after it changed.public TableColorModel getUnderlyingModel()
public void setUnderlyingModel(TableColorModel model)
model - the new underliyng TableColorModel.public void setTableModel(javax.swing.table.TableModel model)
TableColorModel
setTableModel in interface TableColorModelsetTableModel in class DefaultTableColorModelTableColorModel.setTableModel(javax.swing.table.TableModel)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||