Package dataPlotsFX.clickPlotFX
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 Summary
ConstructorDescriptionPlotSegment
(int xpixels, int nNums, int pixelstart) Create a writable image segment. -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.int
compareTo
(ScrollingPlotSegmenter.PlotSegment writableImage) javafx.scene.paint.Paint[]
getColor()
Get the colours for each segment of data,float[][]
getData()
Get the data.Get the extra infodouble
Convenience function the start time in milliseconds.double
Convenience function the start time in milliseconds.int
Get the start time in pixels.int
getWidth()
Get the width in pixelsboolean
searchArrayReuseSet
(long uidval) Check whether the UID value has been painted.void
setExtraInfo
(Number extraInfo) Set the extra info.void
setPixelStart
(int pixelstart) Set the pixel start time of the image.
-
Constructor Details
-
PlotSegment
public PlotSegment(int xpixels, int nNums, int pixelstart) Create a writable image segment.- Parameters:
xpixels
- - the xpixelsypixels
- - the y pixelstimestart
- - 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
- Specified by:
compareTo
in interfaceComparable<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
-
getExtraInfo
Get the extra info- Returns:
- - the extra info
-
setExtraInfo
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.
-