</tr>
<tr valign="top">
+ <td><code>‑‑javaconsole / ‑‑nojavaconsole</code></td>
+ <td>Show (/ or don't show) the Java Console. Using one of these overrides any saved Preference.</td>
+ </tr>
+
+ <tr valign="top">
<td><code>‑‑questionnaire / ‑‑noquestionnaire</code></td>
<td>Show (/ or don't show) the questionnaire if one is available.</td>
</tr>
import javax.swing.UIManager;
import jalview.analytics.Plausible;
+import jalview.bin.argparser.Arg;
+import jalview.bin.argparser.ArgParser;
import jalview.datamodel.PDBEntry;
import jalview.gui.Preferences;
import jalview.gui.UserDefinedColours;
{
return key == null ? null : sessionProperties.get(key);
}
+
+ public static boolean getArgCacheDefault(Arg a, String pref, boolean def)
+ {
+ ArgParser ap = Jalview.getInstance().getArgParser();
+ return ap.isSet(a) ? ap.getBoolean(a) : getDefault(pref, def);
+ }
}
QUESTIONNAIRE(Type.CONFIG,
"Show (or don't show) the questionnaire if one is available.",
true, Opt.BOOLEAN, Opt.BOOTSTRAP),
+ JAVACONSOLE(Type.CONFIG, "Show (or don't show) the Java Console.", false,
+ Opt.BOOLEAN, Opt.BOOTSTRAP),
NOUSAGESTATS(Type.CONFIG, "Don't send initial launch usage stats.",
Opt.UNARY, Opt.BOOTSTRAP),
NOSTARTUPFILE(Type.CONFIG, "Don't show the default startup file.",
{
parent = desktop;
// window name - get x,y,width, height possibly scaled
- Rectangle bounds = parent.getLastKnownDimensions("JAVA_CONSOLE_");
- if (bounds == null)
+ Rectangle bounds = parent == null ? null
+ : parent.getLastKnownDimensions("JAVA_CONSOLE_");
+ if (bounds != null)
+ {
+ frame = initFrame(
+ ChannelProperties.getProperty("app_name") + " Java Console",
+ bounds.width, bounds.height, bounds.x, bounds.y);
+ }
+ else if (parent != null && parent.getWidth() > 0
+ && parent.getHeight() > 0)
{
frame = initFrame(
ChannelProperties.getProperty("app_name") + " Java Console",
{
frame = initFrame(
ChannelProperties.getProperty("app_name") + " Java Console",
- bounds.width, bounds.height, bounds.x, bounds.y);
+ MIN_WIDTH, MIN_HEIGHT, 10, 10);
}
frame.setMinimumSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
// parent.add(frame);
pin.close();
} catch (Exception e)
{
+ jalview.bin.Console.debug("pin.close() error", e);
}
try
{
pin2.close();
} catch (Exception e)
{
+ jalview.bin.Console.debug("pin2.close() error", e);
}
try
{
textAppender.join(10);
} catch (Exception e)
{
+ jalview.bin.Console.debug("textAppender.join(10) error", e);
}
}
/*
}
} catch (InterruptedException ie)
{
+ jalview.bin.Console.debug("pin.available() error", ie);
}
}
}
} catch (InterruptedException ie)
{
+ jalview.bin.Console.debug("pin.available() error", ie);
}
}
while (pin2.available() != 0)
}
} catch (InterruptedException e)
{
+ jalview.bin.Console.debug("displayPipe.length() error", e);
}
}
}
this.wait(100);
} catch (InterruptedException e)
{
-
+ jalview.bin.Console.debug("this.wait(100) error", e);
}
}
if (quit)
this.wait(1000);
} catch (InterruptedException ie)
{
+ jalview.bin.Console.debug("this.wait(1000) error", ie);
}
throw new NullPointerException(
MessageManager.getString("exception.application_test_npe"));
+ "\nTruncated...\n";
} catch (Exception e)
{
- e.printStackTrace();
+ jalview.bin.Console.warn("textArea Exception", e);
}
}
// trim the buffer
}
} catch (Exception e)
{
- e.printStackTrace();
+ jalview.bin.Console.warn("textArea Exception", e);
}
// lines = textArea.getLineCount();
}
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.bin.Jalview.ExitCode;
+import jalview.bin.argparser.Arg;
import jalview.datamodel.Alignment;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.Sequence;
boolean selmemusage = Cache.getDefault("SHOW_MEMUSAGE", false);
- boolean showjconsole = Cache.getDefault("SHOW_JAVA_CONSOLE", false);
+ boolean showjconsole = Cache.getArgCacheDefault(Arg.JAVACONSOLE,
+ "SHOW_JAVA_CONSOLE", false);
// start dialogue queue for single dialogues
startDialogQueue();
iw = (int) (iw * sw);
iy = (int) (iy * sh);
ih = (int) (ih * sh);
- while (ix >= screenSize.width)
+ if (ix >= screenSize.width)
{
jalview.bin.Console.debug(
"Window geometry location recall error: shifting horizontal to within screenbounds.");
- ix -= screenSize.width;
+ ix = ix % screenSize.width;
}
- while (iy >= screenSize.height)
+ if (iy >= screenSize.height)
{
jalview.bin.Console.debug(
"Window geometry location recall error: shifting vertical to within screenbounds.");
- iy -= screenSize.height;
+ iy = iy % screenSize.height;
}
jalview.bin.Console.debug(
"Got last known dimensions for " + windowName + ": x:" + ix