Package PamView.symbol.modifier
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
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 Summary
Modifier and TypeFieldDescriptionParameters for this symbol modifier. -
Constructor Summary
ConstructorDescriptionSymbolModifier
(String name, PamSymbolChooser symbolChooser, int modifyableBits) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canModify
(int modType) Say if can modify symbol in a particular way or ways .Get a menu item which can be added to options menu to control symbol modifier settings.int
Bits that can be selected / modified.getName()
Get the JavaFX symbol options pane that has options for the symbol pane.abstract SymbolData
getSymbolData
(GeneralProjector projector, PamDataUnit dataUnit) This is the symbol data to use if this modifier were to change everything.Get the symbol modifier parameters associated with the symbol modifier.Get a tool tip to display in dialogs, menus, etc.modifySymbol
(SymbolData symbolData, GeneralProjector projector, PamDataUnit dataUnit) Modify the symbol.void
void
setSelectionBit
(int selectionBit, boolean selected) Set a selection bit to true.void
setSymbolModifierParams
(SymbolModifierParams symbolModifierParams) Set the symbol modifier paramters.void
setToolTipText
(String tip) Set a tool tip to display in dialogs, menus, etc.
-
Field Details
-
symbolModifierParams
Parameters for this symbol modifier.
-
-
Constructor Details
-
SymbolModifier
-
-
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
- Returns:
- the name
-
setName
- Parameters:
name
- the name to set
-
getSymbolData
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
-
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
Get the JavaFX symbol options pane that has options for the symbol pane.- Returns:
- the symbol options pane.
-
getSymbolChooser
- Returns:
- the symbolChooser
-
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
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
Get a tool tip to display in dialogs, menus, etc.- Returns:
- tip text
-
setToolTipText
Set a tool tip to display in dialogs, menus, etc.- Parameters:
tip
- tip text
-