Java Utililty Methods Full Screen

List of utility methods to do Full Screen

  1. HOME
  2. Java
  3. F
  4. Full Screen

Description

The list of methods to do Full Screen are organized into topic(s).

Method

void enableFullScreenMode(Window window)
enable Full Screen Mode
String className = "com.apple.eawt.FullScreenUtilities";
String methodName = "setWindowCanFullScreen";
try {
 Class<?> clazz = Class.forName(className);
 Method method = clazz.getMethod(methodName, new Class<?>[] { Window.class, boolean.class });
 method.invoke(null, window, true);
} catch (Throwable t) {
 System.err.println("Full screen mode is not supported");
...
void enableOSXFullscreen(Window window)
enable OSX Fullscreen
if (null == window)
 return;
try {
 Class util = Class.forName("com.apple.eawt.FullScreenUtilities");
 Class params[] = new Class[] { Window.class, Boolean.TYPE };
 Method method = util.getMethod("setWindowCanFullScreen", params);
 method.invoke(util, window, true);
} catch (ClassNotFoundException e1) {
...
void makeFullscreen(Frame frame, boolean attemptExclusiveMode)
Exclusive mode is only available if isFullScreenSupported returns true.
maximize(frame);
frame.setUndecorated(true);
frame.setLocation(0, 0);
frame.setResizable(false);
if (attemptExclusiveMode) {
 GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
 gd.setFullScreenWindow(frame);
boolean setFullScreen(Window toplevel, boolean fullscreen)
Makes a window full screen (method 1).
GraphicsDevice device;
device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
if (USE_TRUE_FULL_SCREEN && device.isFullScreenSupported()) {
 boolean currentlyfullscreen = device.getFullScreenWindow() == toplevel;
 if (fullscreen != currentlyfullscreen)
 device.setFullScreenWindow(toplevel);
 return true;
return false;

AltStyle によって変換されたページ (->オリジナル) /