Enum Class RotationAngle

java.lang.Object
java.lang.Enum<RotationAngle>
com.xinapse.image.RotationAngle
All Implemented Interfaces:
Serializable, Comparable<RotationAngle>, Constable

public enum RotationAngle extends Enum<RotationAngle>
The rotation angles that can be used to rotate an image in steps of 90 degrees.
  • Enum Constant Details

  • Method Details

    • values

      public static RotationAngle[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RotationAngle valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getInstance

      public static RotationAngle getInstance(String s) throws InvalidArgumentException
      Returns a RotationAngle corresponding to a string.
      Parameters:
      s - a String from which the most-like plane will be interpreted. Can be:
      • "+90",
      • "180", or
      • "-90".
      Interpretation of the String is case-insensitive.
      Returns:
      a RotationAngle corresponding to a String.
      Throws:
      InvalidArgumentException - if the String is invalid.
    • getPreferredRotationAngle

      public static RotationAngle getPreferredRotationAngle(Preferences prefs)
      Gets the preferred rotation angle from the Preferences.
      Parameters:
      prefs - the Preferences from which to get the rotation angle.
      Returns:
      the preferred RotationAngle.
    • savePreferredRotationAngle

      public static void savePreferredRotationAngle(Preferences prefs, RotationAngle rotationAngle)
      Saves the supplied rotation angle to the Preferences as the preferred RotationAngle.
      Parameters:
      prefs - the Preferences in which to save the rotation angle.
      rotationAngle - the RotationAngle to save as the preferred one.
    • toString

      public String toString()
      Returns a java.lang.String describing this RotationAngle.
      Overrides:
      toString in class Enum<RotationAngle>
      Returns:
      a java.lang.String describing this RotationAngle.