mesquite.align.lib
Class BlockMover

java.lang.Object
  extended by mesquite.lib.MenuOwner
      extended by mesquite.lib.EmployerEmployee
          extended by mesquite.lib.MesquiteModule
              extended by mesquite.lib.duties.DataWindowAssistant
                  extended by mesquite.lib.duties.DataWindowAssistantI
                      extended by mesquite.align.lib.BlockMover
All Implemented Interfaces:
Commandable, Doomable, Explainable, FileDirtier, FunctionExplainable, HNode, Identifiable, Listable, Logger, MesquiteListener, Showable

public abstract class BlockMover
extends DataWindowAssistantI


Field Summary
protected  AlignTool moveTool
           
 
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
BlockMover()
           
 
Method Summary
 void addPopUpMenuItems()
           
 boolean allowSplits()
           
 boolean canMoveLeft()
           
 boolean canMoveRight()
           
 java.lang.Object doCommand(java.lang.String commandName, java.lang.String arguments, CommandChecker checker)
          A request for the MesquiteModule to perform a command.
abstract  java.awt.Point getCellToolHotSpot()
           
abstract  java.lang.String getCellToolImageFileName()
           
 CompatibilityTest getCompatibilityTest()
          Returns CompatibilityTest so other modules know if this is compatible with some object.
 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 getExplanation()
          returns an explanation of what the module does.
abstract  java.lang.String getExplanationForTool()
           
abstract  java.lang.String getFullDescriptionForTool()
           
 java.lang.String getName()
          Returns the name of the module
 boolean getOptionDown()
           
 Snapshot getSnapshot(MesquiteFile file)
          Return Mesquite commands that will put the module (approximately) back into its current state.
abstract  java.awt.Point getSplitToolHotSpot()
           
abstract  java.lang.String getSplitToolImageFileName()
           
abstract  java.lang.String getToolName()
           
 boolean isPrerelease()
          returns whether this module is a prerelease version.
 boolean isSubstantive()
          returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module
 void setOptionTools()
           
 void setTableAndData(MesquiteTable table, CharacterData data)
          method called by data window to inform assistant that data have changed
 boolean startJob(java.lang.String arguments, java.lang.Object condition, boolean hiredByName)
          startJob is called automatically when an employee is hired.
 boolean wholeSelectedBlock()
           
 boolean wholeSequenceToLeft()
           
 boolean wholeSequenceToRight()
           
 
Methods inherited from class mesquite.lib.duties.DataWindowAssistantI
getDefaultModule
 
Methods inherited from class mesquite.lib.duties.DataWindowAssistant
colorsLegendGoAway, focusInCell, getCellExplanation, getCellString, getDisplayModString, getFunctionIconPath, hasDisplayModifications, isActive, setActive, tableSelectionChanged
 
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, echoStringToFile, employeeOutputInvalid, employeeParametersChanged, employeeQuit, employerWithWindow, endJob, fileAboutToBeWritten, fileDirtiedByCommand, fileElementAdded, fileReadIn, finalize, findNEXUSBlock, getAppletInfo, getAuthors, getAutoSaveMacros, getBrowserManualPath, getBrowserPanel, getBuildDate, getBuildVersion, getCitation, getCommandPagePath, getDateReleased, getDocsPath, getExpectedPath, getHireSubchoice, getHTMLExplanation, getID, getIfLastEmployee, getKeywords, getManualPath, getMesquiteVersion, getModuleInfo, getNameAndParameters, getNameForMenuItem, getNexusBlockTest, getNexusCommands, getNexusCommandTest, getPackageImagesPath, getPackageIntroModule, getPackagePath, getParameters, getParametersChangedNotifier, getPath, getPermanentIDString, getProject, getRootImageDirectoryPath, getRootPath, getShortClassName, getShortClassName, getSizedRootImageFilePath, getSubfunctions, getSubfunctionsVector, getURLString, getUserChooseable, getVersion, getVersionInt, getVersionOfFirstRelease, getVeryShortName, getXMLPrefsVersion, iQuit, iQuit, isCorrectRootTag, 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, 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
 

Field Detail

moveTool

protected AlignTool moveTool
Constructor Detail

BlockMover

public BlockMover()
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 DataWindowAssistantI

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 DataWindowAssistantI

startJob

public boolean startJob(java.lang.String arguments,
                        java.lang.Object condition,
                        boolean hiredByName)
Description copied from class: MesquiteModule
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.

Specified by:
startJob in class MesquiteModule

isSubstantive

public boolean isSubstantive()
Description copied from class: MesquiteModule
returns whether this module does substantive calculations affecting analysis results, or only a graphical/UI/input-output module

Overrides:
isSubstantive in class MesquiteModule

isPrerelease

public boolean isPrerelease()
Description copied from class: MesquiteModule
returns whether this module is a prerelease version. This returns "TRUE" here, forcing modules to override to claim they are not prerelease

Overrides:
isPrerelease in class MesquiteModule

getToolName

public abstract java.lang.String getToolName()

getCellToolImageFileName

public abstract java.lang.String getCellToolImageFileName()

getCellToolHotSpot

public abstract java.awt.Point getCellToolHotSpot()

getSplitToolImageFileName

public abstract java.lang.String getSplitToolImageFileName()

getSplitToolHotSpot

public abstract java.awt.Point getSplitToolHotSpot()

getExplanationForTool

public abstract java.lang.String getExplanationForTool()

getFullDescriptionForTool

public abstract java.lang.String getFullDescriptionForTool()

addPopUpMenuItems

public void addPopUpMenuItems()

setOptionTools

public void setOptionTools()

allowSplits

public boolean allowSplits()

canMoveLeft

public boolean canMoveLeft()

canMoveRight

public boolean canMoveRight()

wholeSelectedBlock

public boolean wholeSelectedBlock()

wholeSequenceToLeft

public boolean wholeSequenceToLeft()

wholeSequenceToRight

public boolean wholeSequenceToRight()

getOptionDown

public boolean getOptionDown()

getCompatibilityTest

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

Overrides:
getCompatibilityTest in class DataWindowAssistantI

setTableAndData

public void setTableAndData(MesquiteTable table,
                            CharacterData data)
Description copied from class: DataWindowAssistant
method called by data window to inform assistant that data have changed

Specified by:
setTableAndData in class DataWindowAssistant

getSnapshot

public Snapshot getSnapshot(MesquiteFile file)
Description copied from class: MesquiteModule
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.

Overrides:
getSnapshot in class MesquiteModule

doCommand

public java.lang.Object doCommand(java.lang.String commandName,
                                  java.lang.String arguments,
                                  CommandChecker checker)
Description copied from class: MesquiteModule
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.

Specified by:
doCommand in interface Commandable
Overrides:
doCommand in class MesquiteModule

getName

public java.lang.String getName()
Description copied from class: MesquiteModule
Returns the name of the module

Specified by:
getName in interface HNode
Specified by:
getName in interface Listable
Specified by:
getName in class MesquiteModule

getExplanation

public java.lang.String getExplanation()
returns an explanation of what the module does.

Specified by:
getExplanation in interface Explainable
Overrides:
getExplanation in class MesquiteModule