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

    • PamModuleInfo Link icon

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

    • getToolTipText Link icon

      public String getToolTipText()
      Returns:
      the toolTipText
    • setToolTipText Link icon

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

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

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

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

      public static PamModuleInfo findModuleInfo(String className)
    • getMenuAction Link icon

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

      public PamControlledUnit create(String unitName)
    • create Link icon

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

      public static ArrayList<PamModuleInfo> getModuleList()
    • getClassName Link icon

      public String getClassName()
    • getDescription Link icon

      public String getDescription()
    • getModuleClass Link icon

      public Class getModuleClass()
    • getModulesMenu Link icon

      public static JMenu getModulesMenu(Frame parentFrame)
    • getRemoveMenu Link icon

      public static JMenu getRemoveMenu()
    • isCoreModule Link icon

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

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

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

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

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

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

      public boolean hasFixedNumber()
    • canCreate Link icon

      public boolean canCreate()
    • canRemove Link icon

      public boolean canRemove()
    • addDependency Link icon

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

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

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

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

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

      public String getNewDefaultName()
    • setDefaultName Link icon

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

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

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

      public ModulesMenuGroup getModulesMenuGroup()
    • setModulesMenuGroup Link icon

      public void setModulesMenuGroup(ModulesMenuGroup modulesMenuGroup)
    • setHidden Link icon

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

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

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

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

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

      protected String getHelpPoint()
      Returns:
      the helpPoint
    • setHelpPoint Link icon

      protected void setHelpPoint(String helpPoint)
      Parameters:
      helpPoint - the helpPoint to set
    • getAllowedModes Link icon

      public int getAllowedModes()
      Returns:
      the allowedModes
    • setAllowedModes Link icon

      public void setAllowedModes(int allowedModes)
      Parameters:
      allowedModes - the allowedModes to set
    • availableInMode Link icon

      public boolean availableInMode()
      Is this module available in this mode ?
      Returns:
      true if available.