GradientFill

Inheritance: java.lang.Object, com.aspose.cells.Fill

public class GradientFill extends Fill

Represents the gradient fill.

Methods

MethodDescription
equals(Object obj)/
getAngle()The angle of linear fill.
getClass()
getDirectionType()Gets the gradient direction type.
getFillType()Gets the gradient fill type.
getGradientColor1()Gets gradient color 1.
getGradientColor2()Gets gradient color 2.
getGradientColorType()Gets gradient color type.
getGradientDegree()Gets gradient degree.
getGradientStops()Represents the gradient stop collection.
getGradientStyle()Gets gradient style type.
getPresetColor()Returns the gradient preset color for the specified fill.
getVariant()Gets variant.
hashCode()Gets the hash code.
notify()
notifyAll()
setAngle(float value)The angle of linear fill.
setGradient(int type, double angle, int direction)Set the gradient fill type and direction.
setOneColorGradient(Color color, double degree, int style, int variant)Sets the specified fill to a one-color gradient.
setPresetColor(int value)Returns the gradient preset color for the specified fill.
setPresetColorGradient(int presetColor, int style, int variant)Sets the specified fill to a preset-color gradient.
setPresetThemeGradient(int gradientType, int themeColorType)Sets preset theme gradient fill.
setTwoColorGradient(Color color1, Color color2, int style, int variant)Sets the specified fill to a two-color gradient.
setTwoColorGradient(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)Sets the specified fill to a two-color gradient.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object obj)

public boolean equals(Object obj)

/

Parameters:

ParameterTypeDescription
objjava.lang.Object

Returns: boolean -

getAngle()

public float getAngle()

The angle of linear fill.

Returns: float

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDirectionType()

public int getDirectionType()

Gets the gradient direction type.

See GradientDirectionType.

Returns: int

getFillType()

public int getFillType()

Gets the gradient fill type.

See GradientFillType.

Returns: int

getGradientColor1()

public Color getGradientColor1()

Gets gradient color 1. Applies to Excel97-2003

Returns: Color

getGradientColor2()

public Color getGradientColor2()

Gets gradient color 2. Applies to Excel97-2003

Returns: Color

getGradientColorType()

public int getGradientColorType()

Gets gradient color type. Applies to Excel97-2003

See GradientColorType.

Returns: int

getGradientDegree()

public double getGradientDegree()

Gets gradient degree. Applies to Excel97-2003

Returns: double

getGradientStops()

public GradientStopCollection getGradientStops()

Represents the gradient stop collection.

Returns: GradientStopCollection

getGradientStyle()

public int getGradientStyle()

Gets gradient style type. Applies to Excel97-2003

See GradientStyleType.

Returns: int

getPresetColor()

public int getPresetColor()

Returns the gradient preset color for the specified fill. Applies to Excel97-2003

See GradientPresetType.

Returns: int

getVariant()

public int getVariant()

Gets variant. Applies to Excel97-2003

Returns: int

hashCode()

public int hashCode()

Gets the hash code.

Returns: int -

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAngle(float value)

public void setAngle(float value)

The angle of linear fill.

Parameters:

ParameterTypeDescription
valuefloat

setGradient(int type, double angle, int direction)

public void setGradient(int type, double angle, int direction)

Set the gradient fill type and direction.

Parameters:

ParameterTypeDescription
typeintGradientFillType. Gradient fill type.
angledoubleThe angle. Only applies for GradientFillType.Linear.
directionintGradientDirectionType. The direction type. Only applies for GradientFillType.Radial and GradientFillType.Rectangle.

setOneColorGradient(Color color, double degree, int style, int variant)

public void setOneColorGradient(Color color, double degree, int style, int variant)

Sets the specified fill to a one-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
colorColorOne gradient color.
degreedoubleThe gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

setPresetColor(int value)

public void setPresetColor(int value)

Returns the gradient preset color for the specified fill. Applies to Excel97-2003

See GradientPresetType.

Parameters:

ParameterTypeDescription
valueint

setPresetColorGradient(int presetColor, int style, int variant)

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:

ParameterTypeDescription
presetColorintGradientPresetType. Preset color type
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

setPresetThemeGradient(int gradientType, int themeColorType)

public void setPresetThemeGradient(int gradientType, int themeColorType)

Sets preset theme gradient fill.

Parameters:

ParameterTypeDescription
gradientTypeintPresetThemeGradientType. The preset gradient type.
themeColorTypeintThemeColorType. The theme color type.

setTwoColorGradient(Color color1, Color color2, int style, int variant)

public void setTwoColorGradient(Color color1, Color color2, int style, int variant)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
color2ColorTwo gradient color.
styleintGradientStyleType. Gradient shading style.
variantintThe 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(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)

public void setTwoColorGradient(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
transparency1doubleThe degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
color2ColorTwo gradient color.
transparency2doubleThe degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int