+ /**
+ * Reload options from System properties.
+ */
+ public void reloadOptions() {
+ // Permit RGB colors only if externally requested.
+ if (System.getProperty("jexer.ECMA48.rgbColor",
+ "false").equals("true")
+ ) {
+ doRgbColor = true;
+ } else {
+ doRgbColor = false;
+ }
+
+ // Default to using sixel for full-width characters.
+ if (System.getProperty("jexer.ECMA48.wideCharImages",
+ "true").equals("true")) {
+ wideCharImages = true;
+ } else {
+ wideCharImages = false;
+ }
+
+ // Pull the system properties for sixel output.
+ if (System.getProperty("jexer.ECMA48.sixel", "true").equals("true")) {
+ sixel = true;
+ } else {
+ sixel = false;
+ }
+
+ // Palette size
+ int paletteSize = 1024;
+ try {
+ paletteSize = Integer.parseInt(System.getProperty(
+ "jexer.ECMA48.sixelPaletteSize", "1024"));
+ switch (paletteSize) {
+ case 2:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ sixelPaletteSize = paletteSize;
+ break;
+ default:
+ // Ignore value
+ break;
+ }
+ } catch (NumberFormatException e) {
+ // SQUASH
+ }
+ }
+