All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mesquite.lib.MesquiteModule

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----mesquite.lib.MenuOwner
                                           |
                                           +----mesquite.lib.EmployerEmployee
                                                   |
                                                   +----mesquite.lib.MesquiteModule

public abstract class MesquiteModule
extends mesquite.lib.EmployerEmployee
implements mesquite.lib.Commandable, mesquite.lib.Listable, mesquite.lib.Showable, mesquite.lib.Logger, mesquite.lib.Explainable, mesquite.lib.Identifiable, mesquite.lib.FileDirtier, mesquite.lib.MesquiteListener
The Mesquite system operates around a tree of modules (subclasses of MesquiteModule), with the class containing the "main" method being the trunk module, and the other modules like branches that are attached to the trunk.

When Mesquite starts up, the trunk starts up and surveys the mesquite folder to acquire information about all of the available modules (i.e., all of the available subclasses of MesquiteModule). To be found, a module must be in a folder (directory) of the same name as itself; that is, a module whose class file is "MyModule.class" must be in a directory named "MyModule". Mesquite remembers the modules in a vector of MesquiteModuleInfo objects. Later, when modules need to be "hired" to perform certain tasks, this vector of information can be used to help choose which module to hire. To be hired, a module is instantiated and linked to its employer module. Thus, a new branch sprouts in the Mesquite bureacratic hierarchy.

Modules are chosen for hire by other modules according to their talents. What talents a module has is implicit in its superclass. For instance, a module that subclasses the NumberForTree class (itself a subclass of MesquiteModule) calculates a number for a tree. Any module that wants numbers calculated for trees can therefore hire a module that is an instance of the NumberForTree class. The basic talent-defining classes are part of the Mesquite Class LIbrary, in the subpackage duties. There is in addition a system to determine whether a module is compatible with a particular condition (e.g. operating on continuous-valued data.)

The only types of module that the trunk knows of directly are the FileCoordinator and FileInterpreter classes. Each instance of the File Coordinator is associated with one file, and it is responsible for using employee modules to read and write the file, and to hire tree windows and data windows. The trunk is a specific subclass of MesquiteModule, a MesquiteTrunk

Because menus are composed hierarchically along the employee tree, menu composition is most easily done where there is easy access to employee-employer relations. For this reason, it is most convenient to have the menu composition embedded within the module code. In order not to burden the MesquiteModule class with numerous methods to handle employee-employer relations, the MesquiteModule class was split into three: its superclass, EmployeeEmployer (which handles employee-employer relations), MenuOwner (which handles all menu issues) and MesquiteModule itself, which handles its basic functions. EmployeeEmployer and MenuOwner are intended to be used ONLY as superclasses to MesquiteModule

The MesquiteModule class is more or less equivalent to the MacClade proto4 ModuleRecord, while its instantiated objects are more or less equivalent to the MacClade proto4 Tasks. Hence, "task" is sometimes used in names for MesquiteModule objects.


Variable Index

 o browserString
the file path to the web browser for showing web pages
 o checkMethodsAtStartup
true if does extra check for module compatibility at startup.
 o logWindow
The window, created by mesquiteTrunk, that displays the log.
 o mesquiteDirectory
The root of the mesquite classpath.
 o mesquiteDirectoryPath
The root of the mesquite classpath.
 o mesquiteTrunk
Static storage so that everyone can find the trunk MesquiteModule object
 o moduleInfo
the MesquiteModuleInfo that refers to the module
 o prefsDirectory
The directory that includes all the preference files.
 o proj
The project that the module was hired under.
 o textEdgeCompensationHeight
 o textEdgeCompensationWidth
 o userDirectory
The user's directory.

Constructor Index

 o MesquiteModule()
The constructor in general is to be avoided, because modules are instantiated momentarily on startup to gather information.

Method Index

 o accumulateParameters(String)
 o addNEXUSBlock(NexusBlock)
Adds NEXUS block to the file.
 o alert(String)
Displays an alert in log; also in dialog if flag is set.
 o anySubstantivePrereleases()
