All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.GradientFill.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





GradientFill




com.aspose.cells
Class GradientFill

java.lang.Object
  extended by Fill
      extended by com.aspose.cells.GradientFill

public class GradientFill 
extends Fill

Represents the gradient fill.


Property Getters/Setters Summary
floatgetAngle()
voidsetAngle(float)
           The angle of linear fill.
intgetDirectionType()
           Gets the gradient direction type. The value of the property is GradientDirectionType integer constant.
intgetFillType()
           Gets the gradient fill type. The value of the property is GradientFillType integer constant.
com.aspose.cells.ColorgetGradientColor1()
           Gets gradient color 1. Applies to Excel97-2003
com.aspose.cells.ColorgetGradientColor2()
           Gets gradient color 2. Applies to Excel97-2003
intgetGradientColorType()
           Gets gradient color type. Applies to Excel97-2003 The value of the property is GradientColorType integer constant.
doublegetGradientDegree()
           Gets gradient degree. Applies to Excel97-2003
GradientStopCollectiongetGradientStops()
           Represents the gradient stop collection.
intgetGradientStyle()
           Gets gradient style type. Applies to Excel97-2003 The value of the property is GradientStyleType integer constant.
intgetPresetColor()
voidsetPresetColor(int)
           Returns the gradient preset color for the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.
intgetVariant()
           Gets variant. Applies to Excel97-2003
 
Method Summary
booleanequals(java.lang.Object obj)→ inherited from Fill
           /
inthashCode()→ inherited from Fill
           Gets the hash code.
voidsetGradient(int type, double angle, int direction)
           Set the gradient fill type and direction.
voidsetOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)
           Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
voidsetPresetColorGradient(int presetColor, int style, int variant)
           Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
voidsetTwoColorGradient(com.aspose.cells.Color color1, com.aspose.cells.Color color2, int style, int variant)
           Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
voidsetTwoColorGradient(com.aspose.cells.Color color1, double transparency1, com.aspose.cells.Color color2, double transparency2, int style, int variant)
           Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
 

Property Getters/Setters Detail

getGradientStops

public GradientStopCollection getGradientStops()
Represents the gradient stop collection.

getFillType

public int getFillType()
Gets the gradient fill type. The value of the property is GradientFillType integer constant.

getDirectionType

public int getDirectionType()
Gets the gradient direction type. The value of the property is GradientDirectionType integer constant.

getAngle/setAngle

public float getAngle() / public void setAngle(float value)
The angle of linear fill.

setAngle

public void setAngle(float value)
The angle of linear fill.

getGradientColor1

public com.aspose.cells.Color getGradientColor1()
Gets gradient color 1. Applies to Excel97-2003

getGradientColor2

public com.aspose.cells.Color getGradientColor2()
Gets gradient color 2. Applies to Excel97-2003

getGradientDegree

public double getGradientDegree()
Gets gradient degree. Applies to Excel97-2003

getGradientColorType

public int getGradientColorType()
Gets gradient color type. Applies to Excel97-2003 The value of the property is GradientColorType integer constant.

getPresetColor/setPresetColor

public int getPresetColor() / public void setPresetColor(int value)
Returns the gradient preset color for the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.

setPresetColor

public void setPresetColor(int value)
Returns the gradient preset color for the specified fill. Applies to Excel97-2003 The value of the property is GradientPresetType integer constant.

getVariant

public int getVariant()
Gets variant. Applies to Excel97-2003

getGradientStyle

public int getGradientStyle()
Gets gradient style type. Applies to Excel97-2003 The value of the property is GradientStyleType integer constant.

Method Detail

setGradient

public void setGradient(int type, double angle, int direction)
Set the gradient fill type and direction.
Parameters:
type - A GradientFillType value. Gradient fill type.
angle - The angle. Only applies for GradientFillType.Linear.
direction - A GradientDirectionType value. The direction type. Only applies for GradientFillType.Radial and GradientFillType.Rectangle.

setPresetColorGradient

public void setPresetColorGradient(int presetColor, int style, int variant)
Sets the specified fill to a preset-color gradient. Only applies for Excel 97-2003
Parameters:
presetColor - A GradientPresetType value. Preset color type
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can 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.FromCenter, the Variant argument can only be 1 or 2.

setOneColorGradient

public void setOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)
Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
Parameters:
color - One gradient color.
degree - The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can 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.FromCenter, the Variant argument can only be 1 or 2.

setTwoColorGradient

public void setTwoColorGradient(com.aspose.cells.Color color1, com.aspose.cells.Color color2, int style, int variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
Parameters:
color1 - One gradient color.
color2 - Two gradient color.
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can 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.FromCenter, the Variant argument can only be 1 or 2.

setTwoColorGradient

public void setTwoColorGradient(com.aspose.cells.Color color1, double transparency1, com.aspose.cells.Color color2, double transparency2, int style, int variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
Parameters:
color1 - One gradient color.
transparency1 - The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
color2 - Two gradient color.
transparency2 - The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can 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.FromCenter, the Variant argument can only be 1 or 2.

equals

→ inherited from Fill
public boolean equals(java.lang.Object obj)
/
Parameters:
obj -
Returns:

hashCode

→ inherited from Fill
public int hashCode()
Gets the hash code.
Returns:

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy