|
||||||||||
| 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
|
| Method Summary | |
|---|---|
static void |
addToClasspath(java.lang.String url)
Adds an URL to the classpath. |
static void |
addToClasspath(java.net.URL url)
Adds an URL to the classpath. |
static boolean |
containsURL(java.net.URL[] urls,
java.net.URL url)
Checks if the array or URLs contains the given URL. |
static java.lang.Object |
createInstance(java.lang.String className)
Create an instance with Class.forName(..) and wrap all exceptions into RuntimeExceptions. |
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 java.lang.String |
getPackagePath(java.lang.Class clasz)
Returns the package path of a class. |
static java.net.URL |
getResource(java.lang.Class clasz,
java.lang.String name)
Get the path to a resource located in the same package as a given class. |
static void |
hideGlassPane(Utils4Swing.GlassPaneState 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. |
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)
|
| 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 java.lang.String getPackagePath(java.lang.Class clasz)
clasz - Class to determine the path for.
public static java.net.URL getResource(java.lang.Class clasz,
java.lang.String name)
clasz - Class with the same package where the resource is located.name - Filename of the resource.
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)
className - Full qualified name of the look and feel class.public static void initSystemLookAndFeel()
public static java.lang.Object createInstance(java.lang.String className)
className - Full qualified class name.
public static void addToClasspath(java.lang.String url)
url - URL to add.
public static boolean containsURL(java.net.URL[] urls,
java.net.URL url)
urls - Array of URLs.url - URL to find.
public static void addToClasspath(java.net.URL url)
url - URL to add.public static javax.swing.RootPaneContainer findRootPaneContainer(java.awt.Component source)
source - Component to start with.
public static Utils4Swing.GlassPaneState showGlassPane(java.awt.Component source)
public static void hideGlassPane(Utils4Swing.GlassPaneState state)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||