Package dataPlotsFX.data
Class TDScaleInfo
java.lang.Object
dataPlotsFX.data.TDScaleInfo
- Direct Known Subclasses:
GenericScaleInfo
,LinePlotScaleInfo
,Scrolling2DScaleInfo
,TriggerDataScaleInfo
Information about the scale requirements
of a set of plotable data. Contains
an ever increasing set of options !
- Author:
- Doug Gillespie and Jamie Macaulay
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.DoubleProperty
Get the maximum value property for the scale information.javafx.beans.property.DoubleProperty
Get the minimum value property for the scale information.javafx.beans.property.IntegerProperty
Integer property for the number of plots. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Override other nPlots and display number of panelsstatic final int
Priority for number of plots is dependent on position of associatedTDDataInfo
in data info list. -
Constructor Summary
ConstructorDescriptionTDScaleInfo
(double minVal, double maxVal, GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits) TDScaleInfo
(double minVal, double maxVal, GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits, int nPlots) -
Method Summary
Modifier and TypeMethodDescriptionvoid
The divisor listener.void
Automatically calculate the unit divisor.Get the name of the axis.static String
getAxisName
(DataTypeInfo axisType) The data type e.g.The DataTypeInfo.The data units.Get a string representing the divisor unit.double
Get the maximum value of the y axis (x axis when vertical).double
Get the minimum value of the y axis (x axis when vertical).int
The number of plot panes.int
Get the number of visible plotsint[]
Get the channels/sequence numbers associated with each plot pane.int
Get the plot priority.The plot is used to determine how many plot panes should show in a graph when there are multiple data blocks displayed.boolean
Get the reverse axis.Get the scale info data.double
Get a unit divisor for display purposes.static String
getUnitName
(DataTypeInfo axisType) boolean[]
Get plot panes which are shown on the graph .boolean[]
The visible plots.boolean
Is this scale type currently available ? This is needed for data types which may change their localisation content dynamically.javafx.beans.property.DoubleProperty
Get the maximum value property for the scale information.javafx.beans.property.DoubleProperty
Get the minimum value property for the scale information.javafx.beans.property.IntegerProperty
Integer property for the number of plots.void
setMaxVal
(double maxVal) Set the maximum value of the y axis (x axis when vertical).void
setMinVal
(double minVal) Set the minimum value of the y axis (x axis when vertical).void
setnPlots
(int nPlots) Set the number of plot panes.void
setPlotChannels
(int[] plotChannels) Set the channels/sequences associated with each plot pane.void
setPlotPriority
(int plotPriority) Set the plot priority.void
setReverseAxis
(boolean reverseAxis) If true then the axis is reversedvoid
setScaleInfoData
(TDScaleInfoData scaleInfoData) Set the scale info values based on scale info data.void
setUnitDivisor
(double unitDivisor) Set a unit divisor for display purposes.
-
Property Details
-
minVal
public javafx.beans.property.DoubleProperty minValPropertyGet the minimum value property for the scale information.- See Also:
-
maxVal
public javafx.beans.property.DoubleProperty maxValPropertyGet the maximum value property for the scale information.- See Also:
-
nPlots
public javafx.beans.property.IntegerProperty nPlotsPropertyInteger property for the number of plots. This is NOT the number of visible plots.- See Also:
-
-
Field Details
-
BASE_PRIORITY
public static final int BASE_PRIORITYOverride other nPlots and display number of panels- See Also:
-
INLIST_PRIORITY
public static final int INLIST_PRIORITYPriority for number of plots is dependent on position of associatedTDDataInfo
in data info list.- See Also:
-
-
Constructor Details
-
TDScaleInfo
public TDScaleInfo(double minVal, double maxVal, GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits) -
TDScaleInfo
public TDScaleInfo(double minVal, double maxVal, GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits, int nPlots)
-
-
Method Details
-
addDivisorListener
public void addDivisorListener()The divisor listener. -
calcDivisor
public void calcDivisor()Automatically calculate the unit divisor. -
getDivisorString
Get a string representing the divisor unit. -
minValProperty
public javafx.beans.property.DoubleProperty minValProperty()Get the minimum value property for the scale information.- Returns:
- minimum axis value property
-
maxValProperty
public javafx.beans.property.DoubleProperty maxValProperty()Get the maximum value property for the scale information.- Returns:
- maximum axis value property
-
getMinVal
public double getMinVal()Get the minimum value of the y axis (x axis when vertical).- Returns:
- the minVal
-
setMinVal
public void setMinVal(double minVal) Set the minimum value of the y axis (x axis when vertical).- Parameters:
minVal
- the minVal to set
-
getMaxVal
public double getMaxVal()Get the maximum value of the y axis (x axis when vertical).- Returns:
- the maximum value.
-
setMaxVal
public void setMaxVal(double maxVal) Set the maximum value of the y axis (x axis when vertical).- Parameters:
maxVal
- the maxVal to set
-
getNPlots
public int getNPlots()The number of plot panes.- Returns:
- the number of separate plot graphs to display.
-
setnPlots
public void setnPlots(int nPlots) Set the number of plot panes.- Parameters:
nPlots
- the number of plot graphs to show.
-
getPlotPriority
public int getPlotPriority()Get the plot priority.The plot is used to determine how many plot panes should show in a graph when there are multiple data blocks displayed. Note: if a base priority then it is the responsibility of the associated TDDataInfo to draw a wrap line.- Returns:
- the plot priority.
-
setPlotPriority
public void setPlotPriority(int plotPriority) Set the plot priority.- Parameters:
plotPriority
-
-
getPlotChannels
public int[] getPlotChannels()Get the channels/sequence numbers associated with each plot pane. 0 indicates pane can show all channels (although will not necessarily show all channels depending on TDDataInof settings).- Returns:
- a list of channel/sequence bitmaps indicating which channels are associated with which plot panes.
-
getVisibleChannels
public boolean[] getVisibleChannels()Get plot panes which are shown on the graph . -
setPlotChannels
public void setPlotChannels(int[] plotChannels) Set the channels/sequences associated with each plot pane.- Parameters:
plotChannels
- a list of channel/sequence bitmaps indicating which channels are associated with which plot panes.
-
setUnitDivisor
public void setUnitDivisor(double unitDivisor) Set a unit divisor for display purposes. e.g 1000 would divide by 1000 and make Hz kHz.- Parameters:
unitDivisor
- - unit divisor.
-
getUnitDivisor
public double getUnitDivisor()Get a unit divisor for display purposes. e.g 1000 would divide by 1000 and make Hz kHz.- Returns:
- unitDivisor - unit divisor.
-
getDataTypeInfo
The DataTypeInfo. Contains both data type and unit.- Returns:
- the dataTypeInfo for the scale information.
-
getDataType
The data type e.g. bearing.- Returns:
- the data type
-
getDataUnit
The data units. e.g. Hz- Returns:
- the data units.
-
isAvailable
public boolean isAvailable()Is this scale type currently available ? This is needed for data types which may change their localisation content dynamically. For instance, if a datablock has a beam former added to it's output, it will then have bearing information which it would not have if the datablock was not linked up to a localiser.- Returns:
- True if it's currently possible to plot data units on this axis type.
-
getAxisName
Get the name of the axis.- Returns:
- name of the axis.
-
getAxisName
-
getUnitName
-
nPlotsProperty
public javafx.beans.property.IntegerProperty nPlotsProperty()Integer property for the number of plots. This is NOT the number of visible plots.- Returns:
- the number of plots property
-
getVisiblePlots
public boolean[] getVisiblePlots()The visible plots. This follows follows @link getPlotChannels. True indicates a plot is shown and false indicates a plot is not visible.- Returns:
- an array indicating which plots are shown and which are not.
-
getNVisiblePlots
public int getNVisiblePlots()Get the number of visible plots- Returns:
- the number of visible plots.
-
getScaleInfoData
Get the scale info data.- Returns:
- the scaleInfoData
-
setScaleInfoData
Set the scale info values based on scale info data.- Parameters:
scaleInfoData
- the scaleInfoData to set
-
setReverseAxis
public void setReverseAxis(boolean reverseAxis) If true then the axis is reversed- Parameters:
b
- - true to reverse the axis
-
getReverseAxis
public boolean getReverseAxis()Get the reverse axis.- Returns:
- the reverse axis.
-