Package pamScrollSystem.jumping
Class ScrollJumper
java.lang.Object
pamScrollSystem.jumping.ScrollJumper
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
,PamMenuParts
- Direct Known Subclasses:
SpectrogramScrollJumper
Scroll jumper allows the use of arrow keys to move to the next data unit. How it finds
that data unit is TBD, but might involve scanning all data blocks added to the current scroller
for the next data unit after a given time, or something like that. Can also use data filters
though need to think if it's using the same ones as on the display or different ones.
- Author:
- dg50
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addMenuItems
(JComponent parentComponent) Add menu items to a menu or popup menu.void
addSelectObserver
(SimpleDataObserver simpleObserver) Add an observer which will get notifications whenever the selected data unit changes.getDataSelector
(PamDataBlock dataBlock) Get a data selector for the datablock of interest.long
Get a list of datablocks to search for the next or previous data unit By default this is the list of data blocks subscribed to the scroller, but you may want to override this, e.g.void
Notify selection observers when a new data unit is selected May be sending out null's !boolean
removeSelectObserver
(SimpleDataObserver simpleObserver) Remove an observer which got notifications whenever the selected data unit changes.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings)
-
Constructor Details
-
ScrollJumper
-
-
Method Details
-
getUsedDataBlocks
Get a list of datablocks to search for the next or previous data unit By default this is the list of data blocks subscribed to the scroller, but you may want to override this, e.g. in the spectrogram only return the list that's used by the display panel last clicked on.- Returns:
- list of datablocks.
-
getDataSelector
Get a data selector for the datablock of interest. by default this is null, but specific displays may want to override this so that they can use the data selector currently active on that display.- Parameters:
dataBlock
-- Returns:
- data selector
-
addMenuItems
Description copied from interface:PamMenuParts
Add menu items to a menu or popup menu.- Specified by:
addMenuItems
in interfacePamMenuParts
- Parameters:
parentComponent
- menu to add to- Returns:
- number of items added
-
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
- 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
-
getParentScroller
- Returns:
- the parentScroller
-
getScrollJumpParams
- Returns:
- the scrollJumpParams
-
getLastFoundDataUnit
- Returns:
- the lastFoundDataUnit
-
notifySelectObservers
public void notifySelectObservers()Notify selection observers when a new data unit is selected May be sending out null's ! -
addSelectObserver
Add an observer which will get notifications whenever the selected data unit changes.- Parameters:
simpleObserver
-
-
removeSelectObserver
Remove an observer which got notifications whenever the selected data unit changes.- Parameters:
simpleObserver
-
-