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.
-
browserString
- the file path to the web browser for showing web pages
-
checkMethodsAtStartup
- true if does extra check for module compatibility at startup.
-
logWindow
- The window, created by mesquiteTrunk, that displays the log.
-
mesquiteDirectory
- The root of the mesquite classpath.
-
mesquiteDirectoryPath
- The root of the mesquite classpath.
-
mesquiteTrunk
- Static storage so that everyone can find the trunk MesquiteModule object
-
moduleInfo
- the MesquiteModuleInfo that refers to the module
-
prefsDirectory
- The directory that includes all the preference files.
-
proj
- The project that the module was hired under.
-
textEdgeCompensationHeight
-
-
textEdgeCompensationWidth
-
-
userDirectory
- The user's directory.
-
MesquiteModule()
- The constructor in general is to be avoided, because modules are instantiated momentarily on startup to gather
information.
-
accumulateParameters(String)
-
-
addNEXUSBlock(NexusBlock)
- Adds NEXUS block to the file.
-
alert(String)
- Displays an alert in log; also in dialog if flag is set.
-
anySubstantivePrereleases()
- returns whether this or employee modules are substantive and prerelease
-
broadCastAssignedID(MesquiteModule, String, CommandRecord)
- Broadcasts that an id has been assigned to a module.
-
changed(Object, Object, int, int[])
- passes which object changed, along with optional integer (e.g.
-
classFieldChanged(Class, String, CommandRecord)
- Notifies all employees that a class field has changed.
-
closeDownEmployee()
- closeDownEmployee is called automatically when an employee is fired.
-
compatibleWithSystem()
- returns whether the module is compatible with the current OS, Mesquite system, Java VM, and so on.
-
containerOfModule()
- Returns the window of the MesquiteModule, or if none, the window of the nearest employer with a window.
-
disposing(Object)
- passes which object is being disposed (from MesquiteListener interface)
-
doCommand(String, String, CommandRecord, CommandChecker)
- A request for the MesquiteModule to perform a command.
-
employeeOutputInvalid(MesquiteModule, MesquiteModule, CommandRecord)
- Generated by an employee calling its outputInvalide method.
-
employeeParametersChanged(MesquiteModule, MesquiteModule, CommandRecord)
- Generated by an employee calling its parametersChanged method.
-
employeeQuit(MesquiteModule)
- Generated by an employee who quit.
-
endJob()
- endJob is called as a module is quitting; modules should put their clean up code here.
-
fileAboutToBeWritten(MesquiteFile)
- A method called immediately before a file is to be saved.
-
fileDirtiedByCommand(MesquiteCommand)
- for FileDirtier interface
-
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.
-
fileEstablished()
- A method called immediately after the file has been established but not yet read in.
-
fileReadIn(MesquiteFile)
- A method called immediately after the file has been read in or completely set up (if a new file).
-
findNEXUSBlock(FileElement)
- Finds the NEXUS block containing the given FileElement.
-
getAppletInfo()
-
-
getAuthors()
- Returns the authors of the module.
-
getBrowserManualPath()
- returns path to manual.
-
getBrowserPanel()
- Asks for hierarchy browser panel (File coordinator or trunk should override to return.
-
getCitation()
- Returns the citation of the module.
-
getCommandPagePath()
- returns path to page showing the commands.
-
getCompatibilityTest()
- Returns CompatibilityTest so other modules know if this is compatible with some object.
-
getDateReleased()
- returns the year released, as a string.
-
getDefaultModule()
- Returns name of default module for superclass.
-
getDocsPath()
- returns path to the root directory of the documentation of Mesquite
-
getDutyClass()
- Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty
-
getDutyName()
- Returns the name of the duty; set by the duty-defining library classes.
-
getExplanation()
- returns an explanation of what the module does.
-
getHireSubchoice()
- Returns duty Class that module would like to hire immediately upon hiring.
-
getID()
- instantiations of modules are numbered sequentially so they can be referred to by number
-
getIfLastEmployee()
- Returns whether this module is to remain one of the last employees of its employers.
-
getManualPath()
- returns path to manual.
-
getMesquiteSubVersion()
- returns subversion of the Mesquite system (".2")
-
getMesquiteVersion()
- returns version of the Mesquite system
-
getModuleInfo()
- Returns module info for module
-
getName()
- Returns the name of the module
-
getNameAndParameters()
- returns name plus current parameters, for logging etc..
-
getNameForMenuItem()
- Returns the name of the module for menu items.
-
getNexusBlockTest()
- Returns NexusBlockTest so interpreter knows if this module can interpret a block.
-
getNexusCommands(MesquiteFile, String)
- Return any nexus commands belonging to block in file.
-
getNexusCommandTest()
- Returns NexusCommandTest so interpreter knows if this module can interpret a command.
-
getPackageIntroModule()
- Returns the name of the module introducing package of modules (e.g., "#aParsimonyIntro")
-
getPackageName()
- Returns the name of the package of modules (e.g., "Basic Mesquite Package", "Rhetenor")
-
getParameters()
- returns current parameters, for logging etc..
-
getPath()
- returns path to this module's directory
-
getPermanentIDString()
- A string that uniquely refers to this module (unique even across runs of Mesquite)
-
getProject()
- Returns the project of the MesquiteModule
-
getRootPath()
- returns path to the root directory of Mesquite (i.e., above mesquite, images, etc.)
-
getShortClassName(Class)
- returns short (not full package) name of class
-
getSnapshot(MesquiteFile)
- Return Mesquite commands that will put the module (approximately) back into its current state.
-
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
-
getVersion()
- returns the version number string of the module.
-
getVeryShortName()
- Returns the name of the module in very short form.
-
iQuit()
- To be called by a module to close down on its own (as opposed to being fired).
-
isPrerelease()
- returns whether this module is a prerelease version
-
isSubstantive()
- returns whether this module does substantive calculations affecting analysis results,
or only a graphical/UI/input-output module
-
listEmployeeParameters(String)
- Lists the parameters of all employees of this MesquiteModule.
-
loadPreferences()
- This causes the file "prefs" in the module's directory to be read, and the contents
are then sent to "processPreferencesFromFile".
-
log(String)
- Places string in log.
-
logln(String)
- Places string and newline character in log.
-
makeCommand(String, Commandable)
- Commands are created here.
-
mesquiteStartup()
- Called during Mesquite startup when the list of available modules is being constructed.
-
nameIsInstanceOf(String, Class)
- returns whether the passed class, or a superclass or interface of it, has the passed name
-
offHold()
- Called typically by employer to turn off hold, therefore don't update graphics.
-
okToDispose(Object, int)
- passes which object is being disposed (from MesquiteListener interface)
-
onHold()
- Called typically by employer to indicate that will be called soon, therefore don't update graphics.
-
outputInvalid(CommandRecord)
- This passes an employeeOutputInvalid call to the employer, and so on, until some employer overrides it to do something about it.
-
pageModule(MesquiteModule, boolean)
- for the paging system (may be defunct)
-
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.
-
preparePreferencesForFile()
- This is called following a "storePreferences" call by a module.
-
processPreferencesFromFile(String[])
- This is called following a "loadPreferences" call by a module.
-
quittingConditions()
- Query module as to whether conditions are such that it will have to quit soon -- e.g.
-
readNexusBlock(MesquiteFile, String, FileBlock, StringBuffer, String)
- Read the nexus block passed (passed only to modules claiming they can read it).
-
readNexusCommand(MesquiteFile, String, String)
- Read the nexus command in the given block (passed only to modules claiming they can read it).
-
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.
-
removeNEXUSBlock(NexusBlock)
- Remove NEXUS block from the file.
-
removePaging(MesquiteModule)
- for the paging system (may be defunct)
-
reportProfiling()
- Requests modules to report profiling.
-
respondToPaging()
- for the paging system (may be defunct)
-
returningPage(MesquiteModule)
- for the paging system (may be defunct)
-
setProject(MesquiteProject)
- sets the file of the MesquiteModule
-
setToLastEmployee(boolean)
- Sets this module to remain one of the last employees of its employers.
-
showCitation()
- Returns whether or not the module does substantive calculations and thus should be cited.
-
showLogWindow()
- Shows the log window.
-
showLogWindow(boolean)
- Shows the log window.
-
showManual()
- shows manual for module
-
showMe()
- In some way shows the module, either by showing its window or its place in hierarchy
-
showWebPage(String, boolean)
- requests browser to show page.
-
sorry(CommandRecord, String)
- Displays a message and returns false.
-
startJob(String, Object, CommandRecord, boolean)
- startJob is called automatically when an employee is hired.
-
startProfiling()
- Requests modules to start profiling.
-
storePreferences()
- This causes the file "prefs" in the module's directory to be written, using contents
returned by the module via "preparePreferencesForFile"
-
superStartJob(String, Object, CommandRecord, boolean)
- superStartJob is called automatically when an employee is hired.
-
toString()
-
-
windowGoAway(MesquiteWindow)
- Requests a window to close.
mesquiteTrunk
public static mesquite.lib.MesquiteTrunk mesquiteTrunk
- Static storage so that everyone can find the trunk MesquiteModule object
mesquiteDirectory
public static java.io.File mesquiteDirectory
- The root of the mesquite classpath.
mesquiteDirectoryPath
public static java.lang.String mesquiteDirectoryPath
- The root of the mesquite classpath.
prefsDirectory
public static java.io.File prefsDirectory
- The directory that includes all the preference files.
userDirectory
public static java.io.File userDirectory
- The user's directory.
logWindow
public static mesquite.lib.LogWindow logWindow
- The window, created by mesquiteTrunk, that displays the log.
browserString
protected static java.lang.String browserString
- the file path to the web browser for showing web pages
checkMethodsAtStartup
public static boolean checkMethodsAtStartup
- true if does extra check for module compatibility at startup.
moduleInfo
protected mesquite.lib.MesquiteModuleInfo moduleInfo
- the MesquiteModuleInfo that refers to the module
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
textEdgeCompensationHeight
public static int textEdgeCompensationHeight
textEdgeCompensationWidth
public static int textEdgeCompensationWidth
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
getID
public long getID()
- instantiations of modules are numbered sequentially so they can be referred to by number
getPermanentIDString
public java.lang.String getPermanentIDString()
- A string that uniquely refers to this module (unique even across runs of Mesquite)
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)
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().
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.
endJob
public void endJob()
- endJob is called as a module is quitting; modules should put their clean up code here.
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.
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)
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.
fileEstablished
public void fileEstablished()
- A method called immediately after the file has been established but not yet read in.
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).
fileAboutToBeWritten
public void fileAboutToBeWritten(mesquite.lib.MesquiteFile f)
- A method called immediately before a file is to be saved.
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).
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
getModuleInfo
public mesquite.lib.MesquiteModuleInfo getModuleInfo()
- Returns module info for module
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.
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
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.
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
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.
employeeQuit
public void employeeQuit(mesquite.lib.MesquiteModule employee)
- Generated by an employee who quit. The MesquiteModule should act accordingly.
setToLastEmployee
public void setToLastEmployee(boolean last)
- Sets this module to remain one of the last employees of its employers.
getIfLastEmployee
public boolean getIfLastEmployee()
- Returns whether this module is to remain one of the last employees of its employers.
onHold
public void onHold()
- Called typically by employer to indicate that will be called soon, therefore don't update graphics.
offHold
public void offHold()
- Called typically by employer to turn off hold, therefore don't update graphics.
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".
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
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"
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.
getPath
public java.lang.String getPath()
- returns path to this module's directory
getRootPath
public static java.lang.String getRootPath()
- returns path to the root directory of Mesquite (i.e., above mesquite, images, etc.)
getDocsPath
public static java.lang.String getDocsPath()
- returns path to the root directory of the documentation of Mesquite
alert
public void alert(java.lang.String s)
- Displays an alert in log; also in dialog if flag is set.
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.)
log
public void log(java.lang.String s)
- Places string in log.
logln
public void logln(java.lang.String s)
- Places string and newline character in log.
showLogWindow
public static void showLogWindow()
- Shows the log window.
showLogWindow
public static void showLogWindow(boolean bringToFront)
- Shows the log window.
disposing
public void disposing(java.lang.Object obj)
- passes which object is being disposed (from MesquiteListener interface)
okToDispose
public boolean okToDispose(java.lang.Object obj,
int queryUser)
- passes which object is being disposed (from MesquiteListener interface)
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)
startProfiling
public void startProfiling()
- Requests modules to start profiling.
reportProfiling
public void reportProfiling()
- Requests modules to report profiling.
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.
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
getProject
public mesquite.lib.MesquiteProject getProject()
- Returns the project of the MesquiteModule
setProject
public void setProject(mesquite.lib.MesquiteProject proj)
- sets the file of the MesquiteModule
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.
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.
addNEXUSBlock
public void addNEXUSBlock(mesquite.lib.NexusBlock nb)
- Adds NEXUS block to the file.
removeNEXUSBlock
public void removeNEXUSBlock(mesquite.lib.NexusBlock nb)
- Remove NEXUS block from the file.
findNEXUSBlock
public mesquite.lib.NexusBlock findNEXUSBlock(mesquite.lib.FileElement e)
- Finds the NEXUS block containing the given FileElement.
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).
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
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.
getNexusCommands
public java.lang.String getNexusCommands(mesquite.lib.MesquiteFile file,
java.lang.String blockName)
- Return any nexus commands belonging to block in file.
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.
pageModule
public void pageModule(mesquite.lib.MesquiteModule fromModule,
boolean persistent)
- for the paging system (may be defunct)
removePaging
public void removePaging(mesquite.lib.MesquiteModule fromModule)
- for the paging system (may be defunct)
returningPage
protected void returningPage(mesquite.lib.MesquiteModule pagedModule)
- for the paging system (may be defunct)
respondToPaging
protected void respondToPaging()
- for the paging system (may be defunct)
accumulateParameters
public java.lang.String accumulateParameters(java.lang.String spacer)
getParameters
public java.lang.String getParameters()
- returns current parameters, for logging etc..
getNameAndParameters
public java.lang.String getNameAndParameters()
- returns name plus current parameters, for logging etc..
listEmployeeParameters
public java.lang.String listEmployeeParameters(java.lang.String spacer)
- Lists the parameters of all employees of this MesquiteModule.
getShortClassName
public static java.lang.String getShortClassName(java.lang.Class classToShow)
- returns short (not full package) name of class
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
getManualPath
public java.lang.String getManualPath()
- returns path to manual. Null if manual doesn't exist
getCommandPagePath
public java.lang.String getCommandPagePath()
- returns path to page showing the commands. Null if page doesn't exist
getBrowserManualPath
public java.lang.String getBrowserManualPath()
- returns path to manual. Null if manual doesn't exist
showManual
public void showManual()
- shows manual for module
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.
getBrowserPanel
public mesquite.lib.HPanel getBrowserPanel()
- Asks for hierarchy browser panel (File coordinator or trunk should override to return.
showMe
public void showMe()
- In some way shows the module, either by showing its window or its place in hierarchy
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()
getNameForMenuItem
public java.lang.String getNameForMenuItem()
- Returns the name of the module for menu items. Unless overridden returns getName()
getName
public abstract java.lang.String getName()
- Returns the name of the module
- Overrides:
- getName in class java.awt.Component
getAuthors
public java.lang.String getAuthors()
- Returns the authors of the module. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION
getVersion
public java.lang.String getVersion()
- returns the version number string of the module. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION
getDateReleased
public java.lang.String getDateReleased()
- returns the year released, as a string. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION
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
getCitation
public java.lang.String getCitation()
- Returns the citation of the module. Composed from authors, version, year, name.
getPackageIntroModule
public java.lang.String getPackageIntroModule()
- Returns the name of the module introducing package of modules (e.g., "#aParsimonyIntro")
getPackageName
public java.lang.String getPackageName()
- Returns the name of the package of modules (e.g., "Basic Mesquite Package", "Rhetenor")
getMesquiteVersion
public static final java.lang.String getMesquiteVersion()
- returns version of the Mesquite system
getMesquiteSubVersion
public static final java.lang.String getMesquiteSubVersion()
- returns subversion of the Mesquite system (".2")
isPrerelease
public boolean isPrerelease()
- returns whether this module is a prerelease version
isSubstantive
public boolean isSubstantive()
- returns whether this module does substantive calculations affecting analysis results,
or only a graphical/UI/input-output module
anySubstantivePrereleases
public boolean anySubstantivePrereleases()
- returns whether this or employee modules are substantive and prerelease
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
getAppletInfo
public java.lang.String getAppletInfo()
- Overrides:
- getAppletInfo in class java.applet.Applet
toString
public java.lang.String toString()
- Overrides:
- toString in class java.awt.Component
getExplanation
public java.lang.String getExplanation()
- returns an explanation of what the module does. //TODO: SHOULD BE ABSTRACT TO FORCE INCLUSION
fileDirtiedByCommand
public void fileDirtiedByCommand(mesquite.lib.MesquiteCommand command)
- for FileDirtier interface
getDutyName
public java.lang.String getDutyName()
- Returns the name of the duty; set by the duty-defining library classes.
getDefaultModule
public java.lang.String[] getDefaultModule()
- Returns name of default module for superclass.
getCompatibilityTest
public mesquite.lib.CompatibilityTest getCompatibilityTest()
- Returns CompatibilityTest so other modules know if this is compatible with some object.
getNexusBlockTest
public mesquite.lib.NexusBlockTest getNexusBlockTest()
- Returns NexusBlockTest so interpreter knows if this module can interpret a block.
getNexusCommandTest
public mesquite.lib.NexusCommandTest getNexusCommandTest()
- Returns NexusCommandTest so interpreter knows if this module can interpret a command.
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
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.
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