From 5f1dec2c303b7d45fd365bdf48145388386c8453 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Mon, 1 Jun 2020 16:33:54 -0500 Subject: [PATCH] JAL-3262 from JAL-3253-applet ArgsParser --- src/jalview/bin/ArgsParser.java | 101 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 94 insertions(+), 7 deletions(-) diff --git a/src/jalview/bin/ArgsParser.java b/src/jalview/bin/ArgsParser.java index c927f1f..91c8838 100644 --- a/src/jalview/bin/ArgsParser.java +++ b/src/jalview/bin/ArgsParser.java @@ -34,19 +34,98 @@ import java.util.Vector; */ public class ArgsParser { - Vector vargs = null; + + // BH 2019 - new + + public static final String NOCALCULATION = "nocalculation"; + + public static final String NOMENUBAR = "nomenubar"; + + public static final String NOSTATUS = "nostatus"; + + public static final String SHOWOVERVIEW = "showoverview"; + + // + public static final String ANNOTATIONS = "annotations"; + + public static final String COLOUR = "colour"; + + public static final String FEATURES = "features"; + + public static final String GROOVY = "groovy"; + + public static final String GROUPS = "groups"; + + public static final String HEADLESS = "headless"; + + public static final String JABAWS = "jabaws"; + + public static final String NOANNOTATION = "no-annotation"; + + public static final String NOANNOTATION2 = "noannotation"; // BH 2019.05.07 + + public static final String NODISPLAY = "nodisplay"; + + public static final String NOGUI = "nogui"; + + public static final String NONEWS = "nonews"; + + public static final String NOQUESTIONNAIRE = "noquestionnaire"; + + public static final String NOSORTBYTREE = "nosortbytree"; + + public static final String NOUSAGESTATS = "nousagestats"; + + public static final String OPEN = "open"; + + public static final String OPEN2 = "open2"; // BH added -- for applet + // compatibility; not fully + // implemented + + public static final String PROPS = "props"; + + public static final String QUESTIONNAIRE = "questionnaire"; + + public static final String SETPROP = "setprop"; + + public static final String SORTBYTREE = "sortbytree"; + + public static final String TREE = "tree"; + + public static final String VDOC = "vdoc"; + + public static final String VSESS = "vsess"; + + private Vector vargs = null; + + private boolean isApplet; + + private AppletParams appletParams; + + public boolean isApplet() + { + return isApplet; + } public ArgsParser(String[] args) { - vargs = new Vector(); - for (int i = 0; i < args.length; i++) + vargs = new Vector<>(); + isApplet = (args.length > 0 && args[0].startsWith("