|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.swt.util.WindowLayout
public final class WindowLayout
Provides utilities for placing windows relative to each other and to the screen.
Field Summary | |
---|---|
static int |
CENTER
|
static int |
DEFAULT_DISTANCE
|
static int |
EAST
|
static int |
HORIZ_CENTER
|
static int |
HORIZ_LEFT
|
static int |
HORIZ_RIGHT
|
static int |
NORTH
|
static int |
NORTH_EAST
|
static int |
NORTH_WEST
|
static int |
SOUTH
|
static int |
SOUTH_EAST
|
static int |
SOUTH_WEST
|
static int |
VERT_BOTTOM
|
static int |
VERT_CENTER
|
static int |
VERT_TOP
|
static int |
WEST
|
Method Summary | |
---|---|
static org.eclipse.swt.graphics.Point |
getLocation(org.eclipse.swt.graphics.Point windowSize,
int position)
Get location needed to place window at a specified alignmnent on the screen. |
static org.eclipse.swt.graphics.Point |
getLocation(org.eclipse.swt.graphics.Rectangle parentRect,
int fromPoint,
org.eclipse.swt.graphics.Point childSize,
int toPoint)
|
static org.eclipse.swt.graphics.Point |
getLocation(org.eclipse.swt.graphics.Rectangle parentRect,
int fromPoint,
org.eclipse.swt.graphics.Point childSize,
int toPoint,
int direction)
Places a window at a default distance. |
static org.eclipse.swt.graphics.Point |
getLocation(org.eclipse.swt.graphics.Rectangle parentRect,
int fromPoint,
org.eclipse.swt.graphics.Point childSize,
int toPoint,
int direction,
int distance)
Get location needed to place 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 org.eclipse.swt.graphics.Point |
getLocation(org.eclipse.swt.graphics.Rectangle parentRect,
org.eclipse.swt.graphics.Point childSize,
int position)
Align a child window relative to its parent. |
static void |
setLocation(org.eclipse.swt.widgets.Shell window,
int position)
|
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 HORIZ_LEFT
public static final int HORIZ_CENTER
public static final int HORIZ_RIGHT
public static final int VERT_TOP
public static final int VERT_CENTER
public static final int VERT_BOTTOM
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 setLocation(org.eclipse.swt.widgets.Shell window, int position)
public static org.eclipse.swt.graphics.Point getLocation(org.eclipse.swt.graphics.Point windowSize, int position)
windowSize
- The size of the window to place.position
- The position of the window. A bitmask of one of the
HORIZ_* constants with one of the VERT_* constants, eg
"HORIZ_TOP | VERT_CENTER".
public static org.eclipse.swt.graphics.Point getLocation(org.eclipse.swt.graphics.Rectangle parentRect, org.eclipse.swt.graphics.Point childSize, int position)
parentRect
- The parent window.childSize
- The size of the child window.position
- The child's alignment relative to parent.
public static org.eclipse.swt.graphics.Point getLocation(org.eclipse.swt.graphics.Rectangle parentRect, int fromPoint, org.eclipse.swt.graphics.Point childSize, int toPoint)
public static org.eclipse.swt.graphics.Point getLocation(org.eclipse.swt.graphics.Rectangle parentRect, int fromPoint, org.eclipse.swt.graphics.Point childSize, int toPoint, int direction)
public static org.eclipse.swt.graphics.Point getLocation(org.eclipse.swt.graphics.Rectangle parentRect, int fromPoint, org.eclipse.swt.graphics.Point childSize, int toPoint, int direction, int distance)
parentRect
- The parent window. May be null in which case the
screen dimensions are used.fromPoint
- The point on the parent to connect the strut.
A bitmask of one of the HORIZ_* constants with one of the VERT_* constants,
eg "HORIZ_TOP | VERT_CENTER".childSize
- The child window size.toPoint
- The point on the child to connect the strut. Same format as
fromPoint.direction
- The direction of the strut.distance
- The length of the strut.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |