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

public class AcousticScrollerFX extends AbstractPamScrollerFX
The acoustic scroll pane shows a summary of all the acoustic data available in a particular scroll period.
Author:
Jamie Macaulay
See Also:
  • Property Details

    • scrollerChanging

      public javafx.beans.property.BooleanProperty scrollerChangingProperty
      See Also:
    • scrollMoving

      public javafx.beans.property.BooleanProperty scrollMovingProperty
      The property value for the scroll bar moving. True if the scroll bar is moving.
      See Also:
  • Field Details

    • rangeObserver

      public ArrayList<VisibleRangeObserver> rangeObserver
      List of range observers
    • isViewer

      public boolean isViewer
      True 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 size
      defaultLoadTime - - default load time
      hasMenu - - 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

      public void addAcousticScrollGraphics(AcousticScrollerGraphics rawScrollBarGraphics2)
      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

      public void removeAcousticScrollGraphics(AcousticScrollerGraphics rawScrollBarGraphics2)
      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

      public ArrayList<AcousticScrollerGraphics> getAcousticScrollGraphics()
      Get all subscribed graphics.
      Returns:
      subscribed graphics.
    • addNewPamData

      public void addNewPamData(PamDataUnit rawDataUnit)
      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 class AbstractPamScrollerFX
      Returns:
      the FX component to go into the GUI.
    • getMainPane

      public PamBorderPane getMainPane()
      The main pane holding the scroller nodes.
      Returns:
      the main pane holding scroller nodes
    • setUnitIncrement

      public void setUnitIncrement(long unitIncrement)
      Overrides:
      setUnitIncrement in class AbstractPamScroller
      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 class AbstractPamScroller
    • 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 class AbstractPamScroller
      Parameters:
      minimumMillis - minimum time in milliseconds
      maximumMillis - maximum time in milliseconds
      notify - notify the rangesChanged function.
    • setBlockIncrement

      public void setBlockIncrement(long blockIncrement)
      Overrides:
      setBlockIncrement in class AbstractPamScroller
      Parameters:
      blockIncrement - the blockIncrement to set in millis
    • getBlockIncrement

      public long getBlockIncrement()
    • setVisibleMillis

      public void setVisibleMillis(long visibleAmount)
      Overrides:
      setVisibleMillis in class AbstractPamScroller
      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 class AbstractPamScroller
      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 class AbstractPamScroller
      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 class AbstractPamScroller
      Parameters:
      newValue - new value in millis
    • addRangeObserver

      public void addRangeObserver(VisibleRangeObserver timeRangeListener)
      Add a range observer.
      Parameters:
      timeRangeListener - - a time range observer
    • removeRangeObserver

      public void removeRangeObserver(VisibleRangeObserver timeRangeListener)
      Remove a range observer.
      Parameters:
      timeRangeListener - - a time range observer.
    • getScrollBarPane

      public ScrollBarPane getScrollBarPane()
      Returns:
    • getTimeAxis

      public PamAxisFX getTimeAxis()
    • setDataGramColors

      public void setDataGramColors(StandardPlot2DColours dataGramColors)
      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.
    • getNavigationPane

      public javafx.scene.layout.Pane getNavigationPane()
      Get the navigation pane. This is used in viewer mode to navigate through the dataset.
      Returns:
      the navigation pane.
    • 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 class AbstractPamScroller
      Returns:
      the visible display time in milliseconds.