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 TypeMethodDescriptionvoidCalled when the component is removed from the display.Get a title for the frame the component will be added to.longvoidnewSensorData(PamDataUnit pamDataUnit) protected voidCalled when selection made in drop down list.voidnotifyModelChanged(int changeType) Pick up model changed notifications from a parent user display.voidCalled when the component is first displayed.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidscrollChanged(long valueMillis) voidsetDisplayParameters(ArrayDisplayParameters displayParameters) voidsetUniqueName(String uniqueName) Set a unique name for every display.booleanshowDisplayParamsDialog(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:
getComponentin 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:UserDisplayComponentCalled when the component is first displayed.- Specified by:
openComponentin interfaceUserDisplayComponent
-
closeComponent
public void closeComponent()Description copied from interface:UserDisplayComponentCalled when the component is removed from the display.- Specified by:
closeComponentin interfaceUserDisplayComponent
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:UserDisplayComponentPick up model changed notifications from a parent user display.- Specified by:
notifyModelChangedin interfaceUserDisplayComponent- Parameters:
changeType-
-
getUniqueName
- Specified by:
getUniqueNamein interfaceUserDisplayComponent- Returns:
- a unique name (across all of PAMGuard) which will be used for mark overlays and settings storage.
-
setUniqueName
Description copied from interface:UserDisplayComponentSet 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:
setUniqueNamein interfaceUserDisplayComponent
-
getFrameTitle
Description copied from interface:UserDisplayComponentGet a title for the frame the component will be added to.- Specified by:
getFrameTitlein interfaceUserDisplayComponent- Returns:
- a title for the components frame.
-
getUnitName
- Specified by:
getUnitNamein interfaceSettingsNameProvider- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitTypein interfacePamSettings- Returns:
- A Name specific to the type, e.g. Click detector
-
getSettingsReference
- Specified by:
getSettingsReferencein interfacePamSettings- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersionin interfacePamSettings- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettingsin 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:
getDisplayParametersin interfaceArrayDisplayParamsProvider
-
showDisplayParamsDialog
- Specified by:
showDisplayParamsDialogin interfaceArrayDisplayParamsProvider
-
setDisplayParameters
- Specified by:
setDisplayParametersin interfaceArrayDisplayParamsProvider
-