mesquite.lib.duties
Class NumberForTree

java.lang.Object
  extended by mesquite.lib.MenuOwner
      extended by mesquite.lib.EmployerEmployee
          extended by mesquite.lib.MesquiteModule
              extended by mesquite.lib.duties.NumberForTreeWContext
                  extended by mesquite.lib.duties.NumberForTree
All Implemented Interfaces:
Commandable, Doomable, NumberForItem, Explainable, FileDirtier, FunctionExplainable, HNode, Identifiable, Listable, Logger, MesquiteListener, Showable
Direct Known Subclasses:
GeneTreeFit, NumberForTreeDivers, NumberForTreeIncr, NumberForTreeM, SpeciesTreeFit

public abstract class NumberForTree
extends NumberForTreeWContext
implements NumberForItem

Supplies a number for a tree.


Field Summary
 
Fields inherited from class mesquite.lib.MesquiteModule
author, browserString, checkMethodsAtStartup, hiredAsDefaultInScripting, lastResult, lastResultString, logWindow, mesquiteDirectory, mesquiteDirectoryPath, mesquiteTrunk, moduleInfo, prefsDirectory, proj, textEdgeCompensationHeight, textEdgeCompensationWidth, totalFinalized, userDirectory
 
Fields inherited from class mesquite.lib.EmployerEmployee
employees, employer, startupBailOut, stringPos, suppressHireQueries, totalCreated, totalDisposed, useOtherChoices
 
Fields inherited from class mesquite.lib.MenuOwner
considerPriorities, doomed, MAXPRIORITY, menuCompositionTime, menuCompositionTime1, menuCompositionTime2, menuCompositionTime2a, menuCompositionTime2b, menuCompositionTime2c, menuCompositionTime3, menuCompositionTime4, menuCompositionTime5, menuCompositionTime6, menuCompositionTime7, menuCompositionTime8, menuCompositionTime9, menuTracing, module, parser
 
Fields inherited from interface mesquite.lib.MesquiteListener
ANNOTATION_ADDED, ANNOTATION_CHANGED, ANNOTATION_DELETED, ASSOCIATED_CHANGED, BRANCHES_REARRANGED, BRANCHLENGTHS_CHANGED, COMMAND_CANCELLED, DATA_CHANGED, ELEMENT_CHANGED, ITEMS_ADDED, NAMES_CHANGED, OBJECT_DESTROYED, PARTS_ADDED, PARTS_CHANGED, PARTS_DELETED, PARTS_MOVED, SELECTION_CHANGED, TAXA_SUBSTITUTED, TEXTFIELD_EDITED, UNKNOWN, VALUE_CHANGED
 
Fields inherited from interface mesquite.lib.HNode
MOUSEDOWN, MOUSEEXIT, MOUSEMOVE
 
Constructor Summary
NumberForTree()
           
 
Method Summary
 boolean biggerIsBetter()
          indicates default optimization, e.g.
 void calculateNumber(java.lang.Object object1, java.lang.Object object2, MesquiteNumber result, MesquiteString resultString)
           
abstract  void calculateNumber(Tree tree, MesquiteNumber result, MesquiteString resultString)
           
 void calculateNumberInContext(java.lang.Object object1, java.lang.Object object2, ItemsSource source, int whichItem, MesquiteNumber result, MesquiteString resultString)
           
 void calculateNumberInContext(Tree tree, TreeSource source, int whichTree, MesquiteNumber result, MesquiteString resultString)
           
 java.lang.String[] getDefaultModule()
          Returns name of default module for superclass.
 java.lang.Class getDutyClass()
          Returns duty Class the module belongs to; should be defined not by module itself but by abstract class representing duty
 java.lang.String getDutyName()
          Returns the name of the duty; set by the duty-defining library classes.
 java.lang.String getNameOfValueCalculated()
           
 void initialize(java.lang.Object object1, java.lang.Object object2)
          Called to provoke any necessary initialization.
 void initialize(Tree tree)
          Called to provoke any necessary initialization.
 boolean returnsMultipleValues()
           
 
Methods inherited from class mesquite.lib.duties.NumberForTreeWContext
getFunctionIconPath
 
