Modifier and Type | Field and Description |
---|---|
private Axis |
axis
the axis
|
private org.eclipse.swt.graphics.Color |
color
the grid color
|
private static int |
DEFAULT_FOREGROUND
the default color
|
private static LineStyle |
DEFAULT_STYLE
the default style
|
private boolean |
isVisible
the visibility state
|
private static int |
LINE_WIDTH
the line width
|
private LineStyle |
lineStyle
the line style
|
Modifier and Type | Method and Description |
---|---|
protected void |
draw(org.eclipse.swt.graphics.GC gc,
int width,
int height)
Draws grid.
|
org.eclipse.swt.graphics.Color |
getForeground()
Gets the foreground color.
|
LineStyle |
getStyle()
Gets the line style.
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color.
|
void |
setStyle(LineStyle style)
Sets the line style.
|
private Axis axis
private org.eclipse.swt.graphics.Color color
private boolean isVisible
private LineStyle lineStyle
private static final int LINE_WIDTH
private static final LineStyle DEFAULT_STYLE
private static final int DEFAULT_FOREGROUND
public Grid(Axis axis)
axis
- the axispublic org.eclipse.swt.graphics.Color getForeground()
IGrid
getForeground
in interface IGrid
public void setForeground(org.eclipse.swt.graphics.Color color)
IGrid
setForeground
in interface IGrid
color
- the foreground colorpublic void setStyle(LineStyle style)
IGrid
protected void draw(org.eclipse.swt.graphics.GC gc, int width, int height)
gc
- the graphics contextwidth
- the width to draw gridheight
- the height to draw grid