Package dataPlotsFX.scrollingPlot2D
Class StandardPlot2DColours
java.lang.Object
dataPlotsFX.scrollingPlot2D.StandardPlot2DColours
- All Implemented Interfaces:
Plot2DColours
Colours for a 2D surface plot between two z limits.
- Author:
- Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionStandardPlot2DColours
(PlotParams2D spectParams) StandardPlot2DColours
(javafx.beans.property.DoubleProperty[] amplitudeLimits2) StandardPlot2DColours
(ColourArray.ColourArrayType colourMap, double minAmp, double maxAmp) Constructor for StandardSpecColours -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.DoubleProperty[]
javafx.scene.paint.Color[]
Get the colour for the spectrogram.static int
getColourIndex
(double dBLevel, double minAmp, double maxAmp, int arrayLen) Get the index for a colour within a colourmap for a specified dB level.javafx.scene.paint.Color
getColours
(double dBLevel) Get the colour triplet for a particular db value.javafx.scene.paint.Color
Get the wrap colour for the spectrogram.void
setColourMap
(ColourArray.ColourArrayType colourMap) Set the current colour map.
-
Constructor Details
-
StandardPlot2DColours
public StandardPlot2DColours() -
StandardPlot2DColours
public StandardPlot2DColours(javafx.beans.property.DoubleProperty[] amplitudeLimits2) - Parameters:
amplitudeLimits2
-
-
StandardPlot2DColours
-
StandardPlot2DColours
Constructor for StandardSpecColours- Parameters:
colourMap
- - the colour map.minAmp
- - the minimum amplitude.maxAmp
- - the maximum amplitude.
-
-
Method Details
-
getWrapColor
public javafx.scene.paint.Color getWrapColor()Description copied from interface:Plot2DColours
Get the wrap colour for the spectrogram. This is the colour of the line which shows the current time location in wrap mode and should contrast with the spectrogram if possible (obviously that's a bit hard when using a multicoloured colour scheme!)- Specified by:
getWrapColor
in interfacePlot2DColours
- Returns:
- the wrap colour.
-
getColourIndex
public static int getColourIndex(double dBLevel, double minAmp, double maxAmp, int arrayLen) Get the index for a colour within a colourmap for a specified dB level.- Parameters:
minAmp
- - the minimum dB of the colourmap.maxAmp
- - the maximum dB of the colourmap.arrayLen
- - the length of the colour map.dBlevel
- - the dB level of the signal.- Returns:
- - the index of the correct colour for the dBLevel.
-
getColours
public javafx.scene.paint.Color getColours(double dBLevel) Get the colour triplet for a particular db value.- Specified by:
getColours
in interfacePlot2DColours
- Parameters:
dBLevel
-- Returns:
- colour triplet.
-
getColourMap
-
setColourMap
Set the current colour map.- Parameters:
colourMap
-
-
getColourArray
public javafx.scene.paint.Color[] getColourArray()Get the colour for the spectrogram.- Returns:
-
getAmplitudeLimits
public javafx.beans.property.DoubleProperty[] getAmplitudeLimits()- Returns:
-