Class SymbolModifier

java.lang.Object
PamView.symbol.modifier.SymbolModifier
Direct Known Subclasses:
BaseClassSymbolModifier, ClickClassSymbolModifier, ClickTrainSymbolModifer, CPODSpeciesModifier, DLSymbolModifier, FixedSymbolModifier, HydrophoneSymbolModifier, LoggerSymbolModifier, MatchedClickSymbolModifier, PeakFreqModifier, RotateColoursModifier, RWESymbolModifier, SuperDetSymbolModifier, SuperDetSymbolWrapper, UserFormSymbolModifier, UserSymbolModifier

public abstract class SymbolModifier extends Object
A symbol modifier modifies a PamSymbol. SymbolModifiers are typically used in a list where the user can define exactly how they wish symbols to be coloured, shaped based on various properties e.g. hydrophone, peak freq. super detection etc.
Author:
Doug Gillespie
  • Field Details

    • symbolModifierParams

      public SymbolModifierParams symbolModifierParams
      Parameters for this symbol modifier.
  • Constructor Details

  • Method Details

    • getModifyableBits

      public int getModifyableBits()
      Bits that can be selected / modified. This is NOT the bits which are currently selected for modification
      Returns:
      the modifyableBits
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getSymbolData

      public abstract SymbolData getSymbolData(GeneralProjector projector, PamDataUnit dataUnit)
      This is the symbol data to use if this modifier were to change everything. the Symbolchooser will actually be calling the modifySymbol function, which calls this, then based on which bits are set for modification, will transfer over the appropriate information.

      Must be able to respond to a null projector and dataUnit for tree vies.

      Parameters:
      projector -
      dataUnit -
      Returns:
    • modifySymbol

      public SymbolData modifySymbol(SymbolData symbolData, GeneralProjector projector, PamDataUnit dataUnit)
      Modify the symbol. In it's basic form it calls getSymbolData to get a totally fresh symbol, then copies over only the bits of information specified in modifyBits
      Parameters:
      symbolData -
      projector -
      dataUnit -
      modifyBits -
      Returns:
      modified symbol. Must never be null.
    • canModify

      public boolean canModify(int modType)
      Say if can modify symbol in a particular way or ways . Note that this is what it CAN do, not necessarily what it's been told to do.
      Parameters:
      modType - bitmap of modificatio types
      Returns:
    • getDialogPanel

      public PamDialogPanel getDialogPanel()
    • getModifierOptionsMenu

      public JMenuItem getModifierOptionsMenu()
      Get a menu item which can be added to options menu to control symbol modifier settings. by default, the menu item is only created if the getDialogPanel function returns non null, but this behaviour can be overridden for more bespoke solutions such as simple additional menu items, etc.
      Returns:
      null or a menu item
    • getOptionsPane

      public SymbolModifierPane getOptionsPane()
      Get the JavaFX symbol options pane that has options for the symbol pane.
      Returns:
      the symbol options pane.
    • getSymbolChooser

      public PamSymbolChooser getSymbolChooser()
      Returns:
      the symbolChooser
    • getSymbolModifierParams

      public SymbolModifierParams getSymbolModifierParams()
      Get the symbol modifier parameters associated with the symbol modifier.

      Note that this function should create a new instance of the settings class if the settings class is null. This allows subclasses to override this function to return custom parameter objects.

      Returns:
      the symbol modifier parameters.
    • setSymbolModifierParams

      public void setSymbolModifierParams(SymbolModifierParams symbolModifierParams)
      Set the symbol modifier paramters.
      Parameters:
      symbolModifierParams - - the symbol modifiers paramters.
    • setSelectionBit

      public void setSelectionBit(int selectionBit, boolean selected)
      Set a selection bit to true.
      Parameters:
      selectionBit -
      selected -
    • getToolTipText

      public String getToolTipText()
      Get a tool tip to display in dialogs, menus, etc.
      Returns:
      tip text
    • setToolTipText

      public void setToolTipText(String tip)
      Set a tool tip to display in dialogs, menus, etc.
      Parameters:
      tip - tip text