Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate


com.aspose.cells
Class GradientFill

java.lang.Object
  extended by com.aspose.cells.Fill
      extended by com.aspose.cells.GradientFill
All Implemented Interfaces:
java.lang.Cloneable

public class GradientFill
extends Fill

Fill format settings for GRADIENT type


Constructor Summary
GradientFill()
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object another)
           
 Color getColor1()
          Gets the gradient color 1.
 Color getColor2()
          Gets the gradient color 2.
 byte getGradientColorType()
          Gets the gradient color type for the specified fill.
 float getGradientDegree()
          Gets the gradient degree for the the specified fill.
 float getGradientFillAngle()
          Gets the angle for linear type Gradient fill, in degrees.
 GradientStops getGradientStops()
          Gets the gradient stops collection.
 byte getGradientStyle()
          Gets the gradient style for the specified fill.
 byte getGradientType()
          Gets gradient type.
 int getGradientVariant()
          Gets the gradient variant for the the specified fill.
 short getPresetColor()
          Gets the gradient preset color.
 void setColor1(Color color1)
          Sets the gradient color 1.
 void setColor2(Color color2)
          Sets the gradient color 2.
 void setDirection(byte direction)
          Sets direction type for Gradient fill.
 void setGradientColorType(byte gradientColorType)
          Sets the gradient color type for the specified fill.
 void setGradientDegree(float gradientDegree)
          Sets the gradient degree for the the specified fill.
 void setGradientFillAngle(float degrees)
          Sets the angle for linear type Gradient fill.
 void setGradientStyle(byte gradientStyle)
          Sets the gradient style for the specified fill.
 void setGradientType(byte type)
          Sets gradient type.
 void setGradientVariant(byte gradientVariant)
          Sets the gradient variant for the the specified fill.
 void setPresetColor(short presetColor)
          Sets the gradient preset color.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientFill

public GradientFill()
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in class Fill

equals

public boolean equals(java.lang.Object another)
Overrides:
equals in class java.lang.Object

getPresetColor

public short getPresetColor()
Gets the gradient preset color.

Returns:
the gradient preset color.
See Also:
GradientPresetType

setPresetColor

public void setPresetColor(short presetColor)
Sets the gradient preset color.

Parameters:
presetColor - the gradient preset color.
See Also:
GradientPresetType

getGradientType

public byte getGradientType()
Gets gradient type.

Returns:
gradient type.
See Also:
GradientFillType

setGradientType

public void setGradientType(byte type)
Sets gradient type.

Parameters:
type - gradient type.
See Also:
GradientFillType

setDirection

public void setDirection(byte direction)
Sets direction type for Gradient fill. Only applied for GradientFillType.RADIAL and GradientFillType.RECTANGULAR.

Parameters:
direction -
See Also:
GradientDirectionType

getGradientFillAngle

public float getGradientFillAngle()
Gets the angle for linear type Gradient fill, in degrees.

Returns:
angle in degrees.
See Also:
setGradientFillAngle(float)

setGradientFillAngle

public void setGradientFillAngle(float degrees)
Sets the angle for linear type Gradient fill.

Parameters:
degrees - angle in degrees. Can only be value between 0(inclusive) and 360(exclusive).

getGradientStops

public GradientStops getGradientStops()
Gets the gradient stops collection.

Returns:
the gradient stops collection.

getColor1

public Color getColor1()
Gets the gradient color 1.

Returns:
the gradient color 1.

setColor1

public void setColor1(Color color1)
Sets the gradient color 1.

Parameters:
color1 - color 1 for gradient.

getColor2

public Color getColor2()
Gets the gradient color 2.

Returns:
the gradient color 2.

setColor2

public void setColor2(Color color2)
Sets the gradient color 2.

Parameters:
color2 - color 2 for gradient.

getGradientColorType

public byte getGradientColorType()
Gets the gradient color type for the specified fill.

Returns:
the gradient color type.
See Also:
setGradientColorType(byte)

setGradientColorType

public void setGradientColorType(byte gradientColorType)
Sets the gradient color type for the specified fill.

Parameters:
gradientColorType - the gradient color type.
Throws:
java.lang.IllegalArgumentException - if gradientColorType is not a const member of GradientColorType
See Also:
GradientColorType

getGradientDegree

public float getGradientDegree()
Gets the gradient degree for the the specified fill.

Returns:
the gradient degree.

setGradientDegree

public void setGradientDegree(float gradientDegree)
Sets the gradient degree for the the specified fill.

Parameters:
gradientDegree - the gradient degree.Can only be a value from 0.0 (dark) through 1.0 (light).
Throws:
java.lang.IllegalArgumentException - if gradientDegree is not between 0.0 (dark) and 1.0 (light).

getGradientStyle

public byte getGradientStyle()
Gets the gradient style for the specified fill.

Returns:
the gradient style.
See Also:
setGradientStyle(byte)

setGradientStyle

public void setGradientStyle(byte gradientStyle)
Sets the gradient style for the specified fill.

Parameters:
gradientStyle - the gradient style.
Throws:
java.lang.IllegalArgumentException - if gradientStyle is not a const member of GradientStyleType.
See Also:
GradientStyleType

getGradientVariant

public int getGradientVariant()
Gets the gradient variant for the the specified fill.

Returns:
the gradient variant.

setGradientVariant

public void setGradientVariant(byte gradientVariant)
Sets the gradient variant for the the specified fill. The gradient variant can only be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FROM_CENTER, the Variant argument can only be 1 or 2.

Parameters:
gradientVariant - the gradient variant.