returns whether this or employee modules are substantive and prerelease
 o broadCastAssignedID(MesquiteModule, String, CommandRecord)
Broadcasts that an id has been assigned to a module.
 o changed(Object, Object, int, int[])
passes which object changed, along with optional integer (e.g.
 o classFieldChanged(Class, String, CommandRecord)
Notifies all employees that a class field has changed.
 o closeDownEmployee()
closeDownEmployee is called automatically when an employee is fired.
 o compatibleWithSystem()
returns whether the module is compatible with the current OS, Mesquite system, Java VM, and so on.
 o containerOfModule()
Returns the window of the MesquiteModule, or if none, the window of the nearest employer with a window.
 o disposing(Object)
passes which object is being disposed (from MesquiteListener interface)
 o doCommand(String, String, CommandRecord, CommandChecker)
A request for the MesquiteModule to perform a command.
 o employeeOutputInvalid(MesquiteModule, MesquiteModule, CommandRecord)
Generated by an employee calling its outputInvalide method.
 o employeeParametersChanged(MesquiteModule, MesquiteModule, CommandRecord)
Generated by an employee calling its parametersChanged method.
 o employeeQuit(MesquiteModule)
Generated by an employee who quit.
 o endJob()
endJob is called as a module is quitting; modules should put their clean up code here.
 o fileAboutToBeWritten(MesquiteFile)
A method called immediately before a file is to be saved.
 o fileDirtiedByCommand(MesquiteCommand)
for FileDirtier interface
 o fileElementAdded(FileElement)
A method called when a FileElement added to the project; module can respond as needed (e.g., InitializeParsimony can add default model set to a CharacterData.
 o fileEstablished()
A method called immediately after the file has been established but not yet read in.
 o fileReadIn(MesquiteFile)
A method called immediately after the file has been read in or completely set up (if a new file).
 o findNEXUSBlock(FileElement)
Finds the NEXUS block containing the given FileElement.
 o getAppletInfo()
 o getAuthors()
Returns the authors of the module.
 o getBrowserManualPath()
returns path to manual.
 o getBrowserPanel()
Asks for hierarchy browser panel (File coordinator or trunk should override to return.
 o getCitation()
Returns the citation of the module.
 o getCommandPagePath()
returns path to page showing the commands.
 o getCompatibilityTest()
Returns CompatibilityTest so other modules know if this is compatible with some object.
 o getDateReleased()
returns the year released, as a string.
 o getDefaultModule()
Returns name of default module for superclass.
 o getDocsPath()
returns path to the root directory of the documentation of Mesquite
 o getDutyClass()
Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty
 o getDutyName()
Returns the name of the duty; set by the duty-defining library classes.
 o getExplanation()
returns an explanation of what the module does.
 o getHireSubchoice()
Returns duty Class that module would like to hire immediately upon hiring.
 o getID()
instantiations of modules are numbered sequentially so they can be referred to by number
 o getIfLastEmployee()
Returns whether this module is to remain one of the last employees of its employers.
 o getManualPath()
returns path to manual.
 o getMesquiteSubVersion()
returns subversion of the Mesquite system (".2")
 o getMesquiteVersion()
returns version of the Mesquite system
 o getModuleInfo()
Returns module info for module
 o getName()
Returns the name of the module
 o getNameAndParameters()
returns name plus current parameters, for logging etc..
 o getNameForMenuItem()
Returns the name of the module for menu items.
 o getNexusBlockTest()
Returns NexusBlockTest so interpreter knows if this module can interpret a block.
 o getNexusCommands(MesquiteFile, String)
Return any nexus commands belonging to block in file.
 o getNexusCommandTest()
Returns NexusCommandTest so interpreter knows if this module can interpret a command.
 o getPackageIntroModule()
Returns the name of the module introducing package of modules (e.g., "#aParsimonyIntro")
 o getPackageName()
Returns the name of the package of modules (e.g., "Basic Mesquite Package", "Rhetenor")
 o getParameters()
returns current parameters, for logging etc..
 o getPath()
returns path to this module's directory
 o getPermanentIDString()
A string that uniquely refers to this module (unique even across runs of Mesquite)
 o getProject()
Returns the project of the MesquiteModule
 o getRootPath()
returns path to the root directory of Mesquite (i.e., above mesquite, images, etc.)
 o getShortClassName(Class)
returns short (not full package) name of class
 o getSnapshot(MesquiteFile)
Return Mesquite commands that will put the module (approximately) back into its current state.
 o getUserChooseable()
Returns true if the module is to appear in menus and other places in which users can choose, and if can be selected in any way other than by direct request
 o getVersion()
returns the version number string of the module.
 o getVeryShortName()
Returns the name of the module in very short form.
 o iQuit()
To be called by a module to close down on its own (as opposed to being fired).
 o isPrerelease()
returns whether this module is a prerelease version
 o isSubstantive()
returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module
 o listEmployeeParameters(String)
Lists the parameters of all employees of this MesquiteModule.
 o loadPreferences()
This causes the file "prefs" in the module's directory to be read, and the contents are then sent to "processPreferencesFromFile".
 o log(String)
Places string in log.
 o logln(String)
Places string and newline character in log.
 o makeCommand(String, Commandable)
Commands are created here.
 o mesquiteStartup()
Called during Mesquite startup when the list of available modules is being constructed.
 o nameIsInstanceOf(String, Class)
returns whether the passed class, or a superclass or interface of it, has the passed name
 o offHold()
Called typically by employer to turn off hold, therefore don't update graphics.
 o okToDispose(Object, int)
passes which object is being disposed (from MesquiteListener interface)
 o onHold()
Called typically by employer to indicate that will be called soon, therefore don't update graphics.
 o outputInvalid(CommandRecord)
This passes an employeeOutputInvalid call to the employer, and so on, until some employer overrides it to do something about it.
 o pageModule(MesquiteModule, boolean)
for the paging system (may be defunct)
 o parametersChanged(CommandRecord)
A generic call to tell employer that the module's parameters have changed sufficiently that its basic calculations are no longer valid, and a recalculation should be requested.
 o preparePreferencesForFile()
This is called following a "storePreferences" call by a module.
 o processPreferencesFromFile(String[])
This is called following a "loadPreferences" call by a module.
 o quittingConditions()
Query module as to whether conditions are such that it will have to quit soon -- e.g.
 o readNexusBlock(MesquiteFile, String, FileBlock, StringBuffer, String)
Read the nexus block passed (passed only to modules claiming they can read it).
 o readNexusCommand(MesquiteFile, String, String)
Read the nexus command in the given block (passed only to modules claiming they can read it).
 o readUnrecognizedCommand(MesquiteFile, NexusBlock, String, FileBlock, String, String, StringBuffer)
Read the unrecognized command, first by looking for a module reading it, second by storing it as unrecognized within the nexus block.
 o removeNEXUSBlock(NexusBlock)
Remove NEXUS block from the file.
 o removePaging(MesquiteModule)
for the paging system (may be defunct)
 o reportProfiling()
Requests modules to report profiling.
 o respondToPaging()
for the paging system (may be defunct)
 o returningPage(MesquiteModule)
for the paging system (may be defunct)
 o setProject(MesquiteProject)
sets the file of the MesquiteModule
 o setToLastEmployee(boolean)
Sets this module to remain one of the last employees of its employers.
 o showCitation()
Returns whether or not the module does substantive calculations and thus should be cited.
 o showLogWindow()
Shows the log window.
 o showLogWindow(boolean)
Shows the log window.
 o showManual()
shows manual for module
 o showMe()
In some way shows the module, either by showing its window or its place in hierarchy
 o showWebPage(String, boolean)
requests browser to show page.
 o sorry(CommandRecord, String)
Displays a message and returns false.
 o startJob(String, Object, CommandRecord, boolean)
startJob is called automatically when an employee is hired.
 o startProfiling()
Requests modules to start profiling.
 o storePreferences()
This causes the file "prefs" in the module's directory to be written, using contents returned by the module via "preparePreferencesForFile"
 o superStartJob(String, Object, CommandRecord, boolean)
superStartJob is called automatically when an employee is hired.
 o toString()
 o windowGoAway(MesquiteWindow)
Requests a window to close.

Variables

 o mesquiteTrunk
 public static mesquite.lib.MesquiteTrunk mesquiteTrunk
Static storage so that everyone can find the trunk MesquiteModule object

 o mesquiteDirectory
 public static java.io.File mesquiteDirectory
The root of the mesquite classpath.

 o mesquiteDirectoryPath
 public static java.lang.String mesquiteDirectoryPath
The root of the mesquite classpath.

 o prefsDirectory
 public static java.io.File prefsDirectory
The directory that includes all the preference files.

 o userDirectory
 public static java.io.File userDirectory
The user's directory.

 o logWindow
 public static mesquite.lib.LogWindow logWindow
The window, created by mesquiteTrunk, that displays the log.

 o browserString
 protected static java.lang.String browserString
the file path to the web browser for showing web pages

 o checkMethodsAtStartup
 public static boolean checkMethodsAtStartup
true if does extra check for module compatibility at startup.

 o moduleInfo
 protected mesquite.lib.MesquiteModuleInfo moduleInfo
the MesquiteModuleInfo that refers to the module

 o proj
 protected mesquite.lib.MesquiteProject proj
The project that the module was hired under. Almost all modules are descendant from a file coordinating module that belongs to a specific project

 o textEdgeCompensationHeight
 public static int textEdgeCompensationHeight
 o textEdgeCompensationWidth
 public static int textEdgeCompensationWidth

Constructors

 o MesquiteModule
 public MesquiteModule()
The constructor in general is to be avoided, because modules are instantiated momentarily on startup to gather information. The usual functions of a constructor are performed by startJob

Methods

 o getID
 public long getID()
instantiations of modules are numbered sequentially so they can be referred to by number

 o getPermanentIDString
 public java.lang.String getPermanentIDString()
A string that uniquely refers to this module (unique even across runs of Mesquite)

 o broadCastAssignedID
 public void broadCastAssignedID(mesquite.lib.MesquiteModule module,
                                 java.lang.String assignedID,
                                 mesquite.lib.CommandRecord commandRec)
Broadcasts that an id has been assigned to a module. This is used for scripting, in which a module assigns itself an id string in a snapshot (e.g., a TreeContext) that an interested module can clue in to (e.g., TreeOfContext). This allows the interested module to hook up to the assigning module even if the former was script-created before the latter (see interaction between BasicTreeWindow and TreeOfContext)

 o superStartJob
 public boolean superStartJob(java.lang.String arguments,
                              java.lang.Object condition,
                              mesquite.lib.CommandRecord commandRec,
                              boolean hiredByName)
superStartJob is called automatically when an employee is hired. This is intended for use by superclasses of modules that need their own constructor-like call, without relying on the subclass to be polite enough to call super.startJob().

 o startJob
 public abstract boolean startJob(java.lang.String arguments,
                                  java.lang.Object condition,
                                  mesquite.lib.CommandRecord commandRec,
                                  boolean hiredByName)
startJob is called automatically when an employee is hired. The parameter scripting indicates if the hiring occurs in the context of automated scripting (e.g., on reading a Mesquite block of a NEXUS file). The module can limit user interface calls (e.g. dialog boxes) when scripting occurs.

The MesquiteModule should override this method, to add code to initialize things it needs, and to hire relevant necessary employees. startJob must return true if the module was successfully started; false otherwise. Thus, if the module needs a data matrix but the file has none, it returns false and the hiring process is undone.

Most modules will ignore the arguments and condition.

 o endJob
 public void endJob()
endJob is called as a module is quitting; modules should put their clean up code here.

 o closeDownEmployee
 public final void closeDownEmployee()
closeDownEmployee is called automatically when an employee is fired. It fires all employees and their subemployees etc. The MesquiteModule should call endJob to finalize things it needs.. NOTE: if a module wants to quit on its own accord, it should call "iQuit" so that the replacement hiring system can take effect.

 o iQuit
 public final void iQuit()
To be called by a module to close down on its own (as opposed to being fired). This might happen, for example, if conditions change so that the module can no longer function (e.g. all stored matrices are deleted from a file, and so StoredMatrices can no longer supply matrices). A module could also call its own endJob() method, but iQuit is to be preferred because it evokes the automatic replacement hiring system if available. (See setHiringCommand of EmployerEmployee)

 o quittingConditions
 public boolean quittingConditions()
Query module as to whether conditions are such that it will have to quit soon -- e.g. if its taxa block has been doomed. The tree window, data window, etc. override this to return true if their object is doomed. This is useful in case MesquiteListener disposing method is not called for an employer before one of its employees discovers that it needs to quit. If the employer is going to quit anyway,there is no use to use auto rehire for the quit employee.

 o fileEstablished
 public void fileEstablished()
A method called immediately after the file has been established but not yet read in.

 o fileReadIn
 public void fileReadIn(mesquite.lib.MesquiteFile f)
A method called immediately after the file has been read in or completely set up (if a new file).

 o fileAboutToBeWritten
 public void fileAboutToBeWritten(mesquite.lib.MesquiteFile f)
A method called immediately before a file is to be saved.

 o fileElementAdded
 public void fileElementAdded(mesquite.lib.FileElement element)
A method called when a FileElement added to the project; module can respond as needed (e.g., InitializeParsimony can add default model set to a CharacterData. (currently only called for Taxa and CharacterData additions).

 o getDutyClass
 public abstract java.lang.Class getDutyClass()
Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty

 o getModuleInfo
 public mesquite.lib.MesquiteModuleInfo getModuleInfo()
Returns module info for module

 o classFieldChanged
 public void classFieldChanged(java.lang.Class c,
                               java.lang.String fieldName,
                               mesquite.lib.CommandRecord commandRec)
Notifies all employees that a class field has changed.

 o parametersChanged
 public final void parametersChanged(mesquite.lib.CommandRecord commandRec)
A generic call to tell employer that the module's parameters have changed sufficiently that its basic calculations are no longer valid, and a recalculation should be requested. The employer receives the message as a call to its employeeParametersChanged. (Typically, this might follow an outputInvalid call, which

 o employeeParametersChanged
 public void employeeParametersChanged(mesquite.lib.MesquiteModule employee,
                                       mesquite.lib.MesquiteModule source,
                                       mesquite.lib.CommandRecord commandRec)
Generated by an employee calling its parametersChanged method. The MesquiteModule should act accordingly, for instance, asking the employee to do a recalculation.

 o outputInvalid
 public final void outputInvalid(mesquite.lib.CommandRecord commandRec)
This passes an employeeOutputInvalid call to the employer, and so on, until some employer overrides it to do something about it. The purpose of this is not to call for recalculations, but primarily to allow the output to be turned blank while long recalculations are done. To force recalculation, parametersChanged should be called after outputInvalid is called

 o employeeOutputInvalid
 public void employeeOutputInvalid(mesquite.lib.MesquiteModule employee,
                                   mesquite.lib.MesquiteModule source,
                                   mesquite.lib.CommandRecord commandRec)
Generated by an employee calling its outputInvalide method. The MesquiteModule should blank any output.

 o employeeQuit
 public void employeeQuit(mesquite.lib.MesquiteModule employee)
Generated by an employee who quit. The MesquiteModule should act accordingly.

 o setToLastEmployee
 public void setToLastEmployee(boolean last)
Sets this module to remain one of the last employees of its employers.

 o getIfLastEmployee
 public boolean getIfLastEmployee()
Returns whether this module is to remain one of the last employees of its employers.

 o onHold
 public void onHold()
Called typically by employer to indicate that will be called soon, therefore don't update graphics.

 o offHold
 public void offHold()
Called typically by employer to turn off hold, therefore don't update graphics.

 o loadPreferences
 public final void loadPreferences()
This causes the file "prefs" in the module's directory to be read, and the contents are then sent to "processPreferencesFromFile".

 o processPreferencesFromFile
 public void processPreferencesFromFile(java.lang.String prefs[])
This is called following a "loadPreferences" call by a module. A module can override it to process the preferences string

 o storePreferences
 public final void storePreferences()
This causes the file "prefs" in the module's directory to be written, using contents returned by the module via "preparePreferencesForFile"

 o preparePreferencesForFile
 public java.lang.String[] preparePreferencesForFile()
This is called following a "storePreferences" call by a module. A module should override it to indicate the strings to save to its preferences file.

 o getPath
 public java.lang.String getPath()
returns path to this module's directory

 o getRootPath
 public static java.lang.String getRootPath()
returns path to the root directory of Mesquite (i.e., above mesquite, images, etc.)

 o getDocsPath
 public static java.lang.String getDocsPath()
returns path to the root directory of the documentation of Mesquite

 o alert
 public void alert(java.lang.String s)
Displays an alert in log; also in dialog if flag is set.

 o sorry
 public boolean sorry(mesquite.lib.CommandRecord commandRec,
                      java.lang.String s)
Displays a message and returns false. For use when a method fails and is returning false to indicate this, and needs to present a notice to the user. (This method was made so as to change easily statements of "return false" so that they also gave a message, without having to split into two lines.)

 o log
 public void log(java.lang.String s)
Places string in log.

 o logln
 public void logln(java.lang.String s)
Places string and newline character in log.

 o showLogWindow
 public static void showLogWindow()
Shows the log window.

 o showLogWindow
 public static void showLogWindow(boolean bringToFront)
Shows the log window.

 o disposing
 public void disposing(java.lang.Object obj)
passes which object is being disposed (from MesquiteListener interface)

 o okToDispose
 public boolean okToDispose(java.lang.Object obj,
                            int queryUser)
passes which object is being disposed (from MesquiteListener interface)

 o changed
 public void changed(java.lang.Object caller,
                     java.lang.Object obj,
                     int code,
                     int parameters[])
passes which object changed, along with optional integer (e.g. for character) (from MesquiteListener interface)

 o startProfiling
 public void startProfiling()
Requests modules to start profiling.

 o reportProfiling
 public void reportProfiling()
Requests modules to report profiling.

 o doCommand
 public java.lang.Object doCommand(java.lang.String commandName,
                                   java.lang.String arguments,
                                   mesquite.lib.CommandRecord commandRec,
                                   mesquite.lib.CommandChecker checker)
A request for the MesquiteModule to perform a command. It is passed two strings, the name of the command and the arguments. This should be overridden by any module that wants to respond to a command.

 o containerOfModule
 public java.awt.Frame containerOfModule()
Returns the window of the MesquiteModule, or if none, the window of the nearest employer with a window. NONEMBEDDED VERSION

 o getProject
 public mesquite.lib.MesquiteProject getProject()
Returns the project of the MesquiteModule

 o setProject
 public void setProject(mesquite.lib.MesquiteProject proj)
sets the file of the MesquiteModule

 o windowGoAway
 public void windowGoAway(mesquite.lib.MesquiteWindow whichWindow)
Requests a window to close. In the process, subclasses of MesquiteWindow might close down their owning MesquiteModules etc.

 o makeCommand
 public static final mesquite.lib.MesquiteCommand makeCommand(java.lang.String commandName,
                                                              mesquite.lib.Commandable ownerObject)
Commands are created here. This method is used in case Mesquite wants to catalogue available Commands (so far, this has not proved useful). The commands used to be stored within a single static vector, but this caused many otherwise defunct objects (the Commandables that are the object of the commands) to be referenced and thus not GC'd. In the future, commands might be more sophisticated, and passed here will be not only the commandName, but also the parameter types expected and how they are to be called. See the sublibrary for more information about Commands.

 o addNEXUSBlock
 public void addNEXUSBlock(mesquite.lib.NexusBlock nb)
Adds NEXUS block to the file.

 o removeNEXUSBlock
 public void removeNEXUSBlock(mesquite.lib.NexusBlock nb)
Remove NEXUS block from the file.

 o findNEXUSBlock
 public mesquite.lib.NexusBlock findNEXUSBlock(mesquite.lib.FileElement e)
Finds the NEXUS block containing the given FileElement.

 o readNexusBlock
 public mesquite.lib.NexusBlock readNexusBlock(mesquite.lib.MesquiteFile file,
                                               java.lang.String name,
                                               mesquite.lib.FileBlock block,
                                               java.lang.StringBuffer blockComments,
                                               java.lang.String fileReadingArguments)
Read the nexus block passed (passed only to modules claiming they can read it).

 o readNexusCommand
 public boolean readNexusCommand(mesquite.lib.MesquiteFile file,
                                 java.lang.String blockName,
                                 java.lang.String command)
Read the nexus command in the given block (passed only to modules claiming they can read it). Returns true if successful

 o readUnrecognizedCommand
 public void readUnrecognizedCommand(mesquite.lib.MesquiteFile file,
                                     mesquite.lib.NexusBlock nBlock,
                                     java.lang.String blockName,
                                     mesquite.lib.FileBlock block,
                                     java.lang.String commandName,
                                     java.lang.String command,
                                     java.lang.StringBuffer blockComments)
Read the unrecognized command, first by looking for a module reading it, second by storing it as unrecognized within the nexus block.

 o getNexusCommands
 public java.lang.String getNexusCommands(mesquite.lib.MesquiteFile file,
                                          java.lang.String blockName)
Return any nexus commands belonging to block in file.

 o getSnapshot
 public mesquite.lib.Snapshot getSnapshot(mesquite.lib.MesquiteFile file)
Return Mesquite commands that will put the module (approximately) back into its current state. Used so that on file save, a Mesquite block can be saved that will return the user more or less to previous state.

 o pageModule
 public void pageModule(mesquite.lib.MesquiteModule fromModule,
                        boolean persistent)
for the paging system (may be defunct)

 o removePaging
 public void removePaging(mesquite.lib.MesquiteModule fromModule)
for the paging system (may be defunct)

 o returningPage
 protected void returningPage(mesquite.lib.MesquiteModule pagedModule)
for the paging system (may be defunct)

 o respondToPaging
 protected void respondToPaging()
for the paging system (may be defunct)

 o accumulateParameters
 public java.lang.String accumulateParameters(java.lang.String spacer)
 o getParameters
 public java.lang.String getParameters()
returns current parameters, for logging etc..

 o getNameAndParameters
 public java.lang.String getNameAndParameters()
returns name plus current parameters, for logging etc..

 o listEmployeeParameters
 public java.lang.String listEmployeeParameters(java.lang.String spacer)
Lists the parameters of all employees of this MesquiteModule.

 o getShortClassName
 public static java.lang.String getShortClassName(java.lang.Class classToShow)
returns short (not full package) name of class

 o nameIsInstanceOf
 public static boolean nameIsInstanceOf(java.lang.String n,
                                        java.lang.Class c)
returns whether the passed class, or a superclass or interface of it, has the passed name

 o getManualPath
 public java.lang.String getManualPath()
returns path to manual. Null if manual doesn't exist

 o getCommandPagePath
 public java.lang.String getCommandPagePath()
returns path to page showing the commands. Null if page doesn't exist

 o getBrowserManualPath
 public java.lang.String getBrowserManualPath()
returns path to manual. Null if manual doesn't exist

 o showManual
 public void showManual()
shows manual for module

 o showWebPage
 public static void showWebPage(java.lang.String path,
                                boolean autoCompose)
requests browser to show page. boolean indicates whether the standard auto-generated documentation pages for all the modules should be composed if they haven't been.

 o getBrowserPanel
 public mesquite.lib.HPanel getBrowserPanel()
Asks for hierarchy browser panel (File coordinator or trunk should override to return.

 o showMe
 public void showMe()
In some way shows the module, either by showing its window or its place in hierarchy

 o getVeryShortName
 public java.lang.String getVeryShortName()
Returns the name of the module in very short form. For use for column headings and other constrained places. Unless overridden returns getName()

 o getNameForMenuItem
 public java.lang.String getNameForMenuItem()
Returns the name of the module for menu items. Unless overridden returns getName()

 o getName
 public abstract java.lang.String getName()
Returns the name of the module

Overrides:
getName in class java.awt.Component
 o getAuthors
 public java.lang.String getAuthors()
Returns the authors of the module. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION

 o getVersion
 public java.lang.String getVersion()
returns the version number string of the module. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION

 o getDateReleased
 public java.lang.String getDateReleased()
returns the year released, as a string. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION

 o showCitation
 public boolean showCitation()
Returns whether or not the module does substantive calculations and thus should be cited. If true, its citation will appear in the citations panel of the windows

 o getCitation
 public java.lang.String getCitation()
Returns the citation of the module. Composed from authors, version, year, name.

 o getPackageIntroModule
 public java.lang.String getPackageIntroModule()
Returns the name of the module introducing package of modules (e.g., "#aParsimonyIntro")

 o getPackageName
 public java.lang.String getPackageName()
Returns the name of the package of modules (e.g., "Basic Mesquite Package", "Rhetenor")

 o getMesquiteVersion
 public static final java.lang.String getMesquiteVersion()
returns version of the Mesquite system

 o getMesquiteSubVersion
 public static final java.lang.String getMesquiteSubVersion()
returns subversion of the Mesquite system (".2")

 o isPrerelease
 public boolean isPrerelease()
returns whether this module is a prerelease version

 o isSubstantive
 public boolean isSubstantive()
returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module

 o anySubstantivePrereleases
 public boolean anySubstantivePrereleases()
returns whether this or employee modules are substantive and prerelease

 o compatibleWithSystem
 public boolean compatibleWithSystem()
returns whether the module is compatible with the current OS, Mesquite system, Java VM, and so on. If false then the module will not be loaded as a possibility at startup

 o getAppletInfo
 public java.lang.String getAppletInfo()
Overrides:
getAppletInfo in class java.applet.Applet
 o toString
 public java.lang.String toString()
Overrides:
toString in class java.awt.Component
 o getExplanation
 public java.lang.String getExplanation()
returns an explanation of what the module does. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION

 o fileDirtiedByCommand
 public void fileDirtiedByCommand(mesquite.lib.MesquiteCommand command)
for FileDirtier interface

 o getDutyName
 public java.lang.String getDutyName()
Returns the name of the duty; set by the duty-defining library classes.

 o getDefaultModule
 public java.lang.String[] getDefaultModule()
Returns name of default module for superclass.

 o getCompatibilityTest
 public mesquite.lib.CompatibilityTest getCompatibilityTest()
Returns CompatibilityTest so other modules know if this is compatible with some object.

 o getNexusBlockTest
 public mesquite.lib.NexusBlockTest getNexusBlockTest()
Returns NexusBlockTest so interpreter knows if this module can interpret a block.

 o getNexusCommandTest
 public mesquite.lib.NexusCommandTest getNexusCommandTest()
Returns NexusCommandTest so interpreter knows if this module can interpret a command.

 o getUserChooseable
 public boolean getUserChooseable()
Returns true if the module is to appear in menus and other places in which users can choose, and if can be selected in any way other than by direct request

 o getHireSubchoice
 public java.lang.Class getHireSubchoice()
Returns duty Class that module would like to hire immediately upon hiring. If a module wants to present a user with a choice of employees to hire, it can request a submenu listing these possible employees. However, if one of these employees would like to immediately (on startup) hire a user-specified subemployee (without having to go through a dialog box, etc.), this employee can indicate this by passing back through getHireSubchoice the duty class of the subemployee it would like to hire. Mesquite then lists a subsubmenu indicating possible subemployees. That way, the user not only chooses the employee, but specifies the subemployee. When the employee is started via startJob, the tokenized string of the name of the module that the user requested as subemployee is passed as an argument.

 o mesquiteStartup
 public void mesquiteStartup()
Called during Mesquite startup when the list of available modules is being constructed.


All Packages  Class Hierarchy  This Package  Previous  Next  Index