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

    • symbolModifierParams Link icon

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

  • Method Details Link icon

    • getModifyableBits Link icon

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

      public String getName()
      Returns:
      the name
    • setName Link icon

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

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

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

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

      public PamDialogPanel getDialogPanel()
    • getModifierOptionsMenu Link icon

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

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

      public PamSymbolChooser getSymbolChooser()
      Returns:
      the symbolChooser
    • getSymbolModifierParams Link icon

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

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

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

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

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