public enum CompassDirection extends Enum<CompassDirection> implements SwingConstants
center direction as it not really correct?| Enum Constant and Description |
|---|
center |
east |
north |
northEast |
northWest |
south |
southEast |
southWest |
west |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Modifier and Type | Method and Description |
|---|---|
CompassDirection |
adjust(ComponentOrientation orientation)
Returns direction adjusted according to component orientation.
|
static CompassDirection |
get(int value)
Returns enumeration literal referencing constant value.
|
int |
getValue()
Returns constant value.
|
CompassDirection |
opposite()
Returns direction opposite to this one.
|
static CompassDirection |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompassDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompassDirection center
public static final CompassDirection northEast
public static final CompassDirection north
public static final CompassDirection northWest
public static final CompassDirection east
public static final CompassDirection west
public static final CompassDirection southEast
public static final CompassDirection south
public static final CompassDirection southWest
public static CompassDirection[] values()
for (CompassDirection c : CompassDirection.values()) System.out.println(c);
public static CompassDirection 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 int getValue()
public CompassDirection opposite()
public CompassDirection adjust(ComponentOrientation orientation)
orientation - component orientationpublic static CompassDirection get(int value)
value - constant valueCopyright © 2020. All rights reserved.