com.retek.commons.gui.util
Class WindowPlacer

java.lang.Object
  extended bycom.retek.commons.gui.util.WindowPlacer

public class WindowPlacer
extends java.lang.Object

This class is used to calculate the placement (x and y coordinates) of a window on either the desktop or another window. Note that RFrame and RDialog windows are both children of the Window class and can be used with these methods.

Retek Inc. Copyright (c) 2002


Method Summary
static void centerOnOwner(java.awt.Window window)
          Centers a window within its owner window.
static void centerOnWindow(java.awt.Window parent, java.awt.Window child)
          Centers a window within another window.
static void centerOnWindow(java.awt.Window parent, java.awt.Window child, int xoffset, int yoffset)
          Centers a window within another window.
static void centerWindow(java.awt.Window window)
          Centers a window on the desktop.
static void displayWindow(java.awt.Window parent, java.awt.Window child, int x, int y)
           
static void displayWindows(java.awt.Window parent, java.util.List childList, int x, int y)
          Displays a list of windows on a parent window.
static void indentOnOwner(java.awt.Window window, int x, int y)
          Indents a window within its owner.
static void indentWindow(java.awt.Window parent, java.awt.Window child, int x, int y)
          Indents a window within another window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

centerWindow

public static void centerWindow(java.awt.Window window)
Centers a window on the desktop.

Parameters:
window - The window to center on the desktop.

centerOnWindow

public static void centerOnWindow(java.awt.Window parent,
                                  java.awt.Window child)
Centers a window within another window.

Parameters:
parent - The window to be centered on.
child - The window to be centered.

centerOnWindow

public static void centerOnWindow(java.awt.Window parent,
                                  java.awt.Window child,
                                  int xoffset,
                                  int yoffset)
Centers a window within another window.

Parameters:
parent - The window to be centered on.
child - The window to be centered.
xoffset - The offset form the centered x location.
yoffset - The offset from the centered y location.

centerOnOwner

public static void centerOnOwner(java.awt.Window window)
Centers a window within its owner window.

Parameters:
window - The window to be centered.

indentWindow

public static void indentWindow(java.awt.Window parent,
                                java.awt.Window child,
                                int x,
                                int y)
Indents a window within another window.

Parameters:
parent - The parent window to start indentation from.
child - The window to indent.
x - The number of pixels to indent on the X axis.
y - The number of pixels to indent on the Y axis.

indentOnOwner

public static void indentOnOwner(java.awt.Window window,
                                 int x,
                                 int y)
Indents a window within its owner.

Parameters:
window - The window to be indented.
x - The number of pixels to indent on the X axis.
y - The number of pixels to indent on the Y axis.

displayWindows

public static void displayWindows(java.awt.Window parent,
                                  java.util.List childList,
                                  int x,
                                  int y)
Displays a list of windows on a parent window. It begins by centering on the parent and then calculated the original location based on moving backwards with the indent value.

Parameters:
parent - The parent window to start indentation from.
childList - A list of window to indent on the parent.
x - The number of pixels to indent on the X axis.
y - The number of pixels to indent on the Y axis.

displayWindow

public static void displayWindow(java.awt.Window parent,
                                 java.awt.Window child,
                                 int x,
                                 int y)


Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28