Package com.iizix.prop.ui
Enum ImageOrientation
- java.lang.Object
- java.lang.Enum<ImageOrientation>
- com.iizix.prop.ui.ImageOrientation
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ImageOrientation>
public enum ImageOrientation extends java.lang.Enum<ImageOrientation>
Enumeration class for the orientations of the image.Integer values for orientation of image:
- 1 = unchanged
- 2 = flipped horizontally
- 3 = rotated 180 degrees
- 4 = flipped vertically
- 5 = flipped horizontally, then rotated left by 90 degrees
- 6 = rotated clockwise by 90 degrees
- 7 = flipped horizontally, then rotated right by 90 degrees
- 8 = rotated counter-clockwise by 90 degrees
- Author:
- Christopher Mindus
Enum Constant Summary
Enum Constants Enum Constant Description FLIP_HORZ
Flipped horizontally (= 2).FLIP_HORZ_ROTATE_LEFT_90
Flipped horizontally, then rotated left or counter-clockwise by 90 degrees (= 5).FLIP_HORZ_ROTATED_RIGHT_90
Flipped horizontally, then rotated right or clockwise by 90 degrees (= 7).FLIP_VERT
Flipped vertically (= 4).ROTATE_180
Rotated 180 degrees (= 3).ROTATE_LEFT_90
Rotated left or counter-clockwise by 90 degrees (= 8).ROTATE_RIGHT_90
Rotated clockwise by 90 degrees (= 6).UNCHANGED
Unchanged (= 1).UNDEFINED
Undefined orientation (everything else than 1 to 8), used when an orientation value is not 1 through 8.
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageOrientation
from(int orientation)
Returns an orientation from the given integer value.static ImageOrientation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ImageOrientation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
Enum Constant Detail
UNDEFINED
public static final ImageOrientation UNDEFINED
Undefined orientation (everything else than 1 to 8), used when an orientation value is not 1 through 8.
UNCHANGED
public static final ImageOrientation UNCHANGED
Unchanged (= 1).
FLIP_HORZ
public static final ImageOrientation FLIP_HORZ
Flipped horizontally (= 2).
ROTATE_180
public static final ImageOrientation ROTATE_180
Rotated 180 degrees (= 3).
FLIP_VERT
public static final ImageOrientation FLIP_VERT
Flipped vertically (= 4).
FLIP_HORZ_ROTATE_LEFT_90
public static final ImageOrientation FLIP_HORZ_ROTATE_LEFT_90
Flipped horizontally, then rotated left or counter-clockwise by 90 degrees (= 5).
ROTATE_RIGHT_90
public static final ImageOrientation ROTATE_RIGHT_90
Rotated clockwise by 90 degrees (= 6).
FLIP_HORZ_ROTATED_RIGHT_90
public static final ImageOrientation FLIP_HORZ_ROTATED_RIGHT_90
Flipped horizontally, then rotated right or clockwise by 90 degrees (= 7).
ROTATE_LEFT_90
public static final ImageOrientation ROTATE_LEFT_90
Rotated left or counter-clockwise by 90 degrees (= 8).
Method Detail
values
public static ImageOrientation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageOrientation c : ImageOrientation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static ImageOrientation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
from
public static ImageOrientation from(int orientation)
Returns an orientation from the given integer value.- Parameters:
orientation
- Value normally between 1 trough 8.- Returns:
- The orientation matching value 1 through 8, otherwise
{@link #UNDEFINED}
.