Package PamModel
Class PamModuleInfo
java.lang.Object
PamModel.PamModuleInfo
- All Implemented Interfaces:
PamDependent
Holds information about available PAMGUARD modules.
- Author:
- Doug Gillespie
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(PamDependency dependancy) void
addGUICompatabilityFlag
(int flag) Add a GUI compatibility flag.boolean
boolean
create
(PamConfiguration pamConfiguration, String unitName) static PamModuleInfo
findModuleInfo
(String className) int
getGUICompatabilityFlag
(int index) Get the GUI flag at the specified index.int
PamModel.PamModuleInfo.AddModuleMenuAction
getMenuAction
(Frame parentFrame) int
static ArrayList<PamModuleInfo>
static JMenu
getModulesMenu
(Frame parentFrame) int
Get the number of GUI flags.int
static JMenu
boolean
boolean
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...boolean
isHidden()
Check whether the module is hidden.static PamModuleInfo
registerControlledUnit
(String className, String description) registers different controlled units in an ArrayList so that they can be instantiated by the user.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.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...void
setDefaultName
(String defaultName) void
setHidden
(boolean hidden) Hide the module.void
setMaxNumber
(int maxNumber) Set the maximum number of instances of a given module.void
setMinNumber
(int minNumber) Set the minumnum number of instances of a particular module.void
setModulesMenuGroup
(ModulesMenuGroup modulesMenuGroup) void
setToolTipText
(String toolTipText) toString()
-
Constructor Details
-
PamModuleInfo
-
-
Method Details
-
getToolTipText
- Returns:
- the toolTipText
-
setToolTipText
- Parameters:
toolTipText
- the toolTipText to set
-
registerControlledUnit
registers different controlled units in an ArrayList so that they can be instantiated by the user. Modified to callregisterControlledUnit(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 modulecl
- classloader to use for the JAVA class- Returns:
- PamModuleInfo object of the JAVA class
-
toString
-
findModuleInfo
-
getMenuAction
-
create
-
create
-
getModuleList
-
getClassName
-
getDescription
-
getModuleClass
-
getModulesMenu
-
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 modulesNote 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 modulesNote 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
- Specified by:
addDependency
in interfacePamDependent
-
getDependency
- Specified by:
getDependency
in interfacePamDependent
-
getDependentUserName
- Specified by:
getDependentUserName
in interfacePamDependent
-
getNInstances
public int getNInstances()- Returns:
- Returns the nInstances.
-
getDefaultName
- Returns:
- Returns the defaultName.
-
getNewDefaultName
-
setDefaultName
- Parameters:
defaultName
- The defaultName to set.
-
getAddMenuEnabler
- Returns:
- Returns the addMenuEnabler.
-
getRemoveMenuEnabler
- Returns:
- Returns the removeMenuEnabler.
-
getModulesMenuGroup
-
setModulesMenuGroup
-
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.
-