|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fuin.utils4swing.common.Utils4Swing
public final class Utils4Swing
Common utility methods for use in Swing applications and libraries.
| Nested Class Summary | |
|---|---|
static class |
Utils4Swing.GlassPaneState
State of the UI before showing a glass pane. |
| Method Summary | |
|---|---|
static javax.swing.JFrame |
createShowAndPosition(java.lang.String title,
java.awt.Container content,
boolean exitOnClose,
boolean resizable,
FramePositioner positioner)
|
static javax.swing.JFrame |
createShowAndPosition(java.lang.String title,
java.awt.Container content,
boolean exitOnClose,
FramePositioner positioner)
Create a new resizeable frame with a panel as it's content pane and position the frame. |
static javax.swing.RootPaneContainer |
findRootPaneContainer(java.awt.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(java.lang.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 javax.swing.ImageIcon |
loadIcon(java.lang.Class clasz,
java.lang.String name)
Load an icon located in the same package as a given class. |
static Utils4Swing.GlassPaneState |
showGlassPane(java.awt.Component source)
Makes the glass pane visible and focused and stores the saves the current state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static javax.swing.JFrame createShowAndPosition(java.lang.String title,
java.awt.Container content,
boolean exitOnClose,
FramePositioner positioner)
title - Frame title.content - Content.exitOnClose - Exit the program on closing the frame?positioner - FramePositioner.
public static javax.swing.JFrame createShowAndPosition(java.lang.String title,
java.awt.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 javax.swing.ImageIcon loadIcon(java.lang.Class clasz,
java.lang.String name)
clasz - Class with the same package where the icon is located.name - Filename of the icon.
public static void initLookAndFeel(java.lang.String className)
invokeAndWait(Runnable)
.
className - Full qualified name of the look and feel class.public static void initSystemLookAndFeel()
invokeAndWait(Runnable)
.
public static javax.swing.RootPaneContainer findRootPaneContainer(java.awt.Component source)
source - Component to start with.
public static Utils4Swing.GlassPaneState showGlassPane(java.awt.Component source)
source - Component to use when looking for the root pane container.
public static void hideGlassPane(Utils4Swing.GlassPaneState state)
state - State to restore.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||