Class SimpleGradient

All Implemented Interfaces:
HasHandlers

public class SimpleGradient extends Gradient
Definition of a simple linear gradient defined by 2 colors and a direction.
  • Constructor Details

    • SimpleGradient

      public SimpleGradient()
    • SimpleGradient

      public SimpleGradient(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static SimpleGradient getOrCreateRef(JavaScriptObject jsObj)
    • setDirection

      public SimpleGradient setDirection(float direction)
      Angle of the direction vector in degrees. The default of 0.0 causes the gradient to sweep from the start color on the left to the end color on the right. Positive direction angles correspond to clockwise rotations of the default gradient.
      Parameters:
      direction - New direction value. Default value is 0.0
      Returns:
      SimpleGradient instance, for chaining setter calls
    • getDirection

      public float getDirection()
      Angle of the direction vector in degrees. The default of 0.0 causes the gradient to sweep from the start color on the left to the end color on the right. Positive direction angles correspond to clockwise rotations of the default gradient.
      Returns:
      Current direction value. Default value is 0.0
    • setEndColor

      public SimpleGradient setEndColor(String endColor)
      The end color of the gradient.
      Overrides:
      setEndColor in class Gradient
      Parameters:
      endColor - New endColor value. Default value is null
      Returns:
      SimpleGradient instance, for chaining setter calls
      See Also:
    • getEndColor

      public String getEndColor()
      The end color of the gradient.
      Overrides:
      getEndColor in class Gradient
      Returns:
      Current endColor value. Default value is null
      See Also:
    • setStartColor

      public SimpleGradient setStartColor(String startColor)
      The start color of the gradient.
      Overrides:
      setStartColor in class Gradient
      Parameters:
      startColor - New startColor value. Default value is null
      Returns:
      SimpleGradient instance, for chaining setter calls
      See Also:
    • getStartColor

      public String getStartColor()
      The start color of the gradient.
      Overrides:
      getStartColor in class Gradient
      Returns:
      Current startColor value. Default value is null
      See Also: