Class AcousticScrollerFX
java.lang.Object
pamScrollSystem.AbstractPamScroller
pamViewFX.fxNodes.pamScrollers.AbstractPamScrollerFX
pamViewFX.fxNodes.pamScrollers.acousticScroller.AcousticScrollerFX
- All Implemented Interfaces:
Serializable
,DataTimeLimits
- Direct Known Subclasses:
TDAcousticScroller
The acoustic scroll pane shows a summary of all the acoustic data available in a particular scroll period.
- Author:
- Jamie Macaulay
- See Also:
-
Property Summary
TypePropertyDescriptionjavafx.beans.property.BooleanProperty
javafx.beans.property.BooleanProperty
The property value for the scroll bar moving. -
Field Summary
Modifier and TypeFieldDescriptionboolean
True if in viewer mode.List of range observers -
Constructor Summary
ConstructorDescriptionAcousticScrollerFX
(String name, javafx.geometry.Orientation orientation, int stepSizeMillis, long defaultLoadTime, boolean hasMenu) Constructor for the acoustic scroller. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAcousticScrollGraphics
(AcousticScrollerGraphics rawScrollBarGraphics2) Add graphics to the scroll bar.void
addNewPamData
(PamDataUnit rawDataUnit) Add a new data unit to the scroll bar so it can be drawn on the background canvas.void
addRangeObserver
(VisibleRangeObserver timeRangeListener) Add a range observer.void
anotherScrollerMovedInner
(long newValue) Another managed scroller moved it's positionGet all subscribed graphics.double
getBinsPerPixel
(float sampleratre) Get the number of bins per pixel.long
int
The current index of graphics.The main pane holding the scroller nodes.javafx.scene.layout.Pane
Get the navigation pane.javafx.scene.layout.Pane
getNode()
Get the node which contain all controls for scrolling system.long
The start time of the scroller in milliseconds.double
Get the value in millis.long
This will be none for sliders, such as on the map.long
Get ther visibleboolean
void
layoutScrollBarPane
(javafx.geometry.Orientation orientation) Layout the control pane containing scroll bar and buttons to navigate in time.void
Begins redrawing data hello in the scroll bar.void
loadScrollerData
(boolean newTasks) Begins redrawing data hello in the scroll bar.void
pauseDataload
(boolean pause) Pause the datagram loading.void
rangesChanged
(long setValue) Called when ranges have been changed and tells scroller to go to a particular absolute value.void
removeAcousticScrollGraphics
(AcousticScrollerGraphics rawScrollBarGraphics2) Remove graphics from the s roll bar.void
removeRangeObserver
(VisibleRangeObserver timeRangeListener) Remove a range observer.void
repaint
(long diff) Repaint the canvas.javafx.beans.property.BooleanProperty
javafx.beans.property.BooleanProperty
The property value for the scroll bar moving.void
setBlockIncrement
(long blockIncrement) void
setCurrentGraphicsIndex
(int currentIndex) Set current index of graphics.void
setDataGramColors
(StandardPlot2DColours dataGramColors) Set the acoustic scroller colours.void
setOrientation
(javafx.geometry.Orientation orientation) void
setRangeMillis
(long minimumMillis, long maximumMillis, boolean notify) Set the range of the currently loaded data and optionally notify other scrollers.void
setSampleRate
(float samplerate) Set the sample rate on the display.void
setScrollerGraphics
(int i) Set the index of the scroller graphics.void
setScrollRectVisible
(boolean b) Set the scroll bar rectangle visible or invisble.void
setUnitIncrement
(long unitIncrement) void
setVisibleMillis
(long visibleAmount) void
valueSetMillis
(long valueMillis) Called when a new position has been setMethods inherited from class pamViewFX.fxNodes.pamScrollers.AbstractPamScrollerFX
createNavigationPane, getOrientation, getPageBackwardButton, getPageForwardButton, getSettingsButton, isShowing, openTimeNavigationDialogAWT, openTimeNavigationDialogFX
Methods inherited from class pamScrollSystem.AbstractPamScroller
addDataBlock, addMenuParts, addObserver, anotherScrollerMovedOuter, coupledScrollerChanged, coupleScroller, destroyScroller, getDefaultLoadtime, getMaximumMillis, getMinimumMillis, getNumUsedDataBlocks, getObservers, getPageStep, getPamMenuParts, getRangeMillis, getScrollerCoupling, getScrollerData, getScrollManager, getSpecialLoadTimes, getStepSizeMillis, getUsedDataBlock, getVisibleEnd, isDataBlockUsed, isInSpecialList, notifyRangeChange, pageBack, pageForward, playbackStarted, playbackStopped, reLoad, removeAllDataBlocks, removeDataBlock, removeObserver, setPageStep, setScrollerCoupling, setStepSizeMillis, setValueMillis, startPlayback, stopPlayback, toString, uncoupleScroller
-
Property Details
-
scrollerChanging
public javafx.beans.property.BooleanProperty scrollerChangingProperty -
scrollMoving
public javafx.beans.property.BooleanProperty scrollMovingPropertyThe property value for the scroll bar moving. True if the scroll bar is moving.- See Also:
-
-
Field Details
-
rangeObserver
List of range observers -
isViewer
public boolean isViewerTrue if in viewer mode.
-
-
Constructor Details
-
AcousticScrollerFX
public AcousticScrollerFX(String name, javafx.geometry.Orientation orientation, int stepSizeMillis, long defaultLoadTime, boolean hasMenu) Constructor for the acoustic scroller.- Parameters:
name
- - the name of the scroller.orientation
- - the orientation of the scroller.stepSizeMillis
- - the step sizedefaultLoadTime
- - default load timehasMenu
- - has a menu.
-
-
Method Details
-
loadScrollerData
public void loadScrollerData()Begins redrawing data hello in the scroll bar. -
loadScrollerData
public void loadScrollerData(boolean newTasks) Begins redrawing data hello in the scroll bar. -
pauseDataload
public void pauseDataload(boolean pause) Pause the datagram loading.This is used to pause the data gram loading for example if a data block is being accessed somewhere else. If pauseDataload(true) is called afterwards then the datagrams will start loading from their previous position.
-
addAcousticScrollGraphics
Add graphics to the scroll bar. This handles drawing data units on the scroll bar's background canvas.- Parameters:
rawScrollBarGraphics
- - the scroll bar graphics class to add.
-
removeAcousticScrollGraphics
Remove graphics from the s roll bar. This handles drawing data units on the scroll bar's background canvas.- Parameters:
rawScrollBarGraphics
- - the scroll bar graphics class to remove.
-
setCurrentGraphicsIndex
public void setCurrentGraphicsIndex(int currentIndex) Set current index of graphics.- Parameters:
the
- current index of currentIndex
-
getCurrentGraphicsIndex
public int getCurrentGraphicsIndex()The current index of graphics.- Returns:
- the current index of the graphics showing in the scroll bar.
-
getAcousticScrollGraphics
Get all subscribed graphics.- Returns:
- subscribed graphics.
-
addNewPamData
Add a new data unit to the scroll bar so it can be drawn on the background canvas.- Parameters:
rawDataUnit
- - the raw data unit.
-
setScrollerGraphics
public void setScrollerGraphics(int i) Set the index of the scroller graphics. These graphics are shown in the scroller canvas.- Parameters:
i
- - the index of the acousticScrollerGraphics array.
-
repaint
public void repaint(long diff) Repaint the canvas.- Parameters:
diff
-
-
setSampleRate
public void setSampleRate(float samplerate) Set the sample rate on the display. -
getBinsPerPixel
public double getBinsPerPixel(float sampleratre) Get the number of bins per pixel. This is calculated from the width of the tdGraph in pixels, the time the display represents and the sample rate of raw sound data.- Returns:
- the number of bins per pixel.
-
layoutScrollBarPane
public void layoutScrollBarPane(javafx.geometry.Orientation orientation) Layout the control pane containing scroll bar and buttons to navigate in time.- Parameters:
orientation
- - orientation of the time scroller.
-
setOrientation
public void setOrientation(javafx.geometry.Orientation orientation) -
getNode
public javafx.scene.layout.Pane getNode()Description copied from class:AbstractPamScrollerFX
Get the node which contain all controls for scrolling system.- Specified by:
getNode
in classAbstractPamScrollerFX
- Returns:
- the FX component to go into the GUI.
-
getMainPane
The main pane holding the scroller nodes.- Returns:
- the main pane holding scroller nodes
-
setUnitIncrement
public void setUnitIncrement(long unitIncrement) - Overrides:
setUnitIncrement
in classAbstractPamScroller
- Parameters:
unitIncrement
- the unitIncrement to set in millis
-
getVisibleMillis
public long getVisibleMillis()Get ther visible- Returns:
- The visible amount of the display in milliseconds.
-
rangesChanged
public void rangesChanged(long setValue) Description copied from class:AbstractPamScroller
Called when ranges have been changed and tells scroller to go to a particular absolute value.- Specified by:
rangesChanged
in classAbstractPamScroller
-
setRangeMillis
public void setRangeMillis(long minimumMillis, long maximumMillis, boolean notify) Description copied from class:AbstractPamScroller
Set the range of the currently loaded data and optionally notify other scrollers.- Overrides:
setRangeMillis
in classAbstractPamScroller
- Parameters:
minimumMillis
- minimum time in millisecondsmaximumMillis
- maximum time in millisecondsnotify
- notify the rangesChanged function.
-
setBlockIncrement
public void setBlockIncrement(long blockIncrement) - Overrides:
setBlockIncrement
in classAbstractPamScroller
- Parameters:
blockIncrement
- the blockIncrement to set in millis
-
getBlockIncrement
public long getBlockIncrement() -
setVisibleMillis
public void setVisibleMillis(long visibleAmount) - Overrides:
setVisibleMillis
in classAbstractPamScroller
- Parameters:
visibleAmount
- the visibleAmount to set in millis
-
getValueMillis
public long getValueMillis()Description copied from class:AbstractPamScroller
The start time of the scroller in milliseconds. This is the current position of the scroller NOT the start time of loaded data.- Specified by:
getValueMillis
in classAbstractPamScroller
- Returns:
- the valueMillis
-
getValueMillisD
public double getValueMillisD()Get the value in millis.- Returns:
- the value in millis as a double.
-
valueSetMillis
public void valueSetMillis(long valueMillis) Description copied from class:AbstractPamScroller
Called when a new position has been set- Specified by:
valueSetMillis
in classAbstractPamScroller
- Parameters:
valueMillis
- new scroll value in milliseconds
-
anotherScrollerMovedInner
public void anotherScrollerMovedInner(long newValue) Description copied from class:AbstractPamScroller
Another managed scroller moved it's position- Specified by:
anotherScrollerMovedInner
in classAbstractPamScroller
- Parameters:
newValue
- new value in millis
-
addRangeObserver
Add a range observer.- Parameters:
timeRangeListener
- - a time range observer
-
removeRangeObserver
Remove a range observer.- Parameters:
timeRangeListener
- - a time range observer.
-
getScrollBarPane
- Returns:
-
getTimeAxis
-
setDataGramColors
Set the acoustic scroller colours. Also sets colours for all available datagrams.- Parameters:
dataGramColors
- - the colours to set;
-
scrollerChangingProperty
public javafx.beans.property.BooleanProperty scrollerChangingProperty()- Returns:
- the isChanging property.
- See Also:
-
scrollMovingProperty
public javafx.beans.property.BooleanProperty scrollMovingProperty()The property value for the scroll bar moving. True if the scroll bar is moving.- Returns:
- the scroll bar dragging property.
-
isScrollerChanging
public boolean isScrollerChanging()- Returns:
- true of the scroller is changing position or visible range
-
setScrollRectVisible
public void setScrollRectVisible(boolean b) Set the scroll bar rectangle visible or invisble.- Parameters:
b
- - true to set visible.
-
getVisibleAmount
public long getVisibleAmount()Description copied from class:AbstractPamScroller
This will be none for sliders, such as on the map. For other scrollers it should be the same as the time displayed in to the navigaiton buttons of the scroller.- Specified by:
getVisibleAmount
in classAbstractPamScroller
- Returns:
- the visible display time in milliseconds.
-