Methods inherited from class mesquite.lib.MesquiteModule
accumulateParameters, addNEXUSBlock, alert, alert, anySubstantivePrereleases, broadCastAssignedID, changed, classFieldChanged, clearLastResult, clearResultAndLastResult, compatibleWithSystem, containerOfModule, createSupportDirectory, deleteSupportDirectory, discreetAlert, discreetAlert, dispose, disposing, doCommand, echoStringToFile, employeeOutputInvalid, employeeParametersChanged, employeeQuit, employerWithWindow, endJob, fileAboutToBeWritten, fileDirtiedByCommand, fileElementAdded, fileReadIn, finalize, findNEXUSBlock, getAppletInfo, getAuthors, getAutoSaveMacros, getBrowserManualPath, getBrowserPanel, getBuildDate, getBuildVersion, getCitation, getCommandPagePath, getCompatibilityTest, getDateReleased, getDocsPath, getExpectedPath, getExplanation, getHireSubchoice, getHTMLExplanation, getID, getIfLastEmployee, getKeywords, getManualPath, getMesquiteVersion, getModuleInfo, getName, getNameAndParameters, getNameForMenuItem, getNexusBlockTest, getNexusCommands, getNexusCommandTest, getPackageImagesPath, getPackageIntroModule, getPackagePath, getParameters, getParametersChangedNotifier, getPath, getPermanentIDString, getProject, getRootImageDirectoryPath, getRootPath, getShortClassName, getShortClassName, getSizedRootImageFilePath, getSnapshot, getSubfunctions, getSubfunctionsVector, getURLString, getUserChooseable, getVersion, getVersionInt, getVersionOfFirstRelease, getVeryShortName, getXMLPrefsVersion, iQuit, iQuit, isCorrectRootTag, isPrerelease, isSubstantive, listEmployeeParameters, listEmployees, loadPreferences, log, log, logln, logln, loglnNoEcho, logNoEcho, makeCommand, mesquiteStartup, nameIsInstanceOf, nameMatches, offHold, okToDispose, onHold, outputInvalid, pageModule, panelGoAway, parametersChanged, parametersChanged, parseFullXMLDocument, permanentIDExists, preparePreferencesForFile, preparePreferencesForXML, processPreferencesFromFile, processPreferencesFromXML, processSingleXMLPreference, projectEstablished, quittingConditions, readNexusBlock, readNexusCommand, readUnrecognizedCommand, registerSubfunction, removeNEXUSBlock, removePaging, reportProfiling, requestPrimaryChoice, respondToPaging, returningPage, saveLastResult, saveLastResult, saveLastResult, saveLastResult, saveLastResultString, saveLastResultString, setAutoSaveMacros, setProject, setToLastEmployee, showCitation, showHTMLSnippet, showLogWindow, showLogWindow, showManual, showMe, showWebPage, showWebPage, sorry, startJob, startProfiling, storePreferences, superStartJob, supportDirectoryPath, toString, URLinPackageIntro, windowGoAway, writeNexusCommands, xmlPrefsVersionMustMatch
 
Methods inherited from class mesquite.lib.EmployerEmployee
canHireMoreThanOnce, closeDownAllEmployees, decrementEmployeeBrowserRefreshSuppression, deferBranchPriority, employeeOfWhichEmployee, findCharacterDataEditor, findCharacterDataEditorRec, findElementManager, findEmployee, findEmployee, findEmployeeNeed, findEmployeeWithDuty, findEmployeeWithDuty, findEmployeeWithIDNumber, findEmployeeWithName, findEmployeeWithName, findEmployeeWithName, findEmployeeWithPermanentID, findEmployerWithDuty, findImmediateEmployeeWithDuty, findModelCurator, findModelCuratorRec, findModules, findModulesWithDuty, findNearestColleagueWithDuty, findNearestColleagueWithName, findNearestModuleWithDuty, findNextEmployeeWithDuty, fireEmployee, getClonableEmployeeCommand, getEmployeeNeeds, getEmployeeNeedsVector, getEmployeeReference, getEmployeeVector, getEmployer, getEmployerPath, getExplanationByWhichHired, getFileCoordinator, getHColor, getHDaughters, getHImage, getHiredAs, getHiringCommand, getHiringCondition, getHMother, getHShow, getImmediateEmployeesWithDuty, getNextEmployeeWithDuty, getNumberOfEmployees, getNumSupplements, getSearchableAsModule, getSupplementName, getTypeName, hireAllCompatibleEmployees, hireAllEmployees, hireAllOtherCompatibleEmployees, hireAllOtherEmployees, hireCompatibleEmployee, hireEmployee, hireEmployeeFromModuleInfo, hireNamedEmployee, hireNamedEmployee, hireNamedEmployee, hNodeAction, hSupplementTouched, incrementEmployeeBrowserRefreshSuppression, instantiateEmployee, instantiateModule, internalStartUp, isEmployerOf, isMacroAnchor, isPriorityFixed, listEmployees, listNeeds, makeEmployeeVector, moduleActiveWord, moveEmployeeToFront, numCompatibleModulesAvailable, numModulesAvailable, purposeOfEmployee, queryChooseModule, refreshBrowser, registerEmployeeNeed, registerEmployeeNeed, replaceCompatibleEmployee, replaceEmployee, replaceEmployeeWithNext, setHiringCommand, setPriorityFixed, setShowHiringPath, whatIsMyPurpose
 
