Package Array.sensors.swing
Class ArraySensorComponent
java.lang.Object
Array.sensors.swing.ArraySensorComponent
- All Implemented Interfaces:
ArrayDisplayParamsProvider
,PamSettings
,SettingsNameProvider
,UserDisplayComponent
public class ArraySensorComponent
extends Object
implements UserDisplayComponent, PamSettings, ArrayDisplayParamsProvider
HPR on a user display.
- Author:
- dg50
-
Constructor Summary
ConstructorsConstructorDescriptionArraySensorComponent
(ArraySensorPanelProvider arraySensorPanelProvider, UserDisplayControl userDisplayControl, String uniqueName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when the component is removed from the display.Get a title for the frame the component will be added to.long
void
newSensorData
(PamDataUnit pamDataUnit) protected void
Called when selection made in drop down list.void
notifyModelChanged
(int changeType) Pick up model changed notifications from a parent user display.void
Called when the component is first displayed.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
scrollChanged
(long valueMillis) void
setDisplayParameters
(ArrayDisplayParameters displayParameters) void
setUniqueName
(String uniqueName) Set a unique name for every display.boolean
showDisplayParamsDialog
(Window window)
-
Constructor Details
-
ArraySensorComponent
public ArraySensorComponent(ArraySensorPanelProvider arraySensorPanelProvider, UserDisplayControl userDisplayControl, String uniqueName)
-
-
Method Details
-
newSensorSource
protected void newSensorSource()Called when selection made in drop down list. -
getComponent
- Specified by:
getComponent
in interfaceUserDisplayComponent
- Returns:
- The Swing component to add to the frame
-
scrollChanged
public void scrollChanged(long valueMillis) -
newSensorData
-
openComponent
public void openComponent()Description copied from interface:UserDisplayComponent
Called when the component is first displayed.- Specified by:
openComponent
in interfaceUserDisplayComponent
-
closeComponent
public void closeComponent()Description copied from interface:UserDisplayComponent
Called when the component is removed from the display.- Specified by:
closeComponent
in interfaceUserDisplayComponent
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:UserDisplayComponent
Pick up model changed notifications from a parent user display.- Specified by:
notifyModelChanged
in interfaceUserDisplayComponent
- Parameters:
changeType
-
-
getUniqueName
- Specified by:
getUniqueName
in interfaceUserDisplayComponent
- Returns:
- a unique name (across all of PAMGuard) which will be used for mark overlays and settings storage.
-
setUniqueName
Description copied from interface:UserDisplayComponent
Set a unique name for every display. This is important for saving settings and for managing things that need a unique name such as overlay marks and markers.- Specified by:
setUniqueName
in interfaceUserDisplayComponent
-
getFrameTitle
Description copied from interface:UserDisplayComponent
Get a title for the frame the component will be added to.- Specified by:
getFrameTitle
in interfaceUserDisplayComponent
- Returns:
- a title for the components frame.
-
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
-
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
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Parameters:
pamControlledUnitSettings
-- 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
-
getDisplayParameters
- Specified by:
getDisplayParameters
in interfaceArrayDisplayParamsProvider
-
showDisplayParamsDialog
- Specified by:
showDisplayParamsDialog
in interfaceArrayDisplayParamsProvider
-
setDisplayParameters
- Specified by:
setDisplayParameters
in interfaceArrayDisplayParamsProvider
-