use of de.jaret.util.swt.ColorManager in project translationstudio8 by heartsome.
the class CellRendererBase method getBackgroundColor.
/**
* Get the background color according to a cell style.
*
* @param style cell style
* @param printing true for printing
* @return the color
*/
protected Color getBackgroundColor(ICellStyle style, boolean printing) {
Device device = printing ? _printer : Display.getCurrent();
ColorManager cm = ColorManager.getColorManager(device);
Color bg = cm.getColor(style.getBackgroundColor() != null ? style.getBackgroundColor() : WHITERGB);
return bg;
}
use of de.jaret.util.swt.ColorManager in project translationstudio8 by heartsome.
the class CellRendererBase method getBorderColor.
/**
* Get the border color according to the cell style.
*
* @param style cell style
* @param printing true for printing
* @return the border color
*/
protected Color getBorderColor(ICellStyle style, boolean printing) {
Device device = printing ? _printer : Display.getCurrent();
ColorManager cm = ColorManager.getColorManager(device);
Color bg = cm.getColor(style.getBorderColor() != null ? style.getBorderColor() : new RGB(0, 0, 0));
return bg;
}
use of de.jaret.util.swt.ColorManager in project translationstudio8 by heartsome.
the class CellRendererBase method getForegroundColor.
/**
* Get the foreground color according to the cell style.
*
* @param style cell style
* @param printing true for printing
* @return the foreground color
*/
protected Color getForegroundColor(ICellStyle style, boolean printing) {
Device device = printing ? _printer : Display.getCurrent();
ColorManager cm = ColorManager.getColorManager(device);
Color bg = cm.getColor(style.getForegroundColor() != null ? style.getForegroundColor() : BLACKRGB);
return bg;
}
Aggregations