|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.validationframework.swing.decoration.anchor.Anchor
public class Anchor
Entity representing an anchor.
An anchor is, for instance, a virtual point on a component relatively to its
bounds, and can be used as the point to attach decoration.
| Field Summary | |
|---|---|
static Anchor |
BOTTOM_LEFT
Convenience anchor representing a point at the bottom left hand corner. |
static Anchor |
BOTTOM_RIGHT
Convenience anchor representing a point at the bottom right hand corner. |
static Anchor |
CENTER
Convenience anchor representing a point at the center. |
static Anchor |
TOP_LEFT
Convenience anchor representing a point at the top left hand corner. |
static Anchor |
TOP_RIGHT
Convenience anchor representing a point at the top right hand corner. |
| Constructor Summary | |
|---|---|
Anchor(Anchor anchor)
Constructor specifying an anchor to copy from. |
|
Anchor(float relativeX,
float relativeY)
Anchor specifying the relative positions on the X axis and Y axis. |
|
Anchor(float relativeX,
int offsetX,
float relativeY,
int offsetY)
Anchor specifying the relative positions and offsets on the X axis and Y axis. |
|
| Method Summary | |
|---|---|
Point |
getAnchorPoint(Dimension size)
Retrieves a point on an object of the specified size. |
Point |
getAnchorPoint(int width,
int height)
Retrieves a point on an object of the specified size. |
int |
getOffsetX()
Gets the offset in pixels on the X axis, relatively to relativeX. |
int |
getOffsetY()
Gets the offset in pixels on the Y axis, relatively to relativeY. |
float |
getRelativeX()
Gets the relative position in percentage relatively to the origin and length on the X axis. |
float |
getRelativeY()
Gets the relative position in percentage relatively to the origin and length on the Y axis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Anchor TOP_LEFT
public static final Anchor TOP_RIGHT
public static final Anchor BOTTOM_LEFT
public static final Anchor BOTTOM_RIGHT
public static final Anchor CENTER
| Constructor Detail |
|---|
public Anchor(Anchor anchor)
anchor - Anchor to copy from.
public Anchor(float relativeX,
float relativeY)
relativeX - Relative position on the X axis.relativeY - Relative position on the Y axis.relativeX,
relativeY
public Anchor(float relativeX,
int offsetX,
float relativeY,
int offsetY)
relativeX - Relative position on the X axis.offsetX - Position offset on the X axis.relativeY - Relative position on the Y axis.offsetY - Position offset on the Y axis.relativeX,
offsetX,
relativeY,
offsetY| Method Detail |
|---|
public float getRelativeX()
public float getRelativeY()
public int getOffsetX()
relativeX.
public int getOffsetY()
relativeY.
public Point getAnchorPoint(Dimension size)
size - Size of the object to get the anchor point for.
getAnchorPoint(int, int)
public Point getAnchorPoint(int width,
int height)
width - Width of the object to get the anchor point for.height - Height of the object to get the anchor point for.
getAnchorPoint(Dimension)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||