Class ScrollingPlotSegmenter.PlotSegment

java.lang.Object
dataPlotsFX.clickPlotFX.ScrollingPlotSegmenter.PlotSegment
All Implemented Interfaces:
Comparable<ScrollingPlotSegmenter.PlotSegment>
Enclosing class:
ScrollingPlotSegmenter

public class ScrollingPlotSegmenter.PlotSegment extends Object implements Comparable<ScrollingPlotSegmenter.PlotSegment>
A single segmenting of writable image. Contains a list of data that have already been painted on the image.
Author:
Jamie Macaulay
  • Constructor Details

    • PlotSegment

      public PlotSegment(int xpixels, int nNums, int pixelstart)
      Create a writable image segment.
      Parameters:
      xpixels - - the xpixels
      ypixels - - the y pixels
      timestart - - the start time of the image in pixels from the first image in the whole segment list.
  • Method Details

    • setPixelStart

      public void setPixelStart(int pixelstart)
      Set the pixel start time of the image. This is the pixel start from the very first image.
      Parameters:
      pixelstart - - the pixel start.
    • getPixelStart

      public int getPixelStart()
      Get the start time in pixels.
    • getMillisStart

      public double getMillisStart()
      Convenience function the start time in milliseconds.
      Returns:
      the start time of the image in millis
    • getMillisEnd

      public double getMillisEnd()
      Convenience function the start time in milliseconds.
      Returns:
      the end time of the image in millis
    • getWidth

      public int getWidth()
      Get the width in pixels
      Returns:
      the width in pixels.
    • compareTo

      public int compareTo(ScrollingPlotSegmenter.PlotSegment writableImage)
      Specified by:
      compareTo in interface Comparable<ScrollingPlotSegmenter.PlotSegment>
    • searchArrayReuseSet

      public boolean searchArrayReuseSet(long uidval)
      Check whether the UID value has been painted.
    • addDrawnUnit

      public boolean addDrawnUnit(long uidval)
      Add a unit to the array reuse set...this will result in the data unit not being drawn again until the buffer is reset.
      Parameters:
      uidval - - the UID value
      Returns:
      true if the set did not already contain the UID value
    • getScrollingPLot2DSegmenter

      public ScrollingPlotSegmenter getScrollingPLot2DSegmenter()
    • getExtraInfo

      public Number getExtraInfo()
      Get the extra info
      Returns:
      - the extra info
    • setExtraInfo

      public void setExtraInfo(Number extraInfo)
      Set the extra info.
      Parameters:
      extraInfo - - the extra info to send.
    • getData

      public float[][] getData()
      Get the data.
      Returns:
      the data.
    • getColor

      public javafx.scene.paint.Paint[] getColor()
      Get the colours for each segment of data,
      Returns:
      - the color for each data section.