public PAdjustToolExtra(NodePositionAdjust ownerModule, TreeDisplay treeDisplay) {
   super(ownerModule, treeDisplay);
   selectModule = ownerModule;
   adjustTool =
       new TreeTool(
           this,
           "posadjustor",
           ownerModule.getPath(),
           "adjustPosition.gif",
           7,
           7,
           "Adjust node position",
           "This tool adjusts branch lengths in such a way as to keep the relative positions of nodes constant, except for the node moved.");
   adjustTool.setTouchedCommand(MesquiteModule.makeCommand("touchedPositionAdjust", this));
   adjustTool.setDroppedCommand(MesquiteModule.makeCommand("droppedPositionAdjust", this));
   adjustTool.setDraggedCommand(MesquiteModule.makeCommand("draggedPositionAdjust", this));
   if (ownerModule.containerOfModule() instanceof MesquiteWindow) {
     ((MesquiteWindow) ownerModule.containerOfModule()).addTool(adjustTool);
   }
 }
Esempio n. 2
0
 /*.................................................................................................................*/
 public void setTableAndTaxa(MesquiteTable table, Taxa taxa) {
   this.table = table;
   this.taxa = taxa;
   if (containerOfModule() instanceof ListWindow && tool == null) {
     String sortExplanation = "Assigns colors to taxa. ";
     tool =
         new TableTool(
             this,
             "sort",
             getPath(),
             "color.gif",
             0,
             0,
             "Color taxon",
             sortExplanation,
             MesquiteModule.makeCommand("paint", this),
             null,
             null);
     tool.setWorksOnRowNames(true);
     ((ListWindow) containerOfModule()).addTool(tool);
     tool.setPopUpOwner(this);
   }
 }