public final class GralGridProperties
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GralGridProperties.ImplAccess |
Modifier and Type | Field and Description |
---|---|
GralColor |
colorBackground_
A common background color for all widgets which are paint at the background.
|
GralFont[] |
fontMonospacedSansSerif |
protected static int[][] |
pixelFrac
Number of pixel for fractional part and for the grid size.
|
protected int |
size
The size of this propety set.
|
protected static int[][] |
stdTextFontSize
This are the font sizes for some heights of fields in the given sizes of presentation.
|
GralFont[] |
textFont
Up to 10 font sizes for following hight of lettes:
..1.2..1.4..1.6..1.8..2.0..2.4..2.8..3.1..3.93.9...
|
static int |
version
Version, history and license.
|
protected int |
xPixelUnit |
Constructor and Description |
---|
GralGridProperties() |
Modifier and Type | Method and Description |
---|---|
GralColor |
color(int colorValue)
Returns a color with given numeric color value.
|
int |
getColorValue(java.lang.String sColorName) |
GralFont |
getTextFont(float size) |
GralFont |
getTextFont(float fontHeight,
char type,
char style)
The type:
m: monospaced small
The style: not supported yet.
|
void |
setSizeGui(char sizeC) |
int |
size() |
int |
xPixelFrac(int frac) |
int |
xPixelUnit()
Gets the number of pixel for one unit of x-direction.
|
int |
yPixelFrac(int frac) |
int |
yPixelUnit() |
public static final int version
protected static final int[][] stdTextFontSize
protected static final int[][] pixelFrac
[frac][size]
.
The [frac][10]
contains the number of pixel for 1 grid unit.
pixelFrac[size] [10]
contains the pixel size of the grid.
Type | units | pixel |
---|---|---|
Label normal text size | 2 | 16 |
Button normal text size | 3 | 24 |
TextField | 2 | 16 |
Large InputField | 4 | 32 |
size | A | B | C | D | E | F | G |
---|---|---|---|---|---|---|---|
pixel/grid | 6 | 7 | 8 | 9 | 10 | 12 | 15 |
640 x 480 | 106 x 80 | 91 x 68 | 80 x 60 | todo | todo | todo | |
800 x 600 | 133 x 100 | 114 x 85 | 100 x 75 | todo | todo | todo | |
1024 x 768 | 170 x 128 | 146 x 109 | 128 x 96 | 113 x 85 | 102 x 76 | 85 x 64 | 68 x 51 |
1200 x 800 | 200 x 133 | 171 x 114 | 150 x 100 | 133 x 88 | 120 x 80 | 100 x 66 | 80 x 53 |
1680 x 1024 | 280 x 170 | 240 x 146 | 210 x 128 | 186 x 113 | 168 x 102 | 140 x 85 | 112 x 68 |
Type | unit | pixel |
---|---|---|
JLabel normal text size | 2 | 0+6 |
JButton normal text size | 3 | 26 |
InputField | 4 | 34 |
protected int xPixelUnit
public GralColor colorBackground_
public final GralFont[] textFont
..1.2 | ..1.4 | ..1.6 | ..1.8 | ..2.0 | ..2.4 | ..2.8 | ..3.1 | ..3.9 | 3.9... | |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
stdTextFontSize
.public final GralFont[] fontMonospacedSansSerif
protected int size
public void setSizeGui(char sizeC)
public int size()
public int getColorValue(java.lang.String sColorName)
public GralFont getTextFont(float size)
public GralFont getTextFont(float fontHeight, char type, char style)
fontHeight
- height of the text line in GralPos. 2.0f is standard.type
- style
- public GralColor color(int colorValue)
colorValue
- red, green and bluepublic int yPixelFrac(int frac)
public int xPixelUnit()
public int yPixelUnit()
public int xPixelFrac(int frac)