private class SwtCurveView.CurveViewSwtWidget
extends Canvas
Modifier and Type | Field and Description |
---|---|
(package private) FocusListener |
focusListener |
(package private) PaintListener |
paintListener
The paint event is forced by an handling on operation system, for example hide or show a window, resize etc. pp.
|
Constructor and Description |
---|
CurveViewSwtWidget(Composite parent,
int xPixel,
int yPixel,
int nrofXvalues) |
Modifier and Type | Method and Description |
---|---|
void |
drawBackground(GC g,
int xView,
int yView,
int dxView,
int dyView)
This routine overrides
|
void |
redrawData() |
void |
setGridHorizontal(float percentY,
int periodStrongLine)
Set distance for horizontal grid lines.
|
void |
setGridVertical(int dataPointsBetweenGridLines,
int periodStrongLine) |
PaintListener paintListener
SwtCurveView.redrawGthread()
.FocusListener focusListener
public CurveViewSwtWidget(Composite parent, int xPixel, int yPixel, int nrofXvalues)
public void setGridVertical(int dataPointsBetweenGridLines, int periodStrongLine)
public void setGridHorizontal(float percentY, int periodStrongLine)
percentY
- percent of y-view for grid lines. For example 50.0: divide y-axis in 50 steps.periodStrongLine
- period for strong lines For example 5, any 5. line is stroke.public void redrawData()
public void drawBackground(GC g, int xView, int yView, int dxView, int dyView)
It is called in this class in {@link #paintListener} in the {@link PaintListener#paintControl(PaintEvent)} method.
It draws the whole content.
Because of saving calculation time there will be drawn only a small peace on right side of the area
with the new data normally. The rest inclusive grid lines, curves, text is moved to left. But if the whole
window should be refreshed, the whole widget is drawn newly.