Package PamModel

Class PamModuleInfo

java.lang.Object
PamModel.PamModuleInfo
All Implemented Interfaces:
PamDependent

public class PamModuleInfo extends Object implements PamDependent
Holds information about available PAMGUARD modules.
Author:
Doug Gillespie
See Also:
  • Constructor Details

    • PamModuleInfo

      public PamModuleInfo(String className, String description, Class moduleClass)
  • Method Details

    • getToolTipText

      public String getToolTipText()
      Returns:
      the toolTipText
    • setToolTipText

      public void setToolTipText(String toolTipText)
      Parameters:
      toolTipText - the toolTipText to set
    • registerControlledUnit

      public static PamModuleInfo registerControlledUnit(String className, String description)
      registers different controlled units in an ArrayList so that they can be instantiated by the user. Modified to call registerControlledUnit(String, String, ClassLoader) using the default class loader.
      Parameters:
      className - name of JAVA class.
      description - Description of module
      Returns:
      PamModuleInfo object of the control class
    • registerControlledUnit

      public static PamModuleInfo registerControlledUnit(String className, String description, ClassLoader cl)
      registers different controlled units in an ArrayList so that they can be instantiated by the user.
      Parameters:
      className - name of JAVA class.
      description - Description of module
      cl - classloader to use for the JAVA class
      Returns:
      PamModuleInfo object of the JAVA class
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • findModuleInfo

      public static PamModuleInfo findModuleInfo(String className)
    • getMenuAction

      public PamModel.PamModuleInfo.AddModuleMenuAction getMenuAction(Frame parentFrame)
    • create

      public PamControlledUnit create(String unitName)
    • create

      public PamControlledUnit create(PamConfiguration pamConfiguration, String unitName)
    • getModuleList

      public static ArrayList<PamModuleInfo> getModuleList()
    • getClassName

      public String getClassName()
    • getDescription

      public String getDescription()
    • getModuleClass

      public Class getModuleClass()
    • getModulesMenu

      public static JMenu getModulesMenu(Frame parentFrame)
    • getRemoveMenu

      public static JMenu getRemoveMenu()
    • isCoreModule

      public boolean isCoreModule()
      PAMGUARD has a set of modules which are so intertwined with very other module that they don't follow the typical process->outputdatablock->process2->outputdatablock->process3... pattern. These are termed core modules

      Note to developer: The meaning of core has changed as of 14/02/2014. Previously referred to supported modules by the PAMGUARD project.

      Returns:
      true if a core module
    • setCoreModule

      public void setCoreModule(boolean coreModule)
      PAMGUARD has a set of modules which are so intertwined with very other module that they don't follow the typical process->output data block->process2->output data block->process3... pattern. These are termed core modules

      Note to developer: The meaning of core has changed as of 14/02/2014. Previously referred to supported modules by the PAMGUARD project.

      Parameters:
      coreModule - true if a core module.
    • getMaxNumber

      public int getMaxNumber()
      Returns:
      Returns the maxNumber.
    • setMaxNumber

      public void setMaxNumber(int maxNumber)
      Set the maximum number of instances of a given module.
      Parameters:
      maxNumber - The maxNumber to set.
    • getMinNumber

      public int getMinNumber()
      Returns:
      Returns the minNumber.
    • setMinNumber

      public void setMinNumber(int minNumber)
      Set the minumnum number of instances of a particular module.
      Parameters:
      minNumber - The minNumber to set.
    • hasFixedNumber

      public boolean hasFixedNumber()
    • canCreate

      public boolean canCreate()
    • canRemove

      public boolean canRemove()
    • addDependency

      public void addDependency(PamDependency dependancy)
      Specified by:
      addDependency in interface PamDependent
    • getDependency

      public PamDependency getDependency()
      Specified by:
      getDependency in interface PamDependent
    • getDependentUserName

      public String getDependentUserName()
      Specified by:
      getDependentUserName in interface PamDependent
    • getNInstances

      public int getNInstances()
      Returns:
      Returns the nInstances.
    • getDefaultName

      public String getDefaultName()
      Returns:
      Returns the defaultName.
    • getNewDefaultName

      public String getNewDefaultName()
    • setDefaultName

      public void setDefaultName(String defaultName)
      Parameters:
      defaultName - The defaultName to set.
    • getAddMenuEnabler

      public MenuItemEnabler getAddMenuEnabler()
      Returns:
      Returns the addMenuEnabler.
    • getRemoveMenuEnabler

      public MenuItemEnabler getRemoveMenuEnabler()
      Returns:
      Returns the removeMenuEnabler.
    • getModulesMenuGroup

      public ModulesMenuGroup getModulesMenuGroup()
    • setModulesMenuGroup

      public void setModulesMenuGroup(ModulesMenuGroup modulesMenuGroup)
    • setHidden

      public void setHidden(boolean hidden)
      Hide the module. The module will still be available if already in a configuration, but will not appear in the add modules menus.
      Parameters:
      hidden - true if hidden.
    • isHidden

      public boolean isHidden()
      Check whether the module is hidden. Hidden modules will still be available if already in a configuration, but will not appear in the add modules menus.
      Returns:
      true if hidden.
    • addGUICompatabilityFlag

      public void addGUICompatabilityFlag(int flag)
      Add a GUI compatibility flag. These are flags in PAMGuiManager e.g. PAMGUIManager.swing
      Parameters:
      the - GUI flag.
    • getNGUIFlags

      public int getNGUIFlags()
      Get the number of GUI flags. These defined which GUI's the Module is compatible with.
      Returns:
      the number of GUI flags.
    • getGUICompatabilityFlag

      public int getGUICompatabilityFlag(int index)
      Get the GUI flag at the specified index.
      Parameters:
      the - index.