|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.swing.controls.WindowLayout
public final class WindowLayout
Provides utilities for placing windows relative to each other and to the screen.
Field Summary | |
---|---|
static int |
BOTTOM_LEFT
|
static int |
BOTTOM_RIGHT
|
static int |
CENTER
|
static int |
DEFAULT_DISTANCE
|
static int |
EAST
|
static int |
MID_BOTTOM
|
static int |
MID_LEFT
|
static int |
MID_RIGHT
|
static int |
MID_TOP
|
static int |
NORTH
|
static int |
NORTH_EAST
|
static int |
NORTH_WEST
|
static int |
SOUTH
|
static int |
SOUTH_EAST
|
static int |
SOUTH_WEST
|
static int |
TOP_LEFT
|
static int |
TOP_RIGHT
|
static int |
WEST
|
Method Summary | |
---|---|
static void |
bumpRectangle(Rectangle parentRect,
Rectangle childRect)
|
protected static Point |
getOffsetForPoint(Dimension shape,
int connector)
|
static void |
placeWindow(Window window,
int position)
Places a window at a specified alignmnent on the screen. |
static void |
placeWindow(Window parent,
int fromPoint,
Window child,
int toPoint)
|
static void |
placeWindow(Window parent,
int fromPoint,
Window child,
int toPoint,
int direction)
Places a window at a default distance. |
static void |
placeWindow(Window parent,
int fromPoint,
Window child,
int toPoint,
int direction,
int distance)
Places a child window relative to a parent (or the screen) using an imaginary strut connecting 8 points on the parent and child window's borders. |
static void |
placeWindow(Window window,
Point location)
Place a window, adjusting so it does not go outside the screen. |
static void |
placeWindow(Window parent,
Window child,
int position)
Align a child window relative to its parent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_DISTANCE
public static final int TOP_LEFT
public static final int MID_TOP
public static final int TOP_RIGHT
public static final int MID_RIGHT
public static final int BOTTOM_RIGHT
public static final int MID_BOTTOM
public static final int BOTTOM_LEFT
public static final int MID_LEFT
public static final int CENTER
public static final int NORTH
public static final int SOUTH
public static final int EAST
public static final int WEST
public static final int NORTH_EAST
public static final int SOUTH_EAST
public static final int SOUTH_WEST
public static final int NORTH_WEST
Method Detail |
---|
public static void placeWindow(Window window, int position)
window
- The window to place.position
- The position of the window (TOP_LEFT, CENTER,
etc).public static void placeWindow(Window parent, int fromPoint, Window child, int toPoint)
public static void placeWindow(Window parent, int fromPoint, Window child, int toPoint, int direction)
public static void placeWindow(Window parent, int fromPoint, Window child, int toPoint, int direction, int distance)
parent
- The parent window. May be null in which case the
screen dimensions are used.fromPoint
- The point on the parent to connect the strut.
One of TOP_RIGHT, BOTTOM_LEFT, etc.child
- The child window.toPoint
- The point on the child to connect the strut. See
fromPoint for possible values.direction
- The direction of the strut.distance
- The length of the strut.public static void placeWindow(Window parent, Window child, int position)
parent
- The parent window.child
- The child window.position
- The child's alignment relative to parent.public static void placeWindow(Window window, Point location)
protected static Point getOffsetForPoint(Dimension shape, int connector)
public static void bumpRectangle(Rectangle parentRect, Rectangle childRect)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |