public class FrameUtils extends Object
Constructor and Description |
---|
FrameUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
centerFrame(Frame frame)
Size the frame, and center it on the screen (usually the screen of the primary monitor,
but may vary based on the platform's window manager).
|
static void |
centerFrame(Frame frame,
double screenExtentFraction)
Size the frame, and center it on the screen (usually the screen of the primary monitor,
but may vary based on the platform's window manager).
|
static void |
centerFrame(Frame frame,
int width,
int height)
Size the frame, and center it on the screen (usually the screen of the primary monitor,
but may vary based on the platform's window manager).
|
static WindowListener |
destroyOnWindowClosing(Window window,
javax.media.opengl.GLAutoDrawable drawable)
Adds a window-closing listener that destroys the drawable.
|
static WindowListener |
disposeOnWindowClosing(Window window,
GlimpseCanvas canvas)
Adds a window-closing listener that disposes of the canvas.
|
static JFrame |
newFrame(String title,
Container contentPane,
int closeOperation) |
static List<GraphicsDevice> |
screens() |
static void |
showFrameCentered(Frame frame)
Size the frame, center it, and make it visible.
|
static void |
showFrameCentered(Frame frame,
double screenExtentFraction)
Size the frame, center it, and make it visible.
|
static void |
showFrameCentered(Frame frame,
int width,
int height)
Size the frame, center it, and make it visible.
|
static void |
showFrameFullscreen(Frame frame)
Make the frame fullscreen across all screens, and make it visible.
|
static void |
showFrameFullscreen(Frame frame,
boolean allScreens)
Make the frame fullscreen, and make it visible.
|
static void |
showFrameFullscreen(Frame frame,
GraphicsDevice screen)
Make the frame fullscreen on the screen indicated by screenIndex, and make it visible.
|
static WindowListener |
stopOnWindowClosing(Window window,
javax.media.opengl.GLAnimatorControl animator)
Adds a window-closing listener that stops the animator.
|
public static WindowListener stopOnWindowClosing(Window window, javax.media.opengl.GLAnimatorControl animator)
public static WindowListener disposeOnWindowClosing(Window window, GlimpseCanvas canvas)
public static WindowListener destroyOnWindowClosing(Window window, javax.media.opengl.GLAutoDrawable drawable)
public static void showFrameCentered(Frame frame)
centerFrame(Frame)
public static void showFrameCentered(Frame frame, double screenExtentFraction)
centerFrame(Frame, double)
public static void showFrameCentered(Frame frame, int width, int height)
centerFrame(Frame, int, int)
public static void centerFrame(Frame frame)
centerFrame(Frame, double)
public static void centerFrame(Frame frame, double screenExtentFraction)
public static void centerFrame(Frame frame, int width, int height)
public static void showFrameFullscreen(Frame frame)
public static void showFrameFullscreen(Frame frame, boolean allScreens)
public static List<GraphicsDevice> screens()
public static void showFrameFullscreen(Frame frame, GraphicsDevice screen)
Copyright © 2016 Metron, Inc.. All rights reserved.