Class Gradient

java.lang.Object
com.independentsoft.office.odf.styles.Gradient

public class Gradient extends Object
Represents a gradient for filling a drawing object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the Gradient class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new object that is a deep copy of the current instance.
    int
    Gets the angle that rotates the axis at which the gradient values are interpolated.
    int
    Gets the percentage value that is used to scale a border area which is filled by a solid color.
    int
    Gets the center of the geometry that is used for the gradient.
    int
    Gets the center of the geometry that is used for the gradient.
    Gets the name of a gradient.
    Gets the end value for the gradient element.
    int
    Gets the intensity of the gradient's end color as a percentage value.
    Gets the name by which a gradient can be referenced.
    Gets the start value for the gradient element.
    int
    Gets the intensity of the gradient's start color as a percentage value.
    Gets the rendering of graphic objects.
    void
    setAngle​(int angle)
    Sets the angle that rotates the axis at which the gradient values are interpolated.
    void
    setBorder​(int border)
    Sets the percentage value that is used to scale a border area which is filled by a solid color.
    void
    setCenterX​(int centerX)
    Sets the center of the geometry that is used for the gradient.
    void
    setCenterY​(int centerY)
    Sets the center of the geometry that is used for the gradient.
    void
    setDisplayName​(String displayName)
    Sets the name of a gradient.
    void
    setEndColor​(String endColor)
    Sets the end value for the gradient element.
    void
    setEndIntensity​(int endIntensity)
    Sets the intensity of the gradient's end color as a percentage value.
    void
    setName​(String name)
    Sets the name by which a gradient can be referenced.
    void
    setStartColor​(String startColor)
    Sets the start value for the gradient element.
    void
    setStartIntensity​(int startIntensity)
    Sets the intensity of the gradient's start color as a percentage value.
    void
    Sets the rendering of graphic objects.
    Converts the value of the current Gradient object to its equivalent string representation.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Gradient

      public Gradient()
      Initializes a new instance of the Gradient class.
  • Method Details

    • clone

      public Gradient clone()
      Creates a new object that is a deep copy of the current instance.
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Gradient object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getName

      public String getName()
      Gets the name by which a gradient can be referenced.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name by which a gradient can be referenced.
      Parameters:
      name - the new name
    • getDisplayName

      public String getDisplayName()
      Gets the name of a gradient.
      Returns:
      the display name
    • setDisplayName

      public void setDisplayName(String displayName)
      Sets the name of a gradient.
      Parameters:
      displayName - the new display name
    • getStyle

      public GradientStyle getStyle()
      Gets the rendering of graphic objects.
      Returns:
      the style
    • setStyle

      public void setStyle(GradientStyle style)
      Sets the rendering of graphic objects.
      Parameters:
      style - the new style
    • getCenterX

      public int getCenterX()
      Gets the center of the geometry that is used for the gradient.
      Returns:
      the center x
    • setCenterX

      public void setCenterX(int centerX)
      Sets the center of the geometry that is used for the gradient.
      Parameters:
      centerX - the new center x
    • getCenterY

      public int getCenterY()
      Gets the center of the geometry that is used for the gradient.
      Returns:
      the center y
    • setCenterY

      public void setCenterY(int centerY)
      Sets the center of the geometry that is used for the gradient.
      Parameters:
      centerY - the new center y
    • getStartColor

      public String getStartColor()
      Gets the start value for the gradient element.
      Returns:
      the start color
    • setStartColor

      public void setStartColor(String startColor)
      Sets the start value for the gradient element.
      Parameters:
      startColor - the new start color
    • getEndColor

      public String getEndColor()
      Gets the end value for the gradient element.
      Returns:
      the end color
    • setEndColor

      public void setEndColor(String endColor)
      Sets the end value for the gradient element.
      Parameters:
      endColor - the new end color
    • getStartIntensity

      public int getStartIntensity()
      Gets the intensity of the gradient's start color as a percentage value.
      Returns:
      the start intensity
    • setStartIntensity

      public void setStartIntensity(int startIntensity)
      Sets the intensity of the gradient's start color as a percentage value.
      Parameters:
      startIntensity - the new start intensity
    • getEndIntensity

      public int getEndIntensity()
      Gets the intensity of the gradient's end color as a percentage value.
      Returns:
      the end intensity
    • setEndIntensity

      public void setEndIntensity(int endIntensity)
      Sets the intensity of the gradient's end color as a percentage value.
      Parameters:
      endIntensity - the new end intensity
    • getAngle

      public int getAngle()
      Gets the angle that rotates the axis at which the gradient values are interpolated.
      Returns:
      the angle
    • setAngle

      public void setAngle(int angle)
      Sets the angle that rotates the axis at which the gradient values are interpolated.
      Parameters:
      angle - the new angle
    • getBorder

      public int getBorder()
      Gets the percentage value that is used to scale a border area which is filled by a solid color.
      Returns:
      the border
    • setBorder

      public void setBorder(int border)
      Sets the percentage value that is used to scale a border area which is filled by a solid color.
      Parameters:
      border - the new border