Package mars.util
Class NativeUtilities
java.lang.Object
mars.util.NativeUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Determine whether AWT is currently running on the X11 windowing system.static void
setApplicationIconImage
(Image iconImage) Update the application icon displayed on the taskbar to the given image, if possible.static void
setApplicationName
(String name) Set the name of the AWT application as a whole, if applicable.
-
Method Details
-
isUsingX11
public static boolean isUsingX11()Determine whether AWT is currently running on the X11 windowing system. If so, most implementations of AWT classes are located in the internal packagesun.awt.X11
.- Returns:
true
if the default toolkit issun.awt.X11.XToolkit
, orfalse
otherwise.
-
setApplicationName
Set the name of the AWT application as a whole, if applicable. It is recommended that this method is called before any windows are shown, as the platform may not recognize the change otherwise.This does nothing for most platforms, but for some (namely X11), this method does the extra work to ensure that the name is properly set as desired.
- Parameters:
name
- The general application name, which appears on the taskbar and/or status bar on some platforms.
-
setApplicationIconImage
Update the application icon displayed on the taskbar to the given image, if possible.This method does nothing for platforms which do not support the
Taskbar
API. Note that this is not a replacement forWindow.setIconImage(Image)
, which sets the icon assigned for a particular window (also setting the application icon on some platforms).- Parameters:
iconImage
- The new application icon, which will appear on the taskbar on some platforms.
-