public class SwtProperties extends GralGridProperties.ImplAccess
Modifier and Type | Field and Description |
---|---|
Color |
colorBackground
A common background color for all widgets which are paint at the background.
|
private Color |
colorBlack |
Color |
colorGrid |
Color |
colorGridStrong |
(package private) java.util.Map<java.lang.Integer,Color> |
colorsSwt |
(package private) GralGridProperties |
gralProps |
private Device |
guiDevice |
Font |
smallPromptFont |
Font |
stdButtonFont |
Font |
stdInputFont |
smallPromptFontSize, stdButtonFontSize, stdInputFontSize
Constructor and Description |
---|
SwtProperties(Device device,
GralGridProperties gralProps)
Initializes a properties object.
|
Modifier and Type | Method and Description |
---|---|
Color |
colorBackgroundSwt()
Returns a color with given Gui-independent color name.
|
Color |
colorSwt(GralColor color)
Returns a color with given Gui-independent color.
|
Color |
colorSwt(int colorValue)
Returns a color with given numeric color value.
|
static GralColor |
createColorGui(Color color)
Creates an instance of a GUI-system independent color with given SWT color.
|
Font |
fontSwt(GralFont font)
Returns a implementation font with given Gui-independent font.
|
Font |
getSwtFont(float fontSize) |
(package private) Font |
getTextFontSwt(float fontSize,
char type,
char style) |
final GralGridProperties gralProps
private final Device guiDevice
public final Font smallPromptFont
public final Font stdInputFont
public final Font stdButtonFont
java.util.Map<java.lang.Integer,Color> colorsSwt
private final Color colorBlack
public final Color colorGrid
public final Color colorGridStrong
public Color colorBackground
public SwtProperties(Device device, GralGridProperties gralProps)
size
- number between 1..5 to determine the size of the content (font size, pixel per cell)public Color colorSwt(GralColor color)
color
- The given color in system-indpending form.public Color colorSwt(int colorValue)
colorValue
- red, green and bluepublic Color colorBackgroundSwt()
sColorName
- One of the registered color names.public static GralColor createColorGui(Color color)
color
- The SWT-colorpublic Font getSwtFont(float fontSize)
public Font fontSwt(GralFont font)
forn
- The given Gral font in system-independent form.Font getTextFontSwt(float fontSize, char type, char style)