Package PamView

Class PamOldSymbolManager

java.lang.Object
PamView.PamOldSymbolManager
All Implemented Interfaces:
Serializable, PamSettings, SettingsNameProvider

public class PamOldSymbolManager extends Object implements PamSettings, Serializable
Class to manage symbols for various PAMGAURD displays. Any part of PAMGAURD using a PamSymbol may register with the PamSymbolManager and it's symbol and description will appear in the Display / Symbols menu from where it is possible to change the symbol. Symbol choices are stored in the serialised settings file along with other PAMGAURD configuration information. Being replaced in 2017 by a newer and better symbol management system which allows for many more options.
Author:
Douglas Gillespie
See Also:
  • Method Details

    • addManagesSymbol

      public void addManagesSymbol(ManagedSymbol managedSymbol)
      Add a managed symbol - wherever you want to use the symbol manager must implement the ManagedSymbol interface
      Parameters:
      managedSymbol - class with the symbol to be managed
      See Also:
    • updateManagedSymbol

      public void updateManagedSymbol(ManagedSymbol managedSymbol)
      Fix primarily inserted to deal with developers who continually recreate PamProcesses. when the process is recreated, it will also recreate it's output data block and associated overlaydraw which will end up getting it's default setting back again. So when a managedSymbol is changed, it should update the oldSettings list, so that when a new instance is created, it get's the update.
      Parameters:
      managedSymbol -
    • removeManagedSymbol

      public void removeManagedSymbol(Object managedSymbol)
      Remove an object from the symbol manager.
      Parameters:
      managedSymbol - instance to be removed from the list. Note that this is of type Object so that it can be called from all cleaned up DataBlocks overlay draw's whether they are using ManagedSymbol or not.
    • getMenu

      public JMenuItem getMenu(Frame guiFrame)
      constructs the menu for the main GUI display menu
      Returns:
      menu item for inclusion in main GUI menu
    • 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
    • getUnitName

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

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click 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