org.gerhardb.lib.swing
Class SwingUtils

java.lang.Object
  extended by org.gerhardb.lib.swing.SwingUtils

public class SwingUtils
extends java.lang.Object


Constructor Summary
SwingUtils()
           
 
Method Summary
static void centerOnScreen(java.awt.Window window)
          Set the window location to center the window on the screen.
static java.lang.String ColorToString(java.awt.Color color)
           
static void sizeScreen(java.awt.Window window, float scale)
           
static java.awt.Color StringToColor(java.lang.String c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtils

public SwingUtils()
Method Detail

sizeScreen

public static void sizeScreen(java.awt.Window window,
                              float scale)

centerOnScreen

public static void centerOnScreen(java.awt.Window window)
Set the window location to center the window on the screen.

Note: Because this method depends on the size of the windw, the pack() method of the window and any other operations that may cause a change in the windows size should be completed before using this method.

Parameters:
window - to set the location on
Valid Values: Any Windows, nulls permitted.

ColorToString

public static java.lang.String ColorToString(java.awt.Color color)

StringToColor

public static java.awt.Color StringToColor(java.lang.String c)


Copyright ? 2007 Gerhard Beck. All rights reserved. Subject to GPL.