org.jfree.ui

Class Align


public final class Align
extends java.lang.Object

A utility class for aligning rectangles.
Author:
David Gilbert

Field Summary

static int
BOTTOM
Bottom alignment.
static int
BOTTOM_LEFT
Bottom/Left alignment.
static int
BOTTOM_RIGHT
Bottom/Right alignment.
static int
CENTER
Center alignment.
static int
EAST
East alignment (same as RIGHT).
static int
FIT
Complete fit.
static int
FIT_HORIZONTAL
Horizontal fit.
static int
FIT_VERTICAL
Vertical fit.
static int
LEFT
Left alignment.
static int
NORTH
North alignment (same as TOP).
static int
NORTH_EAST
North/East alignment (same as TOP_RIGHT).
static int
NORTH_WEST
North/West alignment (same as TOP_LEFT).
static int
RIGHT
Right alignment.
static int
SOUTH
South alignment (same as BOTTOM).
static int
SOUTH_EAST
South/East alignment (same as BOTTOM_RIGHT).
static int
SOUTH_WEST
South/West alignment (same as BOTTOM_LEFT).
static int
TOP
Top alignment.
static int
TOP_LEFT
Top/Left alignment.
static int
TOP_RIGHT
Top/Right alignment.
static int
WEST
West alignment (same as LEFT).

Method Summary

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

Field Details

BOTTOM

public static final int BOTTOM
Bottom alignment.
Field Value:
2

BOTTOM_LEFT

public static final int BOTTOM_LEFT
Bottom/Left alignment.
Field Value:
6

BOTTOM_RIGHT

public static final int BOTTOM_RIGHT
Bottom/Right alignment.
Field Value:
10

CENTER

public static final int CENTER
Center alignment.
Field Value:
0

EAST

public static final int EAST
East alignment (same as RIGHT).
Field Value:
8

FIT

public static final int FIT
Complete fit.
Field Value:
15

FIT_HORIZONTAL

public static final int FIT_HORIZONTAL
Horizontal fit.
Field Value:
12

FIT_VERTICAL

public static final int FIT_VERTICAL
Vertical fit.
Field Value:
3

LEFT

public static final int LEFT
Left alignment.
Field Value:
4

NORTH

public static final int NORTH
North alignment (same as TOP).
Field Value:
1

NORTH_EAST

public static final int NORTH_EAST
North/East alignment (same as TOP_RIGHT).
Field Value:
9

NORTH_WEST

public static final int NORTH_WEST
North/West alignment (same as TOP_LEFT).
Field Value:
5

RIGHT

public static final int RIGHT
Right alignment.
Field Value:
8

SOUTH

public static final int SOUTH
South alignment (same as BOTTOM).
Field Value:
2

SOUTH_EAST

public static final int SOUTH_EAST
South/East alignment (same as BOTTOM_RIGHT).
Field Value:
10

SOUTH_WEST

public static final int SOUTH_WEST
South/West alignment (same as BOTTOM_LEFT).
Field Value:
6

TOP

public static final int TOP
Top alignment.
Field Value:
1

TOP_LEFT

public static final int TOP_LEFT
Top/Left alignment.
Field Value:
5

TOP_RIGHT

public static final int TOP_RIGHT
Top/Right alignment.
Field Value:
9

WEST

public static final int WEST
West alignment (same as LEFT).
Field Value:
4

Method Details

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.