com.aspose.cells
Class FillFormat

java.lang.Object
    extended by com.aspose.cells.FillFormat

public class FillFormat 
extends java.lang.Object

Encapsulates the object that represents fill formatting for a shape.

Example:

//Filling the area of the 2nd NSeries with a gradient
chart.getNSeries().get(1).getArea().getFillFormat().setOneColorGradient(Color.getLime(), 1, GradientStyleType.HORIZONTAL, 1);

Property Getters/Setters Summary
com.aspose.cells.ColorgetGradientColor1()
           Returns the gradient color 1 for the the specified fill.
com.aspose.cells.ColorgetGradientColor2()
           Returns the gradient color 2 for the the specified fill.
intgetGradientColorType()
           Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.
doublegetGradientDegree()
           Returns the gradient degree for the the specified fill.
GradientFillgetGradientFill()
           Gets GradientFill object.
intgetGradientStyle()
           Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.
intgetGradientVariant()
           Returns the gradient variant for the the specified fill.
byte[]getImageData()
voidsetImageData(byte[] value)
           Gets and sets the picture image data.
intgetPattern()
voidsetPattern(int value)
           Represents an area's display pattern. The value of the property is FillPattern integer constant.
PatternFillgetPatternFill()
           Gets PatternFill object.
intgetPictureFormatType()
voidsetPictureFormatType(int value)
           Gets and sets the picture format type. The value of the property is FillPictureType integer constant.
intgetPresetColor()
           Returns the gradient preset color for the the specified fill. The value of the property is GradientPresetType integer constant.
doublegetScale()
voidsetScale(double value)
           Gets and sets the picture format scale.
intgetSetType()
voidsetSetType(int value)
           Gets the fill format set type. The value of the property is FormatSetType integer constant.
SolidFillgetSolidFill()
           Gets SolidFill object.
intgetTexture()
voidsetTexture(int value)
           Represents the texture type for the specified fill. The value of the property is TextureType integer constant.
TextureFillgetTextureFill()
           Gets TextureFill object.
intgetType()
voidsetType(int value)
           The fill format type The value of the property is FillType integer constant.
 
Method Summary
voidsetOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)
           Sets the specified fill to a one-color gradient.
voidsetPresetColorGradient(int presetColor, int style, int variant)
           Sets the specified fill to a preset-color gradient.
voidsetTwoColorGradient(com.aspose.cells.Color color1, com.aspose.cells.Color color2, int style, int variant)
           Sets the specified fill to a two-color gradient.
 

Property Getters/Setters Detail

getType/setType

public int getType() / public void setType(int value)
The fill format type The value of the property is FillType integer constant.

getSetType/setSetType

public int getSetType() / public void setSetType(int value)
Gets the fill format set type. The value of the property is FormatSetType integer constant.

getGradientFill

public GradientFill getGradientFill()
Gets GradientFill object.

getTextureFill

public TextureFill getTextureFill()
Gets TextureFill object.

getSolidFill

public SolidFill getSolidFill()
Gets SolidFill object.

getPatternFill

public PatternFill getPatternFill()
Gets PatternFill object.

getGradientColorType

public int getGradientColorType()
Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.

getGradientStyle

public int getGradientStyle()
Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.

getGradientColor1

public com.aspose.cells.Color getGradientColor1()
Returns the gradient color 1 for the the specified fill.

getGradientColor2

public com.aspose.cells.Color getGradientColor2()
Returns the gradient color 2 for the the specified fill. Only when the graident color type is GradientColorType.TwoColors, this property is meaningful.

getGradientDegree

public double getGradientDegree()
Returns the gradient degree for the the specified fill. Can only be a value from 0.0 (dark) through 1.0 (light).

getGradientVariant

public int getGradientVariant()
Returns the gradient variant for the the specified fill. 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.FromCenter, the Variant argument can only be 1 or 2.

getPresetColor

public int getPresetColor()
Returns the gradient preset color for the the specified fill. The value of the property is GradientPresetType integer constant.

getTexture/setTexture

public int getTexture() / public void setTexture(int value)
Represents the texture type for the specified fill. The value of the property is TextureType integer constant.

getPattern/setPattern

public int getPattern() / public void setPattern(int value)
Represents an area's display pattern. The value of the property is FillPattern integer constant.

getPictureFormatType/setPictureFormatType

public int getPictureFormatType() / public void setPictureFormatType(int value)
Gets and sets the picture format type. The value of the property is FillPictureType integer constant.

getScale/setScale

public double getScale() / public void setScale(double value)
Gets and sets the picture format scale.

getImageData/setImageData

public byte[] getImageData() / public void setImageData(byte[] value)
Gets and sets the picture image data. If the fill format is not custom texture format,return null.

Method Detail

setOneColorGradient

public void setOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)
Sets the specified fill to a one-color gradient.
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.
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.

setPresetColorGradient

public void setPresetColorGradient(int presetColor, int style, int variant)
Sets the specified fill to a preset-color gradient.
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.

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