public enum Corner extends Enum<Corner>
Enum Constant and Description |
---|
BOTTOM |
BOTTOM_LEFT |
BOTTOM_RIGHT |
CENTER |
LEFT |
RIGHT |
TOP |
TOP_LEFT |
TOP_RIGHT |
Modifier and Type | Method and Description |
---|---|
Point |
getPosition(Control control)
Returns this corner's position on the given control in display coordinates.
|
Point |
getPosition(ControlWrapper wrapper)
Returns this corner's position on the given control in display coordinates.
|
Point |
getPosition(Rectangle rectangle)
Returns this corner's position within the given rectangle.
|
Point |
getPosition(ToolItem item)
Returns this corner's position on the given ToolItem in display coordinates.
|
Point |
topLeftRequiredFor(Rectangle rectangle,
Point position)
If you move the topLeft of `rectangle` to the returned point,
then this corner will be at `position`.
|
static Corner |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Corner[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Corner TOP_LEFT
public static final Corner TOP_RIGHT
public static final Corner BOTTOM_LEFT
public static final Corner BOTTOM_RIGHT
public static final Corner TOP
public static final Corner LEFT
public static final Corner BOTTOM
public static final Corner RIGHT
public static final Corner CENTER
public static Corner[] values()
for (Corner c : Corner.values()) System.out.println(c);
public static Corner valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Point getPosition(Rectangle rectangle)
public Point getPosition(Control control)
public Point getPosition(ControlWrapper wrapper)
public Point getPosition(ToolItem item)