Enum GradientOrientation

    • Enum Constant Detail

      • LEFT_RIGHT

        public static final GradientOrientation LEFT_RIGHT
        From left to right (horizontal)
      • RIGHT_LEFT

        public static final GradientOrientation RIGHT_LEFT
        From right to left (horizontal)
      • TOP_RIGHT

        public static final GradientOrientation TOP_RIGHT
        From top(left) to right(bottom) (diagonal)
      • BOTTOM_LEFT

        public static final GradientOrientation BOTTOM_LEFT
        From bottom(right) to left(top) (diagonal)
      • TOP_LEFT

        public static final GradientOrientation TOP_LEFT
        From top(right) to left(bottom) (diagonal)
      • BOTTOM_RIGHT

        public static final GradientOrientation BOTTOM_RIGHT
        From bottom(left) to right(top) (diagonal)
      • IN_OUT

        public static final GradientOrientation IN_OUT
        From center to the borders (ONLY radial)
      • OUT_IN

        public static final GradientOrientation OUT_IN
        From borders to the center (ONLY radial)
    • Method Detail

      • values

        public static GradientOrientation[] 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 (GradientOrientation c : GradientOrientation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GradientOrientation valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getType

        public GradientType getType()
        Returns the supported gradient type.
        Returns:
        the supported gradient type
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property
      • getDefaultByType

        public static final GradientOrientation getDefaultByType​(GradientType type)
        Returns the default orientation based on gradient type.
        Parameters:
        type - gradient type
        Returns:
        the default orientation based on gradient type.
      • getCssStatement

        public String getCssStatement()
        Returns the CSS statement which represents the gradient orientation.
        Returns:
        the CSS statement which represents the gradient orientation