public enum Anchor extends Enum<Anchor>
Modifier and Type | Class and Description |
---|---|
static interface |
Anchor.AnchorComponent
Interface for components that are resizable by Anchor.
|
Enum Constant and Description |
---|
BOTTOM_LEFT
Indicates a bottom left anchor.
|
BOTTOM_RIGHT
Indicates a bottom right anchor.
|
TOP_LEFT
Indicates a top left anchor.
|
TOP_RIGHT
Indicates a top right anchor.
|
Modifier and Type | Method and Description |
---|---|
void |
setBounds(Anchor.AnchorComponent c,
Point oldLoc,
Dimension oldSize,
Dimension newSize)
Resizes a component.
|
static Anchor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Anchor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Anchor TOP_LEFT
public static final Anchor BOTTOM_LEFT
public static final Anchor TOP_RIGHT
public static final Anchor BOTTOM_RIGHT
public static Anchor[] values()
for (Anchor c : Anchor.values()) System.out.println(c);
public static Anchor 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 void setBounds(Anchor.AnchorComponent c, Point oldLoc, Dimension oldSize, Dimension newSize)
c
- the component to be resized.oldLoc
- the previous component location.oldSize
- the previous component size.newSize
- the new component size.