General Modularity Example Module Projects & Files Commands & Scripting
Windows Menus Charts Tables Buttons & tools
Trees and Taxa Characters & Models Documentation General Utilities
Modular architecture Modules: subclasses of MesquiteModule Modules employing other modules
Duty Classes Writing modules Documentation for particular modules Packages of Modules
Also: User's introduction to modularity class MesquiteModule Example Module

Duty Classes

(updated April 2005)

Modules are subclasses of MesquiteModule. However, it is expected that no module will directly subclass MesquiteModule, but will instead indirectly subclass it via the duty classes. Duty classes are subclasses of MesquiteModule that represent distinct roles a module could play. For instance, DrawTree is an abstract subclass of MesquiteModule that creates a tree drawing. A tree-drawing module would be expected to subclass DrawTree. Another duty class is TreeSource, another abstract subclass of MesquiteModule, but this time it supplies trees.

By convention, duty classes are part of the mesquite.lib.duties package. Some of the defined duty classes are:

Default module for a given duty

A duty class can override the MesquiteModule method getDefaultModule() to return the names of the modules intended to be the default for the given duty. In the future the user should be able to override this in a way that would be saved to a preference file.

Name of duty

A duty class should override the MesquiteModule method getDutyName() to return the name of the duty performed. The name should be informative to the user.


© W. Maddison & D. Maddison 1998-2005