Package dataPlotsFX.projector
Class TDProjectorFX
java.lang.Object
PamView.GeneralProjector<PamCoordinate>
dataPlotsFX.projector.TimeProjectorFX
dataPlotsFX.projector.TDProjectorFX
- Direct Known Subclasses:
FFTScrollBarGraphics.AcousticScrollerProjector
Projector which handles all time to pixel conversions for the display.
This is essentially a wrapper for a time axis and a y axis.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Nested classes/interfaces inherited from class PamView.GeneralProjector
GeneralProjector.ParameterType, GeneralProjector.ParameterUnits
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
Frequency unitsstatic final String
Fields inherited from class PamView.GeneralProjector
NPARAMETERS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Any display that is using click hovering should call this at the start of their paintComponent(Graphics g) function.static String
getAxisName
(GeneralProjector.ParameterType axisType) Get the string name for axis.getCoord3d
(double timeMillis, double dataValue, double d3) Function ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates.getCoord3d
(PamCoordinate dataObject) Same as getCoordinate3d but using the generic typegetDataPosition
(PamCoordinate screenPosition) Do the exact opposite of getCoord3d and turn a screen position back into a data coordinate (e.g.double
Get the length of the time axis in pixels.double
Get the height of the display.This should effectively be a list of everything that just got displayed on whatever was using this projector.long
Get the minimum time in millisecondsjavafx.geometry.Orientation
Get the time axis.double
getTimePix
(double timeMillis) Get the location in pixels for a time in millis.static String
getUnitName
(GeneralProjector.ParameterUnits axisType) Get the string name for axis.double
Get time range in milliseconds.double
getWidth()
Get the width of the display.javafx.scene.shape.Rectangle
getWindow
(int iPlot) Get the dimensions of the TDGaph(); :javafx.scene.shape.Rectangle
The window rectangle in pixels.getYAxis()
Get the time axis.double
getYPix
(double yVal) Get the pixel value for the y Co-Ordinate.boolean
isWrap()
void
setWindowRect
(javafx.scene.shape.Rectangle windowRect) Methods inherited from class dataPlotsFX.projector.TimeProjectorFX
setTimeAxis
Methods inherited from class PamView.GeneralProjector
addHoverData, addHoverData, addHoverData, addHoverData, addHoverData, addHoverData, findClosestDataUnitIndex, findClosestDataUnitIndex, getDataSelector, getHoverDataSynchroniser, getHoveredDataUnit, getHoverText, getHoverText, getMouseHoverAdapter, getPamSymbolChooser, getParameterTypes, getParameterUnits, getParmeterType, getParmeterUnits, getProjectorDrawingOptions, isViewer, setDataSelector, setPamSymbolChooser, setParmeterType, setParmeterUnits, setProjectorDrawingOptions
-
Field Details
-
UNITS_ANGLE
- See Also:
-
UNITS_TEMPERATURE
- See Also:
-
UNITS_FREQ
Frequency units- See Also:
-
-
Constructor Details
-
TDProjectorFX
-
TDProjectorFX
public TDProjectorFX()
-
-
Method Details
-
getTimeAxis
Get the time axis.- Overrides:
getTimeAxis
in classTimeProjectorFX
- Returns:
- the time axis.
-
getYPix
public double getYPix(double yVal) Get the pixel value for the y Co-Ordinate.- Parameters:
yVal
-- Returns:
-
getYAxis
Get the time axis.- Returns:
- the time axis.
-
getWindow
public javafx.scene.shape.Rectangle getWindow(int iPlot) Get the dimensions of the TDGaph(); :- Returns:
- the dimensions of the TDGraph.
-
getVisibleTime
public double getVisibleTime()Get time range in milliseconds.- Overrides:
getVisibleTime
in classTimeProjectorFX
- Returns:
- time range (max-min) in millis.
-
getMinTime
public long getMinTime()Get the minimum time in milliseconds- Returns:
- the minimjum time in milliseconds.
-
getGraphTimePixels
public double getGraphTimePixels()Get the length of the time axis in pixels.- Overrides:
getGraphTimePixels
in classTimeProjectorFX
- Returns:
- the length of the axis in pixel.
-
getTimePix
public double getTimePix(double timeMillis) Get the location in pixels for a time in millis.- Overrides:
getTimePix
in classTimeProjectorFX
- Parameters:
timeMillis
- - the time along the axis in millis (Note: the axis start at timeMillis=0).- Returns:
- - the pixel location along the x axis (if horizontal)
-
getDataPosition
Description copied from class:GeneralProjector
Do the exact opposite of getCoord3d and turn a screen position back into a data coordinate (e.g. a time / freq, a lat long, etc)/.- Specified by:
getDataPosition
in classGeneralProjector<PamCoordinate>
- Parameters:
screenPosition
- screen position- Returns:
- data object.
-
getCoord3d
Description copied from class:GeneralProjector
Same as getCoordinate3d but using the generic type- Specified by:
getCoord3d
in classGeneralProjector<PamCoordinate>
- Parameters:
dataObject
- object extending PamCoordinate- Returns:
- 3d coordinate.
-
getCoord3d
Description copied from class:GeneralProjector
Function ultimately used by a PamDataBlock to convert it's own data, in whatever form that is in into screen coordinates.- Specified by:
getCoord3d
in classGeneralProjector<PamCoordinate>
- Parameters:
timeMillis
- d2 and d3 are data representing whatever is appropriate for the concrete instance of the projector (e.g. Latitude, Longitude, depth, Time Frequency, etc)- Returns:
- A 3 dimensional coordinate (realistically z is never currently used)
-
getYAxisName
-
isWrap
public boolean isWrap() -
getUnitName
Get the string name for axis.- Parameters:
axisType
- - the axis type- Returns:
- the axis type string.
-
getAxisName
Get the string name for axis.- Parameters:
axisType
- - the axis type- Returns:
- the axis type string.
-
getOrientation
public javafx.geometry.Orientation getOrientation() -
getWidth
public double getWidth()Get the width of the display.- Returns:
- the width of the display in pixels.
-
getHeight
public double getHeight()Get the height of the display.- Returns:
- the height of the display in pixels.
-
getWindowRect
public javafx.scene.shape.Rectangle getWindowRect()The window rectangle in pixels.- Returns:
- the window rectangle in pixels.
-
getHoverDataList
Description copied from class:GeneralProjector
This should effectively be a list of everything that just got displayed on whatever was using this projector. Get's used when marking stuff out.- Overrides:
getHoverDataList
in classGeneralProjector<PamCoordinate>
- Returns:
- the hoverData
-
clearHoverList
public void clearHoverList()Description copied from class:GeneralProjector
Any display that is using click hovering should call this at the start of their paintComponent(Graphics g) function. The list will be repopulated as data are drawn in the PanelOverlayDraw implementations.- Overrides:
clearHoverList
in classGeneralProjector<PamCoordinate>
- See Also:
-
setWindowRect
public void setWindowRect(javafx.scene.shape.Rectangle windowRect)
-