org.vishia.gral.base

## Class GralCurveView

- java.lang.Object
- - org.vishia.gral.base.GralWidget
  - - org.vishia.gral.base.GralCurveView

- All Implemented Interfaces:
    GetGralWidget_ifc, GralCurveView_ifc, GralSetValue_ifc, GralWidget_ifc, Removeable

      public class GralCurveView
      extends GralWidget
      implements GralCurveView_ifc

  Curve representation for timed values. It is the base class for all implementation.
  - `setSample(float[], int)`: Write out with new measured values.
  See Also:
    `GralCurveViewTrack_ifc.`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GralCurveView.CommonCurve`
    `protected static class` | `GralCurveView.DataOrganisation`
    `protected class` | `GralCurveView.GralCurveViewMouseAction`
    `static class` | `GralCurveView.GraphicImplAccess` All tracks to return for filling.
    `static class` | `GralCurveView.PixelOrganisation`
    `protected static class` | `GralCurveView.SaveOrganisation`
    `static class` | `GralCurveView.TimeOrganisation` Inner class for time organisation.
    `static class` | `GralCurveView.Track` The describing and the actual data of one track (one curve)
    `static class` | `GralCurveView.TrackScale` Instances of this class contain the scaling for one ore more tracks.
    `class` | `GralCurveView.ZbnfSetCurve` The instance of this class `zbnfSetCurve` will be used only temporary while transfer a parse result of `applySettings(String)` The instance contains only the capabilty to get the track info from the parse result and to call `addTrack(String, String, GralColor, int, int, float, float)` inside `#add_Track(ZbnfSetTrack)`.
    `static class` | `GralCurveView.ZbnfSetTrack` Instances of this class were be created only temporary while transfer a parse result of `applySettings(String)` The instance holds values for `ZbnfJavaOutput` to apply to a track calling `addTrack(String, String, GralColor, int, int, float, float)` inside `GralCurveView.ZbnfSetCurve#add_Track(ZbnfSetTrack)`.

    - ### Nested classes/interfaces inherited from class org.vishia.gral.base.GralWidget

      `GralWidget.ActionChangeSelect, GralWidget.ConfigData, GralWidget.DynamicData, GralWidget.ImplAccess`

    - ### Nested classes/interfaces inherited from interface org.vishia.gral.ifc.GralCurveView_ifc

      `GralCurveView_ifc.ModeWrite`

    - ### Nested classes/interfaces inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `GralWidget_ifc.ActionChange, GralWidget_ifc.ActionChangeWhen`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `GralUserAction` | `actionCleanBuffer`
    `GralUserAction` | `actionGo`
    `private GralUserAction` | `actionMoveCursor` This action is called whenever a cursor position is changed.
    `GralUserAction` | `actionPaintAll`
    `private GralUserAction` | `actionSelectTrack` This action is called whenever a track was selected.
    `GralUserAction` | `actionZoomBetweenCursors`
    `GralUserAction` | `actionZoomOut`
    `int` | `adIxData` The increment step of ixData.
    `boolean` | `bActive` True then saves values.
    `private boolean` | `bNewGetVariables`
    `GralCurveView.CommonCurve` | `common` All tracks to return for filling.
    `protected GralCurveView.DataOrganisation` | `dataOrg`
    `int` | `gridDistanceStrongY` Distance of nrofValues for one vertical strong grid line.
    `int` | `ixDataWr` Write index of values, increment by `setSample(float[], int)`.
    `java.util.List<GralCurveView.Track>` | `listTracks` All tracks.
    `int` | `maxNrofXValues` Deepness of the storage of values to present.
    `protected int` | `mIxData` Mask of any ixData.
    `int` | `mIxiData` Mask of index in values.
    `protected GralCurveView.GralCurveViewMouseAction` | `mouseAction`
    `int` | `newSamples`
    `int` | `nrofValues` Current number of values in the data field.
    `protected int` | `nrofValuesForGrid`
    `protected GralCurveView.SaveOrganisation` | `saveOrg`
    `int` | `shIxiData` The number of shift right to get the numeric index in values.
    `boolean` | `testStopWr`
    `GralCurveView.TimeOrganisation` | `timeorg`
    `int[]` | `timeValues` A short timestamp for the values in `GralCurveView.Track.values`.
    `static int` | `version` Version, history and license.
    `(package private) GralCurveView.ZbnfSetCurve` | `zbnfSetCurve`

    - ### Fields inherited from class org.vishia.gral.base.GralWidget

      `_wdgImpl, bEditable, bHasFocus, bShouldInitialize, buildMng, bVisibleState, cfg, contextMenu, dateUser, dyda, htmlHelp, itsMng, lastTimeSetVisible, name, repaintDelay, repaintDelayMax, sCmd, sFormat, sToolTip, sVersion, whatIs`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralCurveView_ifc

      `syntaxSettings`

    - ### Fields inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `sVersion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GralCurveView(java.lang.String sName, int maxNrofXvaluesP, GralCurveView.CommonCurve common)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate(boolean activate)` Activates or deactivates.
    `GralCurveView.Track` | `addTrack(java.lang.String sNameTrack, java.lang.String sDataPath, GralColor color, int style, int nullLine, float scale, float offset)` Creates and adds a track of the curve view.
    `boolean` | `applySettings(java.lang.String in)` Applies the settings from the given String (maybe read from a file) and sets all tracks newly.
    `private java.lang.CharSequence` | `buildDate(int ixStart, int ixEnd)`
    `void` | `cleanBuffer()`
    `GralCurveView.CommonCurve` | `getCommonData()`
    `java.lang.String` | `getTimeVariable()` Returns the path of the time variable if given or null.
    `java.lang.Iterable<? extends GralCurveViewTrack_ifc>` | `getTrackInfo()` This Iterable describes the data paths in that order, which should be regard calling `#setSample(float[])`.
    `java.util.List<GralSetValue_ifc>` | `getTracks()` This list describes the data paths in that order, which should be regard calling `#setSample(float[])`.
    `GralCurveView.Track` | `getTrackSelected()` Returns that track which was selected by set cursor at last.
    `void` | `initMenuContext()` It will be called after construction of the implementation graphic in the derived ctor.
    `boolean` | `isActiv()` Returns true if the curve view is active.
    `boolean` | `isFreezed()` Returns true if the curve view is active but freezed in presentation.
    `void` | `readCurve(java.io.File file)` Reads a curve ///
    `private void` | `readCurveCsvHeadline(java.io.File file)`
    `void` | `refreshFromVariable(VariableContainer_ifc container)` Capability for any widget to update its content from its associated variables described in its sDataPath.
    `void` | `repaint(int delay, int latest)` Forces repaint of the whole curves.
    `private GralCurveView.Track` | `searchTrack(java.lang.String name)` Searches and returns the track from listTrack per name.
    `void` | `setActionMoveCursor(GralUserAction action)` This action will be called whenever a cursor position is changed.
    `void` | `setActionTrackSelected(GralUserAction action)` This action will be called whenever a track was selected.
    `GralColor` | `setBackgroundColor(GralColor color)`
    `void` | `setBoundsPixel(int x, int y, int dx, int dy)`
    `GralColor` | `setForegroundColor(GralColor color)`
    `void` | `setSample(float[] values, int timeshort)` Adds a sampling value set.
    `void` | `setTimePerPixel(int time)`
    `void` | `setTimePoint(long date, int timeshort, float millisecPerTimeshort)` Sets a point of absolute time.
    `void` | `setTimeSpread(int time)`
    `boolean` | `shouldAutosave()`
    `java.lang.CharSequence` | `timeInitAutoSave()` Initializes an auto-save data write process.
    `java.lang.CharSequence` | `timeInitSaveViewArea()`
    `long` | `timeRight()`
    `void` | `writeCurve(WriteCurve_ifc out, GralCurveView_ifc.ModeWrite mode)` Writes the curve to the given interface, it is an exporter class.
    `private void` | `writeCurve(WriteCurve_ifc out, int ixDataStart, int ixDataEnd)` Writes.
    `void` | `writeSettings(java.lang.Appendable out)` Writes the settings of the curve view in an output, maybe a file.

    - ### Methods inherited from class org.vishia.gral.base.GralWidget

      `chgPos, clearShowParam, createImplWidget_Gthread, getActionChange, getActionChangeStrict, getActionDrag, getActionDrop, getActionFocused, getActionShow, getBackColor, getCfgElement, getCmd, getCmd, getContentIdent, getContentInfo, getContextMenu, getData, getDataIx, getDataPath, getDataPath, getFloatValue, getFormat, getGralWidget, getHtmlHelp, getImpl, getItsPanel, getLongValue, getName, getShowMethod, getShowParam, getsToolTip, getText, getValue, getVariable, getVariableFromContentInfo, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, pos, refreshFromVariable, registerWidget, remove, repaint, requestNewValueForVariable, setActionChange, setActionFocused, setActionMouse, setActionShow, setBackColor, setCfgElement, setCmd, setContentIdent, setContentInfo, setData, setDataIx, setDataPath, setDragEnable, setDropEnable, setEditable, setFocus, setFocus, setFormat, setHtmlHelp, setLineColor, setLongValue, setMinMax, setPanelMng, setPrimaryWidgetOfPanel, setText, setTextColor, setToolTip, setToPanel, setValue, setValue, setValue, setValue, setVisible, setVisibleState, setVisibleStateWidget, specifyActionChange, specifyContextMenu, stop, toString, XXXgetPixelPositionSize, XXXgetWidgetImplementation, XXXremoveWidgetImplementation, XXXrepaintGthread, XXXsetFocusGThread, XXXsetVisibleGThread`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.vishia.gral.ifc.GralWidget_ifc

      `createImplWidget_Gthread, getActionChange, getBackColor, getCmd, getContentIdent, getContentInfo, getData, getDataPath, getName, gralMng, isChanged, isEditable, isGraphicDisposed, isInFocus, isNotEditableOrShouldInitialize, isVisible, refreshFromVariable, repaint, setBackColor, setCmd, setContentIdent, setData, setDataPath, setEditable, setFocus, setFocus, setHtmlHelp, setLineColor, setText, setTextColor, setToPanel, setVisible`

    - ### Methods inherited from interface org.vishia.util.Removeable

      `remove`

    - ### Methods inherited from interface org.vishia.gral.ifc.GralSetValue_ifc

      `getContentInfo, getDataIx, getDataPath, setContentInfo, setDataIx, setDataPath, setLongValue, setMinMax, setText, setValue, setValue`

    - ### Methods inherited from interface org.vishia.gral.base.GetGralWidget_ifc

      `getGralWidget`

