Package dataPlotsFX.layout
Class TDGraphFX
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.BorderPane
pamViewFX.fxNodes.PamBorderPane
dataPlotsFX.layout.TDGraphFX
- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
A TDGraph allows users to plot multiple types of data on a single time based
graph. That means clicks, whistles, FFT, Ishmael detections etc. Each graph
can have multiple panels displaying different data. e.g a spectrogram will
display two channels on two separate panels (otherwise we're just averaging
data between channels) A bearing time display, on the other hand can display
any number of channels on just one panel.
- Author:
- Jamie Macaulay, Doug Gillespie.
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyIntegerProperty
Number of currently visible plots property.Properties inherited from class javafx.scene.layout.BorderPane
bottom, center, left, right, top
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Flag to indicate the display has a darker background.static final int
Flag to indicate the display has a lighter background.Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
ConstructorDescriptionTDGraphFX
(TDControl tdControl, TDDisplayFX mainDisplay, int graphId) Create the graph. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataItem
(TDDataInfoFX dataInfo) Add a data item to be plotted on this display.void
addDataItem
(TDDataProviderFX dataProvider) Add a data item to the graph.static int
canvasMap
(int... canvasRepaint) Calculate the canvas map to repaint.void
Check that the axis of the graph is displaying the correct scale and info.void
Creates a list of y axis values that can be shown on the graph.findDataInfo
(PamDataUnit dataUnit) Find the TDDataInfo for a data unit on the TDGraph.Get a list on y axis types which can be displayed on the graph.Get the hiding pane which allows users to change y axis types and data blocks which are displayed.javafx.scene.canvas.Canvas
getBaseCanvas
(int iPlot) Get the base canvas for the tdGraph.Get the current scale informationdouble
Get the current maximum axis value.double
Get the current minimum axis value.Get the list of data blocks that are displayed in the tdGraphLoop through the list of data blocks that are displayed in this panel, and return the first one that is an FFTDataBlock.Get the axis for this tdGraph;Get the pane which holds the GUI components of the graph axis.int
Get the parameters for this graph.Get the graph projector.long
Get the position of the last wrap in millisecondsint
Get the number of currently visible plots.javafx.geometry.Orientation
Convenience class to get the graph orientation.Get the overlay marker manager.javafx.beans.property.ReadOnlyDoubleProperty
The height property of the plot pane (without time axis)javafx.beans.property.ReadOnlyDoubleProperty
The width property of the plot pane (without y axis)double
Get the hiding pane which allows users to change data block specific display settings.Get the TDMainDsiplay this TDGraphFX belongs to.Get the pane which contains control to change generic graph settings.Get the unique name for the graph.double
Get the position of the wrap in the screen in pixels.boolean
hasAvailableAxisName
(DataTypeInfo units) Check that the list of axis names does not already contain the name of an axisstatic boolean
hasCanvas
(int canvasRepaint, int canvasFlag) Check whether a canvas repaint flag contains a flag.boolean
isPaused()
Check whether the display is paused.boolean
Check whether PG is running in real time.boolean
True if the graph is scrolling.boolean
isWrap()
Convenience function to check whether the graph is wrapping.void
layoutTDGraph
(javafx.geometry.Orientation orientation) Layout main components on the tdGraph, mainly the plot panes and the axis.boolean
Check whether the display should be paused.void
notifyModelChanged
(int changeType) Notifications from the PamController are passed to this function.javafx.beans.property.ReadOnlyIntegerProperty
Number of currently visible plots property.void
Called when we receive an update from the sound playback managerA bit different to the standard getter in that this only gets called just before the configuration is serialized into the .psfx.void
Print a list of the current data infos.void
removeDataItem
(int iRemove) Remove a data block from the graph.void
repaint
(long tm) Repaint all the plot panels and all canvas's within those panels on this graph.void
repaint
(long tm, int flag) Repaint all the plot panels on this graph.void
Repaint all marks on the plot panels, but not underlying dtections.void
selectDataLine
(TDDataInfoFX dataInfo, TDScaleInfo dataLine) Called when the user selects a specific data line for a specific data type.void
setAxisName
(DataTypeInfo axisType) Called when the user sets the type of axis units.void
setGraphParameters
(TDGraphParametersFX graphParams) This only gets called when the serialised settings from .psf file have been loaded, not at any other time !void
setNumberOfPlots
(int numPlots) Set the number of plots within the graph.void
The buttons which sit in a stack pane on top of the display to open hiding panes can be hidden if the display is too dark or too light.void
setOverlayColour
(int displayCol) The buttons which sit in a stack pane on top of the display to open hiding panes can be hidden if the display is too dark or too light.void
showAxisSettingsPane
(boolean show) Expand the axis hiding pane.void
showSettingsPane
(boolean show) Open the settings pane and expand all tabs.void
subscribeScrollDataBlocks
(AbstractPamScrollerFX timeScroller) Subscribe data blocks to the time scroller system so their data get loaded in viewer mode.void
timeRangeSpinnerChange
(long oldMillis, long newMillis) Called whenever the visible time range is changed, usually by the time range spinner on tdDisplay scroll barvoid
timeScrollRangeChanged
(long minimumMillis, long maximumMillis) Called in viewer mode when the time scroll range moves.void
timeScrollValueChanged
(double valueMillis) Called in viewer mode when the time scroller movesboolean
zoomGraph
(boolean zoomIn) Called whenever a zoom request is sentMethods inherited from class pamViewFX.fxNodes.PamBorderPane
setBottomSpace, setLeftSpace, setRightSpace, setTopSpace
Methods inherited from class javafx.scene.layout.BorderPane
bottomProperty, centerProperty, clearConstraints, getAlignment, getBottom, getCenter, getContentBias, getLeft, getMargin, getRight, getTop, leftProperty, rightProperty, setAlignment, setBottom, setCenter, setLeft, setMargin, setRight, setTop, topProperty
Methods inherited from class javafx.scene.layout.Pane
getChildren
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getClassCssMetaData, getCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setEffect, setEventDispatcher, setFocusTraversable, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
nPanels
public javafx.beans.property.ReadOnlyIntegerProperty nPanelsPropertyNumber of currently visible plots property. Note that usually this is one but in cases where channels are usually viewed separately, e.g. the spectrogram, there may be more than one panel. This is the number of visible panels.- See Also:
-
-
Field Details
-
DARK_TD_DISPLAY
public static final int DARK_TD_DISPLAYFlag to indicate the display has a darker background. This would typically be a spectrogram (perhaps not an inverted grey) or if the user has a selected a darker colour for the display background- See Also:
-
LIGHT_TD_DISPLAY
public static final int LIGHT_TD_DISPLAYFlag to indicate the display has a lighter background. e.g. the default background for bearing time display.- See Also:
-
-
Constructor Details
-
TDGraphFX
Create the graph.- Parameters:
tdControl
- - the controlled unit for the displaymainDisplay
- - the main display holding this graph.
-
-
Method Details
-
getTDGraphSettingsPane
Get the pane which contains control to change generic graph settings.- Returns:
- the settings pane for the TDGraph;
-
layoutTDGraph
public void layoutTDGraph(javafx.geometry.Orientation orientation) Layout main components on the tdGraph, mainly the plot panes and the axis.- Parameters:
orientation
- - orientation of graph. Vertical or horizontal.
-
setOverlayColour
public void setOverlayColour(int displayCol) The buttons which sit in a stack pane on top of the display to open hiding panes can be hidden if the display is too dark or too light. e.g. if hiding pane buttons are grey then they are not easy to see when a grey spectrogram is shown. This function sets the correct colour of button for the current screen background;- Parameters:
displayCol
- . The current display colour type. DARK_TD_DISPLAY for darker backgrounds and LIGHT_TD_DISPLAY for light backgrounds.
-
setNumberOfPlots
public void setNumberOfPlots(int numPlots) Set the number of plots within the graph. By default this is one, but some types of data will contain functionality which can change this e.g. a spectrogram displaying multiple channels of data- Parameters:
numPlots
- - number of plots to show.
-
checkAxis
public void checkAxis()Check that the axis of the graph is displaying the correct scale and info. -
getCurrentScaleInfo
Get the current scale information- Returns:
- the current scale information.
-
setAxisName
Called when the user sets the type of axis units. These may not be available in all displayed data, so when this is set, some things may stop showing!- Parameters:
axisType
- the name of the axis to set.
-
addDataItem
Add a data item to the graph.- Parameters:
dataProvider
- - theinvalid @link
#TDDataProviderFX
-
addDataItem
Add a data item to be plotted on this display.- Parameters:
dataInfo
- item to add (basically an augmented data block).
-
removeDataItem
public void removeDataItem(int iRemove) Remove a data block from the graph.- Parameters:
iRemove
- - data block in the data list to remove.
-
setOverlayColour
public void setOverlayColour()The buttons which sit in a stack pane on top of the display to open hiding panes can be hidden if the display is too dark or too light. e.g. if hiding pane buttons are grey then they are not easy to see when a grey spectrogram is shown. This function sets the correct colour of button for the current screen background based on the first active scale info. -
subscribeScrollDataBlocks
Subscribe data blocks to the time scroller system so their data get loaded in viewer mode.- Parameters:
timeScroller
- - the time scroller
-
getFFTDataBlock
Loop through the list of data blocks that are displayed in this panel, and return the first one that is an FFTDataBlock. If one is not found, return null;- Returns:
- an FFTDataBlock, or null
-
getGraphAxis
Get the axis for this tdGraph;- Returns:
- the axis for the graph (y axis when horizontal, x axis when vertical)
-
getGraphProjector
Get the graph projector.- Returns:
- the grtaph projector.
-
getGraphAxisPane
Get the pane which holds the GUI components of the graph axis.- Returns:
- pane containing the graph axis.
-
getScrollStart
public double getScrollStart()- Returns:
- the scrollStart
-
selectDataLine
Called when the user selects a specific data line for a specific data type.- Parameters:
dataInfo
-dataLine
-
-
repaint
public void repaint(long tm) Repaint all the plot panels and all canvas's within those panels on this graph.- Parameters:
tm
- - if within millis of last repaint don't repaint
-
repaint
public void repaint(long tm, int flag) Repaint all the plot panels on this graph.- Parameters:
tm
- - if within millis of last repaint don't repaint
-
repaintMarks
public void repaintMarks()Repaint all marks on the plot panels, but not underlying dtections. -
getDataList
Get the list of data blocks that are displayed in the tdGraph- Returns:
- list of TDDataInfoFX (wrapper for a
invalid @link
#PamDataBlock
-
getAxisNames
Get a list on y axis types which can be displayed on the graph.- Returns:
- an of strings representing the names of available y axis types.
-
createAxisNamesList
public void createAxisNamesList()Creates a list of y axis values that can be shown on the graph. This depends on the data blocks that the graph is already subscribed to. For example if subscribed to a click data block axis names of bearing, amplitude, ICI etc. would be available. -
hasAvailableAxisName
Check that the list of axis names does not already contain the name of an axis- Parameters:
units
- - axis name- Returns:
- true of the list already contains the name of an axis.
-
getTDDisplay
Get the TDMainDsiplay this TDGraphFX belongs to. The Main display contains most of the time axis information.- Returns:
- the TDMainDisplay.
-
getAxisPane
Get the hiding pane which allows users to change y axis types and data blocks which are displayed.- Returns:
- hiding pane which contains nodes for changing settings
-
getSettingsPane
Get the hiding pane which allows users to change data block specific display settings.- Returns:
- hiding pane which contains nodes for changing settings
-
timeScrollValueChanged
public void timeScrollValueChanged(double valueMillis) Called in viewer mode when the time scroller moves- Parameters:
valueMillis
- new scroll value in millis
-
timeScrollRangeChanged
public void timeScrollRangeChanged(long minimumMillis, long maximumMillis) Called in viewer mode when the time scroll range moves.- Parameters:
minimumMillis
- new minimum in millismaximumMillis
- new maximum in millis.
-
prepareGraphParameters
A bit different to the standard getter in that this only gets called just before the configuration is serialized into the .psfx.- Returns:
- graph parameters ready to serialised.
-
setGraphParameters
This only gets called when the serialised settings from .psf file have been loaded, not at any other time !- Parameters:
graphParameters
- the graphParameters to set
-
getGraphParameters
Get the parameters for this graph.- Returns:
- thje paramters for the graph.
-
isPaused
public boolean isPaused()Check whether the display is paused. This will universally apply to all TDGraphs in the main TDDisplay.- Returns:
- true if the display is paused. False if the display is scrolling.
-
timeRangeSpinnerChange
public void timeRangeSpinnerChange(long oldMillis, long newMillis) Called whenever the visible time range is changed, usually by the time range spinner on tdDisplay scroll bar- Parameters:
oldMillis
- - the old value in millisnewMillis
- - the new value in millis
-
showSettingsPane
public void showSettingsPane(boolean show) Open the settings pane and expand all tabs.- Parameters:
show
- - true to show the pane. False to hide everything
-
showAxisSettingsPane
public void showAxisSettingsPane(boolean show) Expand the axis hiding pane. -
getLastWrapMillis
public long getLastWrapMillis()Get the position of the last wrap in milliseconds- Returns:
- the last wrap position in milliseconds.
-
getWrapPix
public double getWrapPix()Get the position of the wrap in the screen in pixels.- Returns:
- wrap positon in pixels.
-
getBaseCanvas
public javafx.scene.canvas.Canvas getBaseCanvas(int iPlot) Get the base canvas for the tdGraph.- Parameters:
iPlot
- - the plot- Returns:
- the base canvas for a TDPlot.
-
getOrientation
public javafx.geometry.Orientation getOrientation()Convenience class to get the graph orientation.- Returns:
- the graph orientation.
-
isWrap
public boolean isWrap()Convenience function to check whether the graph is wrapping.- Returns:
- true if the graph is wrapping. False if scrolling.
-
getPlotWidthProperty
public javafx.beans.property.ReadOnlyDoubleProperty getPlotWidthProperty()The width property of the plot pane (without y axis)- Returns:
- the height property of the plot pane
-
getPlotHeightProperty
public javafx.beans.property.ReadOnlyDoubleProperty getPlotHeightProperty()The height property of the plot pane (without time axis)- Returns:
- the width property of the plot pane
-
nPanelsProperty
public javafx.beans.property.ReadOnlyIntegerProperty nPanelsProperty()Number of currently visible plots property. Note that usually this is one but in cases where channels are usually viewed separately, e.g. the spectrogram, there may be more than one panel. This is the number of visible panels.- Returns:
- the number of visible plots in the TDGraph property. .
- See Also:
-
getNPanels
public int getNPanels()Get the number of currently visible plots. Note that usually this is one but in cases where channels are usually viewed separately, e.g. the spectrogram, there may be more than one panel. This is the number of visible panels.- Returns:
- the number of visible plots in the TDGraph.
-
isRunning
public boolean isRunning()Check whether PG is running in real time.- Returns:
- true if running in real time
-
getGraphId
public int getGraphId()- Returns:
- the graphId
-
getUniqueName
Get the unique name for the graph. This is used for mark observers and symbols managers to identify the display.- Returns:
- the unique name for the graph.
-
getOverlayMarkerManager
Get the overlay marker manager. This handles all mouse and touch interactions with the TDGrpahFX.- Returns:
- the OverlayMarkerManager for the TDGrpahFX.
-
findDataInfo
Find the TDDataInfo for a data unit on the TDGraph. Note that if two TDataInfos are present (they should not be) then the first oin the list is returned.- Parameters:
dataUnit
- - the data unit to find the datainfo for- Returns:
- the TDDataInfoFX which displays the data unit. null if no TDDataInfoFX is found.
-
needPaused
public boolean needPaused()Check whether the display should be paused. This could be due to number of factors, e.g. the user having drawn a mark.- Returns:
- true if the display should be paused.
-
zoomGraph
public boolean zoomGraph(boolean zoomIn) Called whenever a zoom request is sent- Parameters:
zoomIn
- - true to zoom in. @return. True if a zoom has occurred due to an overlay mark. False if no zoom occurred.
-
notifyModelChanged
public void notifyModelChanged(int changeType) Notifications from the PamController are passed to this function.- Parameters:
changeType
- - notification flag.
-
playbackUpdate
public void playbackUpdate()Called when we receive an update from the sound playback managerUse this to update cursors on the main displays
-
getDataAxisMinVal
public double getDataAxisMinVal()Get the current minimum axis value. This should be the same as the values at the end of the Y axis (apart from scaling factors) and should be used in preference to additional bound parameters.- Returns:
- Minimum Y axis value.
-
getDataAxisMaxVal
public double getDataAxisMaxVal()Get the current maximum axis value. This should be the same as the values at the end of the Y axis (apart from scaling factors) and should be used in preference to additional bound parameters.- Returns:
- Maximum Y axis value.
-
isScrolling
public boolean isScrolling()True if the graph is scrolling.- Returns:
- the graph is scrolling.
-
canvasMap
public static int canvasMap(int... canvasRepaint) Calculate the canvas map to repaint.- Parameters:
canvasReapint
- - all canvas flags to repaint e.g. TDPlotPane.BASE_CANAVAS- Returns:
- bitmap of canvas's to repaint. This can be input into repaint function.
-
hasCanvas
public static boolean hasCanvas(int canvasRepaint, int canvasFlag) Check whether a canvas repaint flag contains a flag.- Parameters:
canvasRepaint
- - a bitmap of canvas mapscanvasFlag
- - the canvas flag to check for e.g. TDPlotPane.BASE_CANVAS.- Returns:
- true if the flag is contained in the canvasRepaint.
-
printDataInfos
public void printDataInfos()Print a list of the current data infos.
-