Example #1
0
 /*.................................................................................................................*/
 public boolean startJob(String arguments, Object condition, boolean hiredByName) {
   if (!MesquiteThread.isScripting()) {
     int s =
         MesquiteInteger.queryInteger(
             containerOfModule(),
             "Number of taxa to exclude",
             "Enter the number of randomly chosen taxa to exclude",
             numExcluded);
     if (MesquiteInteger.isCombinable(s)) numExcluded = s;
     else return false;
   }
   addMenuItem("Number of Taxa Excluded...", makeCommand("setNumberExcluded", this));
   return true;
 }
Example #2
0
 /*.................................................................................................................*/
 public Object doCommand(String commandName, String arguments, CommandChecker checker) {
   if (checker.compare(
       this.getClass(),
       "Sets the number of randomly chosen taxa to exclude",
       "[number]",
       commandName,
       "setNumberExcluded")) {
     int s = MesquiteInteger.fromString(parser.getFirstToken(arguments));
     if (!MesquiteInteger.isCombinable(s)) {
       s =
           MesquiteInteger.queryInteger(
               containerOfModule(),
               "Number of taxa to exclude",
               "Enter the number of randomly chosen taxa to exclude",
               numExcluded);
     }
     if (MesquiteInteger.isCombinable(s)) {
       numExcluded = s;
       parametersChanged();
     }
   } else return super.doCommand(commandName, arguments, checker);
   return null;
 }