Package PamView
Class PamOldSymbolManager
java.lang.Object
PamView.PamOldSymbolManager
- All Implemented Interfaces:
Serializable
,PamSettings
,SettingsNameProvider
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 Summary
Modifier and TypeMethodDescriptionvoid
addManagesSymbol
(ManagedSymbol managedSymbol) Add a managed symbol - wherever you want to use the symbol manager must implement the ManagedSymbol interfaceconstructs the menu for the main GUI display menulong
void
removeManagedSymbol
(Object managedSymbol) Remove an object from the symbol manager.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
updateManagedSymbol
(ManagedSymbol managedSymbol) Fix primarily inserted to deal with developers who continually recreate PamProcesses.
-
Method Details
-
addManagesSymbol
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
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
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
constructs the menu for the main GUI display menu- Returns:
- menu item for inclusion in main GUI menu
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-