- - ### Field Detail

    - #### version

          public static final int version

      Version, history and license.
      - 2018-09-20 Hartmut improved for using in InspcCurveViewApp.
        - initTrack(...) renamed to `addTrack(String, String, GralColor, int, int, float, float)`
        - `searchTrack(String)` if data are read from csv for existing configuration.
        - `readCurve(File)` now expects names of variable in the first line in any case, not specific format.
        - `readCurveCsvHeadline(File)` can replace the correct variables in the configuration or builds new tracks for non existing configurated tracks.
      - 2016-07-03 Hartmut chg: `GralCurveView.GraphicImplAccess` as base class of the implementing class SwtCurveView adequate to the new concept: An implementing widget is derived from its derived class of `GralWidget.ImplAccess`. Therefore only that base class implements the GralWidgetImpl_ifc.
      - 2016-03-06 Hartmut chg: `refreshFromVariable(VariableContainer_ifc)`: Handling of timeshort: If the timeshort starts with a lesser value it seems to be a new simulation starting with 0. Then the time difference to the last simulation is calculated and added to the timeshort. It sets a new `setTimePoint(long, int, float)` to prevent overflow later. Initially or if `cleanBuffer()` was invoked the timeshort counts from 0. Therewith the simulation results have an exact relative time but with the absolute timestamp of the PC's time though the simulation does not supply an absolute time. Before that change a bug is detected in `#prepareIndicesDataForDrawing(int, int, int, boolean)`: If the buffer from right side contains a greater short time, the indices return only 1 point. It is a bug in this function, not corrected yet because there are not greater times from right to left with the change above. TODO fix it though.
      - 2016-01-24 Hartmut chg: `CommonCurve#lastTimeShort`: Don't store points with the same time stamp.
      - 2016-01-24 Hartmut bugfix: `applySettings(String)` after read cfg: remove previous `GralCurveView.CommonCurve.timeVariable`, may be a new one!
      - 2015-07-12 Hartmut new: `GralCurveView.Track.setVisible(int)` to control the visibility of tracks.
      - 2015-07-12 Hartmut new: `GralCurveView.Track.groupTrackScale(GralCurveViewTrack_ifc)` for groups of tracks with same scaling.
      - 2014-05-20 Hartmut new in `setSample(float[], int)`: write a point only if at least one variable was refreshed.
      - 2014-03-14 Hartmut new: `GralCurveView.CommonCurve.timeVariable` for time from target.
      - 2014-02-03 Hartmut new: `GralCurveView.CommonCurve.bFreeze`: freeze as common property of more as one GralCurveView. Constructor argument.
      - 2014-01-29 Hartmut new: Comment in Datapath supported. For nice presentation in list on long variable paths.
      - 2013-11-19 Hartmut new: `repaint(int, int)` overridden forces paint of the whole curve by setting `#bPaintAllCmd`, whereby in `setSample(float[], int)` super.repaint is invoked, which does not set `#bPaintAllCmd` and paints therefore only the new data.
      - 2013-07-25 Hartmut new AutoSave capabilities.
      - 2013-05-19 Hartmut new: `GralCurveView.GralCurveViewMouseAction`
      - 2013-05-19 Hartmut new: `#selectTrack(int, int, int, int)` with ctrl and left mouse pressed
      - 2013-05-14 Hartmut new: `Track#getIxTrack()`
      - 2013-03-27 Hartmut bugfix: The `bNewGetVariables` have to be set in `GralWidget.setDataPath(String)` and `applySettings(String)` because this methods sets a new variable which should be searched. All other changes are gardening and comments.
      - 2013-01-25 Hartmut improved: Error message in `refreshFromVariable(VariableContainer_ifc)` only on paint-complete of the view. If the implementation receives a paintAll command by mouseClick on the graphic or because the graphic is shown the first time, the `#setPaintAllCmd()` is invoked there. The variable `bNewGetVariables` is set, that causes the error message. Before: no error message was created, the error was obscure.
      - 2012-08-11 Hartmut now grid with timestamps
      - 2012-06-08 Hartmut new: `applySettings(String)` and `writeSettings(Appendable)` for saving and getting the configuration of curve view from a file or another text.
      - 2012-04-01 Hartmut new: Using `VariableAccessWithIdx` to access values.
      - 2012-03-25 Hartmut chg: Some routines from SWT moved to this because there are independent.
      - 2012-03-17 Hartmut chg: All track-associated data now in the `GralCurveView.Track` inner class.
      - 2012-02-25 Hartmut new: All data have a short timestamp. The x-pixel are calculated with timestamp, not only with currently storage.
      - 2012-02-25 Hartmut new: Zoom functinality with timestamp and cursors
      - 2012-02-21 Hartmut Now the CurveView works in the new environment. Some adjustments necessary yet.
      - 2011-06-00 Hartmut New concept of GralWidget etc and new Configuration concept with `GralCfgBuilder`. The old GuiDialogZbnfControlled.class was not use nevermore. But the CurveView was not adapted for that.
      - 2010-03-00 Hartmut The curve view was development as basic feature.
      Copyright/Copyleft: For this source the LGPL Lesser General Public License, published by the Free Software Foundation is valid. It means:
      1. You can use this source without any restriction for any desired purpose.
      2. You can redistribute copies of this source to everybody.
      3. Every user of this source, also the user of redistribute copies with or without payment, must accept this license for further using.
      4. But the LPGL is not appropriate for a whole software product, if this source is only a part of them. It means, the user must publish this part of source, but doesn't need to publish the whole source of the own product.
      5. You can study and modify (improve) this source for own using or for redistribution, but you have to license the modified sources likewise under this LGPL Lesser General Public License. You mustn't delete this Copyright/Copyleft inscription in this source file.
      If you intent to use this source without publishing its usage, you can get a second license subscribing a special contract with the author.
      See Also:
        Constant Field Values

    - #### zbnfSetCurve

          final GralCurveView.ZbnfSetCurve zbnfSetCurve

    - #### timeorg

          public GralCurveView.TimeOrganisation timeorg

    - #### dataOrg

          protected final GralCurveView.DataOrganisation dataOrg

    - #### saveOrg

          protected GralCurveView.SaveOrganisation saveOrg

    - #### common

          public final GralCurveView.CommonCurve common

      All tracks to return for filling. It has the same members in the same order like `listTracks`

    - #### bActive

          public boolean bActive

      True then saves values.

    - #### nrofValues

          public int nrofValues

      Current number of values in the data field. If less values are set (`#setSample(float[])`, then the nrofValues is less than values.length. Else it is ==values.length.

    - #### bNewGetVariables

          private boolean bNewGetVariables

    - #### timeValues

          public final int[] timeValues

      A short timestamp for the values in `GralCurveView.Track.values`. It maybe a millisecond timestamp. Then about 2000000 seconds are able to display. This array and the `Track#actValue` array are filled wrapping.
      A negative difference between 2 successive time stamps designates the time break point between newer values and the successive currently points to the newest one in ascending direction (past to future). Initially this array will be filled with successive values from 0 to negatives in step -1 to designate a time break at all points.
      At startup of filling 3 data points this array is filled for example with

           -1234, -1245, -1256, -3, -4, -5, ...

      In this example the wrapping time stamps are negative but successive ascending of course. The not used 4. point is accepted as a correct point faulty, it produces a presentation to the value 0 because nothing is stored in data in 1253 time units (which may be milliseconds). This faulty presentation is only present on startup of graphic and only if the difference is in range of presentation width, see `#prepareIndicesDataForDrawing(int, int)`

    - #### gridDistanceStrongY

          public int gridDistanceStrongY

      Distance of nrofValues for one vertical strong grid line. This value is used to limit nrofValuesForGrid.

    - #### maxNrofXValues

          public final int maxNrofXValues

      Deepness of the storage of values to present. It is a power of 2 anytime.

    - #### testStopWr

          public boolean testStopWr

    - #### ixDataWr

          public int ixDataWr

      Write index of values, increment by `setSample(float[], int)`. The index refers to the last written value. Initially it is -1, the first write will be increment ?? to prevent any exception while values are not set before.

    - #### shIxiData

          public final int shIxiData

      The number of shift right to get the numeric index in values.

    - #### mIxiData

          public final int mIxiData

      Mask of index in values.

    - #### mIxData

          protected final int mIxData

      Mask of any ixData.

    - #### newSamples

          public int newSamples

    - #### nrofValuesForGrid

          protected int nrofValuesForGrid

    - #### adIxData

          public final int adIxData

      The increment step of ixData. Concept of wrap around: The values[]-array are used wrap around, to prevent expensive shift operations. The size of the array is a power of 2 anytime. The index is hold in an integer variable, which wraps around in the bit space too. To use cheap increment and compare functionality, the range for the index is the full integer range. To step from one to next index, use this adding value.

    - #### listTracks

          public java.util.List<GralCurveView.Track> listTracks

      All tracks. Anytime if the tracks are changed a new List is created. It is because the list can be used in another thread yet in an iterator.

    - #### mouseAction

          protected final GralCurveView.GralCurveViewMouseAction mouseAction

    - #### actionMoveCursor

          private GralUserAction actionMoveCursor

      This action is called whenever a cursor position is changed.

    - #### actionSelectTrack

          private GralUserAction actionSelectTrack

      This action is called whenever a track was selected.

    - #### actionZoomBetweenCursors

          public GralUserAction actionZoomBetweenCursors

    - #### actionZoomOut

          public GralUserAction actionZoomOut

    - #### actionCleanBuffer

          public GralUserAction actionCleanBuffer

    - #### actionGo

          public GralUserAction actionGo

    - #### actionPaintAll

          public GralUserAction actionPaintAll

  - ### Constructor Detail

    - #### GralCurveView

          public GralCurveView(java.lang.String sName,
                               int maxNrofXvaluesP,
                               GralCurveView.CommonCurve common)

  - ### Method Detail

    - #### cleanBuffer

          public void cleanBuffer()

    - #### initMenuContext

          public void initMenuContext()

      It will be called after construction of the implementation graphic in the derived ctor.

    - #### getCommonData

          public GralCurveView.CommonCurve getCommonData()

    - #### setActionMoveCursor

          public void setActionMoveCursor(GralUserAction action)

      This action will be called whenever a cursor position is changed.

    - #### setActionTrackSelected

          public void setActionTrackSelected(GralUserAction action)

      This action will be called whenever a track was selected. The selection will be done by pressing the left mouse with ctrl on a curve view point.

    - #### addTrack

          public GralCurveView.Track addTrack(java.lang.String sNameTrack,
                                              java.lang.String sDataPath,
                                              GralColor color,
                                              int style,
                                              int nullLine,
                                              float scale,
                                              float offset)

      Creates and adds a track of the curve view. Note: The current `listTracks` instance won't be changed. Instead, a new ArrayList is created here with the content of listTracks and the new track. This is because the `listTracks` instance may be used in a iterator in another thread. That is in `setSample(float[], int)` which can be invoked in a cyclically or receiving thread, or in `refreshFromVariable(VariableContainer_ifc)` which is invoked in the Inspector Gui cyclically to get values from target. If during operation a track was add by the users operation on GUI, it should not disturb the current process. This routine should be called only one time per track to create a new one. in the order of tracks. Note: renamed from initTrack, 2018-09
      Parameters:
        `sNameTrack` -
        `sDataPath` -
        `color` -
        `style` -
        `nullLine` -
        `scale` -
        `offset` -
      Returns:
        The track instance.

    - #### searchTrack

          private GralCurveView.Track searchTrack(java.lang.String name)

      Searches and returns the track from listTrack per name.
      Parameters:
        `name` -
      Returns:
        null if not found.

    - #### setTimePerPixel

          public void setTimePerPixel(int time)

    - #### setTimeSpread

          public void setTimeSpread(int time)

    - #### getTimeVariable

          public java.lang.String getTimeVariable()

      Returns the path of the time variable if given or null.

    - #### getTracks

          public java.util.List<GralSetValue_ifc> getTracks()

      This list describes the data paths in that order, which should be regard calling `#setSample(float[])`. return a new List which should not modify. Modify has no sense because the list is not used inside this class.

    - #### getTrackInfo

          public java.lang.Iterable<? extends GralCurveViewTrack_ifc> getTrackInfo()

      This Iterable describes the data paths in that order, which should be regard calling `#setSample(float[])`.

    - #### getTrackSelected

          public GralCurveView.Track getTrackSelected()

      Returns that track which was selected by set cursor at last.
      Returns:
        null if a track was not selected up to now, elsewhere one of the created tracks.

    - #### shouldAutosave

          public boolean shouldAutosave()

    - #### timeRight

          public long timeRight()

    - #### setTimePoint

          public void setTimePoint(long date,
                                   int timeshort,
                                   float millisecPerTimeshort)

      Description copied from interface: `GralCurveView_ifc`
      Sets a point of absolute time. This routine should be called at least 2 times in an wrapping area of timeshort. If timeshort are milliseconds, this is about 2000000 seconds. It means, it isn't often. You should call this routine cyclically in an slower cycle. Then the graphic can showt the
      Specified by:
        `setTimePoint` in interface `GralCurveView_ifc`
      Parameters:
        `date` - The absolute time appropriate to the timeshort value.
        `timeshort` - The wrapping short time at this moment of data.
        `millisecPerTimeshort` - Number of milliseconds per step of timeshort.

    - #### setSample

          public void setSample(float[] values,
                                int timeshort)

      Description copied from interface: `GralCurveView_ifc`
      Adds a sampling value set.
      This method can be called in any thread. It updates only data, a GUI-call isn't done. But the method is not thread-safe. If more as one threads writes data, an external synchronization should be done which may encapsulate more as only this call.
      The caller should force repaint to show the data in the graphic thread. It is possible and sensitive to force repaint after writing some done one after another if the data are given faster than the users view eye.
      Specified by:
        `setSample` in interface `GralCurveView_ifc`
      Parameters:
        `values` - The values.
        `timeshort` - relative time-stamp as currently wrapping time in milliseconds.
      See Also:
        `GralCurveView_ifc.setSample(float[], int)`

    - #### refreshFromVariable

          public void refreshFromVariable(VariableContainer_ifc container)

      Description copied from interface: `GralWidget_ifc`
      Capability for any widget to update its content from its associated variables described in its sDataPath.
      Specified by:
        `refreshFromVariable` in interface `GralWidget_ifc`
      Overrides:
        `refreshFromVariable` in class `GralWidget`
      Parameters:
        `container` - The container is used only if the variable is not known by direct reference in the private `GralWidget.variable` or `GralWidget.variables`. If the variable(s) is/are not known, they are searched by there data path set by `GralWidget_ifc.setDataPath(String)`. More as one variables are possible separated by "," in the setDataPath("variable1, variable2"). The variables are searched in the container calling `VariableContainer_ifc.getVariable(String)`.
      See Also:
        `GralWidget.refreshFromVariable(org.vishia.byteData.VariableContainer_ifc)`

    - #### setBackgroundColor

          public GralColor setBackgroundColor(GralColor color)

      Specified by:
        `setBackgroundColor` in interface `GralWidget_ifc`
      Overrides:
        `setBackgroundColor` in class `GralWidget`

    - #### setForegroundColor

          public GralColor setForegroundColor(GralColor color)

      Specified by:
        `setForegroundColor` in interface `GralWidget_ifc`
      Overrides:
        `setForegroundColor` in class `GralWidget`

    - #### setBoundsPixel

          public void setBoundsPixel(int x,
                                     int y,
                                     int dx,
                                     int dy)

      Specified by:
        `setBoundsPixel` in interface `GralWidget_ifc`
      Overrides:
        `setBoundsPixel` in class `GralWidget`

    - #### activate

          public void activate(boolean activate)

      Description copied from interface: `GralCurveView_ifc`
      Activates or deactivates. Only if the curve view is activated, it writes in time. If it is not active, than the curve can be watched, zoomed etc.
      Specified by:
        `activate` in interface `GralCurveView_ifc`
      Parameters:
        `activate` - true to activate, false to deactivate.

    - #### isActiv

          public boolean isActiv()

      Description copied from interface: `GralCurveView_ifc`
      Returns true if the curve view is active. See `GralCurveView_ifc.activate(boolean)`.
      Specified by:
        `isActiv` in interface `GralCurveView_ifc`

    - #### isFreezed

          public boolean isFreezed()

      Description copied from interface: `GralCurveView_ifc`
      Returns true if the curve view is active but freezed in presentation.
      Specified by:
        `isFreezed` in interface `GralCurveView_ifc`

    - #### applySettings

          public boolean applySettings(java.lang.String in)

      Description copied from interface: `GralCurveView_ifc`
      Applies the settings from the given String (maybe read from a file) and sets all tracks newly.
      Specified by:
        `applySettings` in interface `GralCurveView_ifc`
      Parameters:
        `in` - Input, syntax see `GralCurveView_ifc.syntaxSettings`
      Returns:
        true on success.

    - #### writeSettings

          public void writeSettings(java.lang.Appendable out)

      Description copied from interface: `GralCurveView_ifc`
      Writes the settings of the curve view in an output, maybe a file. The syntax is matching to `GralCurveView_ifc.applySettings(String)`.
      Specified by:
        `writeSettings` in interface `GralCurveView_ifc`
      Parameters:
        `out` - any output stream.

    - #### timeInitSaveViewArea

          public java.lang.CharSequence timeInitSaveViewArea()

    - #### timeInitAutoSave

          public java.lang.CharSequence timeInitAutoSave()

      Description copied from interface: `GralCurveView_ifc`
      Initializes an auto-save data write process. The time range will be set from the last autosave or from the start of recording to the actual last value of curve yet written. After them some invocations of `GralCurveView_ifc.writeCurve(WriteCurve_ifc, org.vishia.gral.ifc.GralCurveView_ifc.ModeWrite)` with `GralCurveView_ifc.ModeWrite.autoSave` can be done with this current time range.
      Specified by:
        `timeInitAutoSave` in interface `GralCurveView_ifc`
      Returns:
        The absolute time of start of curve.

    - #### buildDate

          private java.lang.CharSequence buildDate(int ixStart,
                                                   int ixEnd)

    - #### readCurve

          public void readCurve(java.io.File file)
                         throws java.io.IOException

      Reads a curve ///
      Throws:
        `java.io.IOException`

    - #### readCurveCsvHeadline

          private void readCurveCsvHeadline(java.io.File file)
                                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeCurve

          public void writeCurve(WriteCurve_ifc out,
                                 GralCurveView_ifc.ModeWrite mode)

      Description copied from interface: `GralCurveView_ifc`
      Writes the curve to the given interface, it is an exporter class.
      Specified by:
        `writeCurve` in interface `GralCurveView_ifc`
      Parameters:
        `out` - exporter class reference
        `mode` - autosave: Then the data range from `GralCurveView_ifc.timeInitAutoSave()` is used. currentView: Then the data range visible in window will be used.

    - #### writeCurve

          private void writeCurve(WriteCurve_ifc out,
                                  int ixDataStart,
                                  int ixDataEnd)

      Writes.
      Parameters:
        `out` -
        `ixDataStart` - 32-bit-wrapping index
        `ixDataEnd` -

    - #### repaint

          public void repaint(int delay,
                              int latest)

      Forces repaint of the whole curves. It sets the internal flag `#bPaintAllCmd` which is checked in the paint event routine. In opposite `setSample(float[], int)` invokes super.repaint of `GralWidget.repaint(int, int)` without setting that flag. Therefore the graphic will be shifted to left only with paint of only the new data.
      Specified by:
        `repaint` in interface `GralWidget_ifc`
      Overrides:
        `repaint` in class `GralWidget`
      Parameters:
        `delay` - in milliseconds. If 0 or less 0, then it is executed immediately if the calling thread is the graphic thread.
        `latest` - The latest draw time in milliseconds. If it is less 0, then it is unused. If it is 0 or less delay if a delay is given, then the delay isn't wound up on re-call.
      See Also:
        `GralWidget.repaint(int, int)`