private class SwtCurveView.CurveView extends org.eclipse.swt.widgets.Canvas
Modifier and Type | Field and Description |
---|---|
(package private) org.eclipse.swt.events.FocusListener |
focusListener |
(package private) org.eclipse.swt.events.PaintListener |
paintListener |
Constructor and Description |
---|
CurveView(org.eclipse.swt.widgets.Composite parent,
int xPixel,
int yPixel,
int nrofXvalues) |
Modifier and Type | Method and Description |
---|---|
void |
drawBackground(org.eclipse.swt.graphics.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) |
getCaret, getIME, scroll, setCaret, setFont, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
org.eclipse.swt.events.PaintListener paintListener
org.eclipse.swt.events.FocusListener focusListener
public CurveView(org.eclipse.swt.widgets.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(org.eclipse.swt.graphics.GC g, int xView, int yView, int dxView, int dyView)
drawBackground
in class org.eclipse.swt.widgets.Canvas
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.