org.jfree.ui

Class Align

public final class Align extends Object

A utility class for aligning rectangles.

Author: David Gilbert

Field Summary
static intBOTTOM
Bottom alignment.
static intBOTTOM_LEFT
Bottom/Left alignment.
static intBOTTOM_RIGHT
Bottom/Right alignment.
static intCENTER
Center alignment.
static intEAST
East alignment (same as RIGHT).
static intFIT
Complete fit.
static intFIT_HORIZONTAL
Horizontal fit.
static intFIT_VERTICAL
Vertical fit.
static intLEFT
Left alignment.
static intNORTH
North alignment (same as TOP).
static intNORTH_EAST
North/East alignment (same as TOP_RIGHT).
static intNORTH_WEST
North/West alignment (same as TOP_LEFT).
static intRIGHT
Right alignment.
static intSOUTH
South alignment (same as BOTTOM).
static intSOUTH_EAST
South/East alignment (same as BOTTOM_RIGHT).
static intSOUTH_WEST
South/West alignment (same as BOTTOM_LEFT).
static intTOP
Top alignment.
static intTOP_LEFT
Top/Left alignment.
static intTOP_RIGHT
Top/Right alignment.
static intWEST
West alignment (same as LEFT).
Method Summary
static voidalign(Rectangle2D rect, Rectangle2D frame, int align)
Aligns one rectangle (rect) relative to another rectangle (frame).

Field Detail

BOTTOM

public static final int BOTTOM
Bottom alignment.

BOTTOM_LEFT

public static final int BOTTOM_LEFT
Bottom/Left alignment.

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
Bottom/Right alignment.

CENTER

public static final int CENTER
Center alignment.

EAST

public static final int EAST
East alignment (same as RIGHT).

FIT

public static final int FIT
Complete fit.

FIT_HORIZONTAL

public static final int FIT_HORIZONTAL
Horizontal fit.

FIT_VERTICAL

public static final int FIT_VERTICAL
Vertical fit.

LEFT

public static final int LEFT
Left alignment.

NORTH

public static final int NORTH
North alignment (same as TOP).

NORTH_EAST

public static final int NORTH_EAST
North/East alignment (same as TOP_RIGHT).

NORTH_WEST

public static final int NORTH_WEST
North/West alignment (same as TOP_LEFT).

RIGHT

public static final int RIGHT
Right alignment.

SOUTH

public static final int SOUTH
South alignment (same as BOTTOM).

SOUTH_EAST

public static final int SOUTH_EAST
South/East alignment (same as BOTTOM_RIGHT).

SOUTH_WEST

public static final int SOUTH_WEST
South/West alignment (same as BOTTOM_LEFT).

TOP

public static final int TOP
Top alignment.

TOP_LEFT

public static final int TOP_LEFT
Top/Left alignment.

TOP_RIGHT

public static final int TOP_RIGHT
Top/Right alignment.

WEST

public static final int WEST
West alignment (same as LEFT).

Method Detail

align

public static void align(Rectangle2D rect, Rectangle2D frame, int align)
Aligns one rectangle (rect) relative to another rectangle (frame).

Parameters: rect the rectangle to be aligned (null not permitted). frame the reference frame (null not permitted). align the alignment code.