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 Details Link icon

    • mouseDown Link icon

      public boolean mouseDown
  • Constructor Details Link icon

  • Method Details Link icon

    • getClipDisplayProjector Link icon

      public ClipDisplayProjector getClipDisplayProjector()
      Returns:
      the clipDisplayProjector
    • removeClip Link icon

      public void removeClip(ClipDataUnit clipDataUnit)
      Remove the display component associated with a specific data unit.
      Parameters:
      clipDataUnit -
    • getUnitsPanel Link icon

      public JPanel getUnitsPanel()
      Returns:
      the unitsPanel
    • removeAllClips Link icon

      public void removeAllClips()
    • newViewerTimes Link icon

      public void newViewerTimes(long start, long end)
    • updatePanelLater Link icon

      public void updatePanelLater()
    • updatePanel Link icon

      public void updatePanel()
      update the panel layout.
    • getDisplayPanel Link icon

      public JPanel getDisplayPanel()
      Returns:
      the displayPanel
    • getColourArray Link icon

      public ColourArray getColourArray()
      Returns:
      the colourArray
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate)
      Parameters:
      sampleRate - the sampleRate to set
    • getSampleRate Link icon

      public float getSampleRate()
      Returns:
      the sampleRate
    • mousePressed Link icon

      public void mousePressed(MouseEvent e, ClipDisplayUnit clipDisplayUnit)
      A notification from a ClipDisplayUnit that the mouse was pressed
      Parameters:
      e -
      clipDisplayUnit -
    • mouseReleased Link icon

      public void mouseReleased(MouseEvent e, ClipDisplayUnit clipDisplayUnit)
      A notification from a ClipDisplayUnit that the mouse was released
    • mouseClicked Link icon

      public void mouseClicked(MouseEvent e, ClipDisplayUnit clipDisplayUnit)
      A notification from a ClipDisplayUnit that the mouse was clicked
    • getHighlightedUnits Link icon

      public ArrayList<ClipDisplayUnit> getHighlightedUnits()
      Get a list of highlighted display units.
      Returns:
      lit of highlighted units.
    • getClipIndex Link icon

      public int getClipIndex(ClipDisplayUnit clipDisplayUnit)
      Get the index of a clip display unit.
      Parameters:
      clipDisplayUnit -
      Returns:
      index in display.
    • clearAllHighlights Link icon

      public void clearAllHighlights()
    • selectClipRange Link icon

      public void selectClipRange(ClipDisplayUnit firstClickedUnit, ClipDisplayUnit clipDisplayUnit)
      Select / highlight a range of units
      Parameters:
      clipDisplayUnit -
      firstClickedUnit2 -
    • displayControlChanged Link icon

      public void displayControlChanged(boolean needNewImage)
    • showPopupMenu Link icon

      public void showPopupMenu(MouseEvent e)
      Menu that allows colour chosing
      Parameters:
      e -
    • getClipDataProjector Link icon

      public ClipDataProjector getClipDataProjector()
      Returns:
      the spectrogramProjector
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getSymbolManager Link icon

      public PamSymbolManager getSymbolManager()
    • getSymbolChooser Link icon

      public PamSymbolChooser getSymbolChooser()
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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
    • getComponent Link icon

      public Component getComponent()
      Specified by:
      getComponent in interface UserDisplayComponent
      Returns:
      The Swing component to add to the frame
    • openComponent Link icon

      public void openComponent()
      Description copied from interface: UserDisplayComponent
      Called when the component is first displayed.
      Specified by:
      openComponent in interface UserDisplayComponent
      Overrides:
      openComponent in class UserDisplayComponentAdapter
    • closeComponent Link icon

      public void closeComponent()
      Description copied from interface: UserDisplayComponent
      Called when the component is removed from the display.
      Specified by:
      closeComponent in interface UserDisplayComponent
      Overrides:
      closeComponent in class UserDisplayComponentAdapter
    • getClipDisplayParameters Link icon

      public ClipDisplayParameters getClipDisplayParameters()
      Returns:
      the clipDisplayParameters
    • getClipDisplayParent Link icon

      public ClipDisplayParent getClipDisplayParent()
      Returns:
      the clipDisplayParent
    • notifyModelChanged Link icon

      public void notifyModelChanged(int changeType)
      Description copied from interface: UserDisplayComponent
      Pick up model changed notifications from a parent user display.
      Specified by:
      notifyModelChanged in interface UserDisplayComponent
      Overrides:
      notifyModelChanged in class UserDisplayComponentAdapter
    • getFrameTitle Link icon

      public String getFrameTitle()
      Description copied from interface: UserDisplayComponent
      Get a title for the frame the component will be added to.
      Specified by:
      getFrameTitle in interface UserDisplayComponent
      Overrides:
      getFrameTitle in class UserDisplayComponentAdapter
      Returns:
      a title for the components frame.
    • addPopupMenuItems Link icon

      public int addPopupMenuItems(JPopupMenu popupMenu, MouseEvent mouseEvent)
    • symbolUpdate Link icon

      public void symbolUpdate()
      Specified by:
      symbolUpdate in interface SymbolUpdateMonitor