Methods inherited from class mesquite.lib.MenuOwner
addAuxiliaryMenu, addCheckMenuItem, addCheckMenuItemToSubmenu, addItemToSubmenu, addItemToSubmenu, addLineToSubmenu, addMenuItem, addMenuItem, addMenuItem, addMenuLine, addModuleMenuItems, addSubmenu, addSubmenu, addSubmenu, addSubmenu, addSubmenu, checkMISVector, composeMenuBar, decrementMenuResetSuppression, defineMenus, deleteAllMenuItems, deleteMenuItem, destroyMenu, disposeMenuSpecifications, doom, findMenuAmongEmployers, getContainingMenuSpec, getMenu, getMenuItemSpecs, getMenuResetSuppression, getModuleWindow, getUseMenubar, incrementMenuResetSuppression, isDoomed, makeMenu, needsMenu, recomposeWindowsMenu, resetAllMenuBars, resetAllWindowsMenus, resetContainingMenuBar, setMenuResetSuppression, setMenuToUse, setModule, setModuleWindow, setUndoMenuItemEnabled, setUseMenubar, showPopUp, zeroMenuResetSuppression
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mesquite.lib.duties.NumberForItem
accumulateParameters, getName, getNameAndParameters, getParameters
 

Constructor Detail

NumberForTree

public NumberForTree()
Method Detail

getDutyClass

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

Overrides:
getDutyClass in class NumberForTreeWContext

getDutyName

public java.lang.String getDutyName()
Description copied from class: MesquiteModule
Returns the name of the duty; set by the duty-defining library classes.

Overrides:
getDutyName in class NumberForTreeWContext

getDefaultModule

public java.lang.String[] getDefaultModule()
Description copied from class: MesquiteModule
Returns name of default module for superclass.

Overrides:
getDefaultModule in class MesquiteModule

initialize

public void initialize(Tree tree)
Called to provoke any necessary initialization. This helps prevent the module's intialization queries to the user from happening at inopportune times (e.g., while a long chart calculation is in mid-progress)


calculateNumber

public abstract void calculateNumber(Tree tree,
                                     MesquiteNumber result,
                                     MesquiteString resultString)

calculateNumberInContext

public void calculateNumberInContext(Tree tree,
                                     TreeSource source,
                                     int whichTree,
                                     MesquiteNumber result,
                                     MesquiteString resultString)
Specified by:
calculateNumberInContext in class NumberForTreeWContext

returnsMultipleValues

public boolean returnsMultipleValues()
Specified by:
returnsMultipleValues in interface NumberForItem

initialize

public void initialize(java.lang.Object object1,
                       java.lang.Object object2)
Description copied from interface: NumberForItem
Called to provoke any necessary initialization. This helps prevent the module's intialization queries to the user from happening at inopportune times (e.g., while a long chart calculation is in mid-progress)

Specified by:
initialize in interface NumberForItem

calculateNumberInContext

public void calculateNumberInContext(java.lang.Object object1,
                                     java.lang.Object object2,
                                     ItemsSource source,
                                     int whichItem,
                                     MesquiteNumber result,
                                     MesquiteString resultString)
Specified by:
calculateNumberInContext in interface NumberForItem

calculateNumber

public void calculateNumber(java.lang.Object object1,
                            java.lang.Object object2,
                            MesquiteNumber result,
                            MesquiteString resultString)
Specified by:
calculateNumber in interface NumberForItem

biggerIsBetter

public boolean biggerIsBetter()
indicates default optimization, e.g. for tree searchers. If true, tree search will maximize, otherwise minimize. If number has obvious optimum direction, this should be overridden to indicate optimum


getNameOfValueCalculated

public java.lang.String getNameOfValueCalculated()
Specified by:
getNameOfValueCalculated in interface NumberForItem