public final class Utils4Swing extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Utils4Swing.GlassPaneState
State of the UI before showing a glass pane.
|
| Modifier and Type | Method and Description |
|---|---|
static JFrame |
createShowAndPosition(String title,
Container content,
boolean exitOnClose,
boolean resizable,
FramePositioner positioner) |
static JFrame |
createShowAndPosition(String title,
Container content,
boolean exitOnClose,
FramePositioner positioner)
Create a new resizeable frame with a panel as it's content pane and
position the frame.
|
static RootPaneContainer |
findRootPaneContainer(Component source)
Find the root pane container in the current hierarchy.
|
static void |
hideGlassPane(Utils4Swing.GlassPaneState state)
Hides the glass pane and restores the saved state.
|
static void |
initLookAndFeel(String className)
Initializes the look and feel and wraps exceptions into a runtime
exception.
|
static void |
initSystemLookAndFeel()
Initializes the system look and feel and wraps exceptions into a runtime
exception.If this method is called outside the EDT it will switch
automatically to the UI thread using
invokeAndWait(Runnable)
. |
static ImageIcon |
loadIcon(Class clasz,
String name)
Load an icon located in the same package as a given class.
|
static Utils4Swing.GlassPaneState |
showGlassPane(Component source)
Makes the glass pane visible and focused and stores the saves the current
state.
|
public static JFrame createShowAndPosition(String title, Container content, boolean exitOnClose, FramePositioner positioner)
title - Frame title.content - Content.exitOnClose - Exit the program on closing the frame?positioner - FramePositioner.public static JFrame createShowAndPosition(String title, Container content, boolean exitOnClose, boolean resizable, FramePositioner positioner)
title - Frame title.content - Content.exitOnClose - Exit the program on closing the frame?resizable - If the frame should be resizeable TRUE else FALSE.positioner - FramePositioner.public static ImageIcon loadIcon(Class clasz, String name)
clasz - Class with the same package where the icon is located.name - Filename of the icon.public static void initLookAndFeel(String className)
invokeAndWait(Runnable)
.className - Full qualified name of the look and feel class.public static void initSystemLookAndFeel()
invokeAndWait(Runnable)
.public static RootPaneContainer findRootPaneContainer(Component source)
source - Component to start with.public static Utils4Swing.GlassPaneState showGlassPane(Component source)
source - Component to use when looking for the root pane container.public static void hideGlassPane(Utils4Swing.GlassPaneState state)
state - State to restore - Cannot be null.Copyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.