Package clipgenerator.clipDisplay
Class ClipDisplayPanel
java.lang.Object
userDisplay.UserDisplayComponentAdapter
clipgenerator.clipDisplay.ClipDisplayPanel
- All Implemented Interfaces:
PamSettings,SettingsNameProvider,SymbolUpdateMonitor,UserDisplayComponent
public class ClipDisplayPanel
extends UserDisplayComponentAdapter
implements PamSettings, SymbolUpdateMonitor
Clip display panel. Can be incorporated into a tab panel or stand alone in
a general display.
- Author:
- Doug Gillespie
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintaddPopupMenuItems(JPopupMenu popupMenu, MouseEvent mouseEvent) voidvoidCalled when the component is removed from the display.voiddisplayControlChanged(boolean needNewImage) intgetClipIndex(ClipDisplayUnit clipDisplayUnit) Get the index of a clip display unit.Get a title for the frame the component will be added to.Get a list of highlighted display units.floatprotected JScrollPanelongvoidmouseClicked(MouseEvent e, ClipDisplayUnit clipDisplayUnit) A notification from a ClipDisplayUnit that the mouse was clickedvoidmousePressed(MouseEvent e, ClipDisplayUnit clipDisplayUnit) A notification from a ClipDisplayUnit that the mouse was pressedvoidmouseReleased(MouseEvent e, ClipDisplayUnit clipDisplayUnit) A notification from a ClipDisplayUnit that the mouse was releasedvoidnewViewerTimes(long start, long end) voidnotifyModelChanged(int changeType) Pick up model changed notifications from a parent user display.voidCalled when the component is first displayed.voidvoidremoveClip(ClipDataUnit clipDataUnit) Remove the display component associated with a specific data unit.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidselectClipRange(ClipDisplayUnit firstClickedUnit, ClipDisplayUnit clipDisplayUnit) Select / highlight a range of unitsvoidsetSampleRate(float sampleRate) voidMenu that allows colour chosingvoidvoidupdate the panel layout.voidMethods inherited from class userDisplay.UserDisplayComponentAdapter
getUniqueName, setUniqueName
-
Field Details
-
clipDisplayParameters
-
clipFont
-
mouseDown
public boolean mouseDown
-
-
Constructor Details
-
ClipDisplayPanel
-
-
Method Details
-
getClipDisplayProjector
- Returns:
- the clipDisplayProjector
-
removeClip
Remove the display component associated with a specific data unit.- Parameters:
clipDataUnit-
-
getUnitsPanel
- Returns:
- the unitsPanel
-
removeAllClips
public void removeAllClips() -
newViewerTimes
public void newViewerTimes(long start, long end) -
updatePanelLater
public void updatePanelLater() -
updatePanel
public void updatePanel()update the panel layout. -
getDisplayPanel
- Returns:
- the displayPanel
-
getColourArray
- Returns:
- the colourArray
-
setSampleRate
public void setSampleRate(float sampleRate) - Parameters:
sampleRate- the sampleRate to set
-
getSampleRate
public float getSampleRate()- Returns:
- the sampleRate
-
mousePressed
A notification from a ClipDisplayUnit that the mouse was pressed- Parameters:
e-clipDisplayUnit-
-
mouseReleased
A notification from a ClipDisplayUnit that the mouse was released -
mouseClicked
A notification from a ClipDisplayUnit that the mouse was clicked -
getHighlightedUnits
Get a list of highlighted display units.- Returns:
- lit of highlighted units.
-
getClipIndex
Get the index of a clip display unit.- Parameters:
clipDisplayUnit-- Returns:
- index in display.
-
clearAllHighlights
public void clearAllHighlights() -
selectClipRange
Select / highlight a range of units- Parameters:
clipDisplayUnit-firstClickedUnit2-
-
displayControlChanged
public void displayControlChanged(boolean needNewImage) -
showPopupMenu
Menu that allows colour chosing- Parameters:
e-
-
getClipDataProjector
- Returns:
- the spectrogramProjector
-
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
-
getSymbolManager
-
getSymbolChooser
-
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
-
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
-
getScrollPane
- Returns:
- the scrollPane
-
getComponent
- Specified by:
getComponentin interfaceUserDisplayComponent- Returns:
- The Swing component to add to the frame
-
openComponent
public void openComponent()Description copied from interface:UserDisplayComponentCalled when the component is first displayed.- Specified by:
openComponentin interfaceUserDisplayComponent- Overrides:
openComponentin classUserDisplayComponentAdapter
-
closeComponent
public void closeComponent()Description copied from interface:UserDisplayComponentCalled when the component is removed from the display.- Specified by:
closeComponentin interfaceUserDisplayComponent- Overrides:
closeComponentin classUserDisplayComponentAdapter
-
getClipDisplayParameters
- Returns:
- the clipDisplayParameters
-
getClipDisplayParent
- Returns:
- the clipDisplayParent
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from interface:UserDisplayComponentPick up model changed notifications from a parent user display.- Specified by:
notifyModelChangedin interfaceUserDisplayComponent- Overrides:
notifyModelChangedin classUserDisplayComponentAdapter- Parameters:
changeType-
-
getFrameTitle
Description copied from interface:UserDisplayComponentGet a title for the frame the component will be added to.- Specified by:
getFrameTitlein interfaceUserDisplayComponent- Overrides:
getFrameTitlein classUserDisplayComponentAdapter- Returns:
- a title for the components frame.
-
addPopupMenuItems
-
symbolUpdate
public void symbolUpdate()- Specified by:
symbolUpdatein interfaceSymbolUpdateMonitor
-