Package dataMap

Class DataMapControl

All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class DataMapControl extends PamControlledUnit implements PamSettings
The data map appears only during PAMGUARD viewer mode and is the root of a navigation system allowing the operator to scroll easily through large amounts of data.

The primary role of the map is to show a time line of data rate for each module, which may extend from minutes to years, and to relate that map to the positions of the various scroll bars used to navigate through the data.

Data may be loaded from the database and the binary storage system. Data in each will have been mapped into either hour units or units representing the individual files in the binary store.

Author:
Doug Gillespie
See Also:
  • Field Details

  • Constructor Details

    • DataMapControl

      public DataMapControl(String unitName)
  • Method Details

    • setFirstTime

      public void setFirstTime(long firstTime)
      Parameters:
      firstTime - the firstTime to set
    • setLastTime

      public void setLastTime(long lastTime)
      Parameters:
      lastTime - the lastTime to set
    • getDataMapControl

      public static DataMapControl getDataMapControl()
    • setPamView

      public void setPamView(PamView pamView)
      Description copied from class: PamControlledUnit
      Called whenever the frme of a PamControlledunit changes (including at program startup).
      Overrides:
      setPamView in class PamControlledUnit
    • frameResized

      public void frameResized()
    • getTabPanel

      public PamTabPanel getTabPanel()
      Description copied from class: PamControlledUnit
      Gets a reference to a panel to be added to a view
      Overrides:
      getTabPanel in class PamControlledUnit
      Returns:
      reference to a PamTabPanel object
      See Also:
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from class: PamControlledUnit
      General notification when the PAMGAURD model changes.
      Overrides:
      notifyModelChanged in class PamControlledUnit
      Parameters:
      changeType - type of change
    • getMappedDataBlocks

      public ArrayList<PamDataBlock> getMappedDataBlocks()
    • updateSingleDataMap

      public void updateSingleDataMap(OfflineDataMap<?> singleDataMap)
      Update a single data map. Useful when bringing in data from 'non standard' sources. Check overall time limits and redraw, but no total map creation.
      Parameters:
      singleDataMap -
    • getFirstTime

      public long getFirstTime()
      Returns:
      the firstTime for any data in any data block
    • getLastTime

      public long getLastTime()
      Returns:
      the lastTime for any data in any data block
    • getDataExtent

      public long[] getDataExtent(OfflineDataStore dataSource)
      Get the start and end times for all data associated with a particular data source
      Parameters:
      dataSource - datasource
      Returns:
      start and end times in milliseconds.
    • getSettingsReference

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • restoreSettings

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • centreDataAt

      public void centreDataAt(PamDataBlock dataBlock, long menuMouseTime)
      Centre the data in all data streams at the given time
      Parameters:
      dataBlock - data block graph sending the command
      menuMouseTime - time in milliseconds.
    • startDataAt

      public void startDataAt(PamDataBlock dataBlock, long menuMouseTime)
      Start the data in all data streams at the given time
      Parameters:
      dataBlock - data block graph sending the command
      menuMouseTime - time in milliseconds.
    • scrollToData

      public void scrollToData(PamDataBlock dataBlock)
    • getDataMapGUI

      public DataMapControlGUI getDataMapGUI()
    • getGUI

      public PamControlledUnitGUI getGUI(int flag)
      Get the GUI for the PAMControlled unit. This has multiple GUI options which are instantiated depending on the view type.
      Overrides:
      getGUI in class PamControlledUnit
      Parameters:
      flag - . The GUI type flag defined in PAMGuiManager.
      Returns:
      the GUI for the PamControlledUnit unit.