import java.awt.Component;
import java.awt.Dimension;
+import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
private static Boolean isNoJSMac = null, isNoJSWin = null, isMac = null,
isWin = null;
- private static Boolean isHeadless = null;
-
private static swingjs.api.JSUtilI jsutil;
static
}
}
}
- // private static Boolean isHeadless = null;
/**
* added to group mouse events into Windows and nonWindows (mac, unix, linux)
static
{
- if (!Jalview.isHeadlessMode())
+ if (!GraphicsEnvironment.isHeadless())
{
// Using non-deprecated Extended key mask modifiers, but Java 8 has no
// getMenuShortcutKeyMaskEx method
return (isNoJSWin == null ? (isNoJSWin = !isJS && isWin()) : isNoJSWin);
}
- /**
- *
- * @return true if we are running in non-interactive no UI mode
- */
- public static boolean isHeadless()
- {
- if (isHeadless == null)
- {
- isHeadless = "true".equals(System.getProperty("java.awt.headless"));
- }
- return isHeadless;
- }
/**
*