|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.swing.Flashable com.jidesoft.grid.TableFlashable
public class TableFlashable
TableFlashable
makes the CellStyleTable
cells flashing as long as the
StyleModel
's getCellStyleAt
method return a FlashCellStyle
.
TableFlashable flasher = new TableFlashable(_table, new FlashCellStyle[]{_flashCellStyle}, new
int[]{0, 2});
flasher.startFlashing();
All flashing happened at the same pace so that it looks better when there are many cell flashing. The flash interval
is determined by Flashable.setInterval(int)
method. The flash style can be defined at using setFlashStyle
of FlashCellStyle
. Since the same CellStyle
class is used, you can flash background,
foreground, font, border, or even alignments.
For performance consideration, you should predefine several FlashCellStyle
's and use them in
StyleModel
. You also need to pass the FlashCellStyle
as an array to the constructor of
TableFlashable
.
We also all your set specify which columns to flash if the flashing cells only appear at certain columns.
Field Summary | |
---|---|
static int |
ALL_VISIBLE_CELLS
|
static int |
ONLY_FLASH_CELLS
|
Fields inherited from class com.jidesoft.swing.Flashable |
---|
_animator, _component, _timer, CLIENT_PROPERTY_FLASHABLE |
Constructor Summary | |
---|---|
TableFlashable(CellStyleTable table,
FlashCellStyle[] flashCellStyles)
|
|
TableFlashable(CellStyleTable table,
FlashCellStyle[] flashCellStyles,
int[] columns)
|
Method Summary | |
---|---|
void |
clearFlashing()
Clears any flashing effect. |
void |
flash()
This method actually does the flashing. |
int |
getFlashArea()
Gets the flash area. |
FlashCellStyle[] |
getFlashCellStyles()
Gets the FlashCellStyles used by the StyleModel. |
int[] |
getPosisbleFlashColumns()
Deprecated. replaced by getPossibleFlashColumns() . |
int[] |
getPossibleFlashColumns()
Gets the possible flash columns. |
void |
setFlashArea(int flashArea)
Sets the flash area. |
void |
setFlashCellStyles(FlashCellStyle[] flashCellStyles)
Sets the FlashCellStyles in use. |
void |
setPosisbleFlashColumns(int[] possibleFlashColumns)
Deprecated. replaced by setPossibleFlashColumns(int[]) . |
void |
setPossibleFlashColumns(int[] possibleFlashColumns)
Sets the possible flash columns. |
Methods inherited from class com.jidesoft.swing.Flashable |
---|
getAnimator, getComponent, getFlashable, getInterval, getSynchronizedFlashFlag, isFlashableInstalled, isFlashing, setComponent, setInterval, startFlashing, stopFlashing, uninstall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ALL_VISIBLE_CELLS
public static final int ONLY_FLASH_CELLS
Constructor Detail |
---|
public TableFlashable(CellStyleTable table, FlashCellStyle[] flashCellStyles)
public TableFlashable(CellStyleTable table, FlashCellStyle[] flashCellStyles, int[] columns)
Method Detail |
---|
public int getFlashArea()
ALL_VISIBLE_CELLS
or ONLY_FLASH_CELLS
.public void setFlashArea(int flashArea)
ALL_VISIBLE_CELLS
,
we will repaint all visible cells of the possible columns (set using setPossibleFlashColumns(int[])
. If
the visible table cells are not many, this could have a better performance than ONLY_FLASH_CELLS
. If you
choose ONLY_FLASH_CELLS
, we will look at StyleModel
s and see if getCellStyleAt
returns a FlashCellStyle
and only repaint those cells. So compare with the two options, one might
paint cells that are not flashing. The other will take time to examine StyleModel
. In
TableFlasherDemo, the two always have the same performance. You can decide which one to use based on the actual
situation in your application. In general, if your StyleModel's getCellStyleAt is expensive, try to use ALL_VISIBLE_CELLS
. If your TableModel's getValueAt method is expensive, try to use ONLY_FLASH_CELLS
.
flashArea
- the new flash area. It could be either ALL_VISIBLE_CELLS
or ONLY_FLASH_CELLS
.public FlashCellStyle[] getFlashCellStyles()
public void setFlashCellStyles(FlashCellStyle[] flashCellStyles)
flashCellStyles
- the new FlashCellStyles.@Deprecated public int[] getPosisbleFlashColumns()
getPossibleFlashColumns()
.
public int[] getPossibleFlashColumns()
@Deprecated public void setPosisbleFlashColumns(int[] possibleFlashColumns)
setPossibleFlashColumns(int[])
.
possibleFlashColumns
- the possible flash columnspublic void setPossibleFlashColumns(int[] possibleFlashColumns)
possibleFlashColumns
- the possible flash columnspublic void flash()
Flashable
flash
in class Flashable
public void clearFlashing()
Flashable
Flashable.startFlashing()
and Flashable.stopFlashing()
.
clearFlashing
in class Flashable
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |