GradientFill
Inheritance: java.lang.Object, com.aspose.cells.Fill
public class GradientFill extends Fill
Represents the gradient fill.
Methods
equals(Object obj)
public boolean equals(Object obj)
/
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.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.
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:
Parameter | Type | Description |
---|---|---|
value | float |
setGradient(int type, double angle, int direction)
public void setGradient(int type, double angle, int direction)
Set the gradient fill type and direction.
Parameters:
Parameter | Type | Description |
---|---|---|
type | int | GradientFillType. Gradient fill type. |
angle | double | The angle. Only applies for GradientFillType.Linear. |
direction | int | GradientDirectionType. 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:
Parameter | Type | Description |
---|---|---|
color | Color | One gradient color. |
degree | double | The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light). |
style | int | GradientStyleType. Gradient shading style. |
variant | int | 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. |
setPresetColor(int value)
public void setPresetColor(int value)
Returns the gradient preset color for the specified fill. Applies to Excel97-2003
See GradientPresetType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
presetColor | int | GradientPresetType. Preset color type |
style | int | GradientStyleType. Gradient shading style. |
variant | int | 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. |
setPresetThemeGradient(int gradientType, int themeColorType)
public void setPresetThemeGradient(int gradientType, int themeColorType)
Sets preset theme gradient fill.
Parameters:
Parameter | Type | Description |
---|---|---|
gradientType | int | PresetThemeGradientType. The preset gradient type. |
themeColorType | int | ThemeColorType. 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:
Parameter | Type | Description |
---|---|---|
color1 | Color | One gradient color. |
color2 | Color | Two gradient color. |
style | int | GradientStyleType. Gradient shading style. |
variant | int | 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(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:
Parameter | Type | Description |
---|---|---|
color1 | Color | One gradient color. |
transparency1 | double | The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear). |
color2 | Color | Two gradient color. |
transparency2 | double | The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear). |
style | int | GradientStyleType. Gradient shading style. |
variant | int | 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. |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |