Map
Class MapDetectionsManager

java.lang.Object
  extended by Map.MapDetectionsManager
All Implemented Interfaces:
PamSettings

public class MapDetectionsManager
extends java.lang.Object
implements PamSettings

Holds information about all things plotted on the map, primarily how long they should plot for and whether they are currently enabled or not.
Will ty to have an ever increasing list of data blocks, identified by name.

Author:
Douglas Gillespie

Field Summary
private  int defaultTime
           
private  MapController mapControl
           
private  MapDetectionsParameters mapDetectionsParameters
           
(package private)  java.util.ArrayList<PamDataBlock> plottableBlocks
           
 
Constructor Summary
MapDetectionsManager(MapController mapControl)
           
 
Method Summary
private  void addDataBlock(PamDataBlock pamDataBlock)
           
private  void addDetectionData(MapDetectionData mapDetectionData)
           
private  void createBlockList()
           
 MapDetectionData findDetectionData(PamDataBlock pamDataBlock)
           
 MapDetectionData findDetectionData(java.lang.String dataName)
           
 int getDefaultTime()
           
 java.util.ArrayList<MapDetectionData> getMapDetectionDatas()
           
 MapDetectionsParameters getMapDetectionsParameters()
           
 java.io.Serializable getSettingsReference()
          functions for storing of settings ...
 long getSettingsVersion()
           
 java.lang.String getUnitName()
           
 java.lang.String getUnitType()
           
 boolean isShouldPlot(PamDataBlock pamDataBlock)
           
 boolean isShouldPlot(java.lang.String pamDataBlock)
           
 void notifyModelChanged(int changeType)
           
 boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
           
 void setDefaultTime(int defaultTime)
           
 void setMapDetectionsParameters(MapDetectionsParameters mapDetectionsParameters)
           
 void setShouldPlot(PamDataBlock pamDataBlock, boolean shouldPlot)
           
 void setShouldPlot(java.lang.String pamDataBlock, boolean shouldPlot)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapControl

private MapController mapControl

mapDetectionsParameters

private MapDetectionsParameters mapDetectionsParameters

plottableBlocks

java.util.ArrayList<PamDataBlock> plottableBlocks

defaultTime

private int defaultTime
Constructor Detail

MapDetectionsManager

public MapDetectionsManager(MapController mapControl)
Method Detail

notifyModelChanged

public void notifyModelChanged(int changeType)

createBlockList

private void createBlockList()

addDataBlock

private void addDataBlock(PamDataBlock pamDataBlock)

findDetectionData

public MapDetectionData findDetectionData(PamDataBlock pamDataBlock)

findDetectionData

public MapDetectionData findDetectionData(java.lang.String dataName)

addDetectionData

private void addDetectionData(MapDetectionData mapDetectionData)

getMapDetectionDatas

public java.util.ArrayList<MapDetectionData> getMapDetectionDatas()

setShouldPlot

public void setShouldPlot(java.lang.String pamDataBlock,
                          boolean shouldPlot)

setShouldPlot

public void setShouldPlot(PamDataBlock pamDataBlock,
                          boolean shouldPlot)

isShouldPlot

public boolean isShouldPlot(java.lang.String pamDataBlock)

isShouldPlot

public boolean isShouldPlot(PamDataBlock pamDataBlock)

getSettingsReference

public java.io.Serializable getSettingsReference()
functions for storing of settings ...

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

getUnitName

public java.lang.String getUnitName()
Specified by:
getUnitName in interface PamSettings
Returns:
A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.

getUnitType

public java.lang.String getUnitType()
Specified by:
getUnitType in interface PamSettings
Returns:
A Name specific to the type, e.g. Glick detector

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

getMapDetectionsParameters

public MapDetectionsParameters getMapDetectionsParameters()

setMapDetectionsParameters

public void setMapDetectionsParameters(MapDetectionsParameters mapDetectionsParameters)

getDefaultTime

public int getDefaultTime()

setDefaultTime

public void setDefaultTime(int defaultTime)