|
Java 6 SE Platform 6.0 Home |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.woven_media.colorsafe.WindowUtil
public class WindowUtil
WinUtil is a static utilities class for common window operations.
Constructor Summary | |
---|---|
WindowUtil()
|
Method Summary | |
---|---|
static java.awt.Dimension |
centerWindow(java.awt.Window parent,
java.awt.Window child)
Centers window locations within its parent object. |
static java.lang.String |
getClassName(java.lang.Object o)
Returns just the class name -- no package info. |
static void |
printExceptionError(java.lang.Throwable cause,
java.lang.String msg,
boolean seperator)
Prints an exception cause message and accepts a flag to indicate whether to print a seperator of form \n---------- STACK TRACE OUTPUT ----------\n |
static void |
setClassicLookAndFeel()
Tell system to use Windows Classic LAF. |
static void |
setJavaLookAndFeel()
Tell system to use Metal (Java) LAF. |
static void |
setLookAndFeelByClassName(java.lang.String className)
Attempts to set this LAF by passing className as a string
parameter and calling the UIManager#setLookAndFeel method. |
static void |
setMotifLookAndFeel()
Tell system to use Motif LAF. |
static void |
setNativeLookAndFeel()
Tell system to use native look and feel, as in previous releases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowUtil()
Method Detail |
---|
public static java.awt.Dimension centerWindow(java.awt.Window parent, java.awt.Window child)
null
to parent
parameter centers window
within the screen, otherwise the child
window is centered within
the parent
window. centerWindow
returns if
child
parameter is passed as a null
value.
parent
- reference to the parent window.child
- reference to child window.
java.util.Dimension object
.public static java.lang.String getClassName(java.lang.Object o)
java.lang.String
of the class name minus package information.public static void setLookAndFeelByClassName(java.lang.String className) throws java.lang.Exception
className
as a string
parameter and calling the UIManager#setLookAndFeel method.
className
- java.lang.String
of a valid
javax.swing.LookAndFeel
class.
- Throws:
java.lang.Exception
- Since:
- 1.0
- See Also:
ClassNotFoundException
,
InstantiationException
,
IllegalAccessException
,
UnsupportedLookAndFeelException
public static void printExceptionError(java.lang.Throwable cause, java.lang.String msg, boolean seperator)
\n---------- STACK TRACE OUTPUT ----------\n
cause
- java.lang.Exception#cause
message.msg
- java.lang.Exception#message
message.seperator
- indicates whether to print the stack trace output seperator.public static void setNativeLookAndFeel()
UIManager
public static void setClassicLookAndFeel()
public static void setJavaLookAndFeel()
public static void setMotifLookAndFeel()
setLookAndFeelByClassName(java.lang.String)
|
Java 6 SE Platform 6.0 Home |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |