dsto.dfc.swing.controls
Class Geometry

java.lang.Object
  extended by dsto.dfc.swing.controls.Geometry

public final class Geometry
extends Object

Utilties for geometric calculations.

Version:
$Revision$

Field Summary
static int BOTTOM_LEFT
           
static int BOTTOM_RIGHT
           
static int CENTER
           
static int MID_BOTTOM
           
static int MID_LEFT
           
static int MID_RIGHT
           
static int MID_TOP
           
static int TOP_LEFT
           
static int TOP_RIGHT
           
 
Method Summary
static void bumpRectangle(Rectangle parentRect, Rectangle childRect)
           
static Point offsetForAligment(Dimension parentSize, Dimension childSize, int alignment)
          Calculate offset of a child region from a parent region necessary to align child region.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEFT

public static final int TOP_LEFT
See Also:
Constant Field Values

MID_TOP

public static final int MID_TOP
See Also:
Constant Field Values

TOP_RIGHT

public static final int TOP_RIGHT
See Also:
Constant Field Values

MID_RIGHT

public static final int MID_RIGHT
See Also:
Constant Field Values

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
See Also:
Constant Field Values

MID_BOTTOM

public static final int MID_BOTTOM
See Also:
Constant Field Values

BOTTOM_LEFT

public static final int BOTTOM_LEFT
See Also:
Constant Field Values

MID_LEFT

public static final int MID_LEFT
See Also:
Constant Field Values

CENTER

public static final int CENTER
See Also:
Constant Field Values
Method Detail

offsetForAligment

public static Point offsetForAligment(Dimension parentSize,
                                      Dimension childSize,
                                      int alignment)
Calculate offset of a child region from a parent region necessary to align child region.

Parameters:
parentSize - Size of parent region.
childSize - Size of child region;
alignment - Alignment of child relative to parent.

bumpRectangle

public static void bumpRectangle(Rectangle parentRect,
                                 Rectangle childRect)


Copyright © 2008 Commonwealth of Australia