textbender.o.awt
Class WindowX

java.lang.Object
  extended by WindowX

public class WindowX
extends Object

Window utilities.


Nested Class Summary
static class WindowX.LookAndFeelUpdater
          Updates the UI of a window, whenever the look and feel changes.
static class WindowX.SpoolTie
          Ties the disposal of a window to the unwinding of a spool.
 
Method Summary
static void center(Window window)
          Centers a window on the screen.
static Point getCenterLocation(Dimension area)
          Returns the location that would center the specified area on the screen.
static Point getCenterLocation(Dimension area, Dimension surrounding)
          Returns the location that would center the specified area within the specified surrounding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

center

public static void center(Window window)
Centers a window on the screen.


getCenterLocation

public static Point getCenterLocation(Dimension area)
Returns the location that would center the specified area on the screen. The location returned is that of the top, left of the area.


getCenterLocation

public static Point getCenterLocation(Dimension area,
                                      Dimension surrounding)
Returns the location that would center the specified area within the specified surrounding. The location returned is that of the top, left of the area in the surrounding coordinates.