|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.grid.CellStyle
com.jidesoft.grid.FlashCellStyle
public class FlashCellStyle
FlashCellStyle provides an alternative cell style to allow cell flashing.
There are two cell styles defined in this class. The normal style is on the cell style itself since FlashCellStyle
extends CellStyle. This style is used when isFlashOn() returns false. The other
cell style is set using setFlashCellStyle(CellStyle). It will be used when isFlashOn() returns true.
StyleModel in your table model. In the cell you want to flash,
return a predefined FlashCellStyle. You could return a new instance of FlashCellStyle every time.
But for the performance consideration, it will be way more efficient to reuse the same instance as long as
the flash style (background, foreground, font style etc) is the same for all flashing cells.
Once StyleModel is done, you just need to use TableFlashable to enable the flashing.
TableFlashable flasher = new TableFlashable(_table, new FlashCellStyle[]{_flashCellStyle}, new int[]{0, 2});
flasher.startFlashing();
The code above will flash only the cells in the first and the third columns, assuming only those columns have flashing cells.
| Field Summary |
|---|
| Fields inherited from class com.jidesoft.grid.CellStyle |
|---|
EMPTY_BORDER, EMPTY_CELL_PAINTER, EMPTY_COLOR, EMPTY_FONT, EMPTY_ICON, EMPTY_STRING |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
FlashCellStyle()
Creates a FlashCellStyle. |
|
| Method Summary | |
|---|---|
void |
flash()
Toggles from flash style to normal style or other way. |
Color |
getBackground()
Gets the background. |
Border |
getBorder()
Gets the border. |
CellStyle |
getFlashCellStyle()
Gets the flashCellStyle. |
Font |
getFont()
Gets the font. |
int |
getFontStyle()
Gets the fontstyle. |
Color |
getForeground()
Gets the foreground. |
int |
getHorizontalAlignment()
Gets the horizontal alignment. |
Icon |
getIcon()
Gets the icon. |
int |
getPriority()
Gets the priority. |
Color |
getSelectionBackground()
Gets the selection background. |
Color |
getSelectionForeground()
Gets the selection foreground. |
int |
getVerticalAlignment()
Gets the vertical alignment. |
boolean |
isFlashOn()
Checks if the flash style is on. |
void |
setFlashCellStyle(CellStyle flashCellStyle)
Sets the flashCellStyle. |
void |
setFlashOn(boolean on)
Sets the flash style on. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlashCellStyle()
FlashCellStyle.
| Method Detail |
|---|
public boolean isFlashOn()
public void setFlashOn(boolean on)
on - true or false.public void flash()
public CellStyle getFlashCellStyle()
public void setFlashCellStyle(CellStyle flashCellStyle)
flashCellStyle - the new flashCellStyle.public Border getBorder()
getFlashCellStyle().getBorder(). Otherwise we will return super.getBorder().
getBorder in class CellStylepublic Color getBackground()
getFlashCellStyle().getBackground(). Otherwise we will return super.getBackground().
getBackground in class CellStylepublic Color getForeground()
getFlashCellStyle().getForeground(). Otherwise we will return super.getForeground().
getForeground in class CellStylepublic Color getSelectionBackground()
getFlashCellStyle().getSelectionBackground(). Otherwise we will return super.getSelectionBackground().
getSelectionBackground in class CellStylepublic Color getSelectionForeground()
getFlashCellStyle().getSelectionForeground(). Otherwise we will return super.getSelectionForeground().
getSelectionForeground in class CellStylepublic Font getFont()
getFlashCellStyle().getFont(). Otherwise we will return super.getFont().
getFont in class CellStylepublic int getFontStyle()
getFlashCellStyle().getFontStyle(). Otherwise we will return super.getFontStyle().
getFontStyle in class CellStylepublic Icon getIcon()
getFlashCellStyle().getIcon(). Otherwise we will return super.getIcon().
getIcon in class CellStylepublic int getVerticalAlignment()
getFlashCellStyle().getVerticalAlignment(). Otherwise we will return super.getVerticalAlignment().
getVerticalAlignment in class CellStylepublic int getHorizontalAlignment()
getFlashCellStyle().getHorizontalAlignment(). Otherwise we will return super.getHorizontalAlignment().
getHorizontalAlignment in class CellStylepublic int getPriority()
getFlashCellStyle().getPriority(). Otherwise we will return super.getPriority().
getPriority in interface PrioritizedgetPriority in class CellStyle
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||