[]
Serializable, Comparable<GradientStyle>, ConstableUse this enum with gradient-related members such as IFillFormat.oneColorGradient(GradientStyle,int,double), IFillFormat.twoColorGradient(GradientStyle,int), and IFillFormat.presetGradient(GradientStyle,int,PresetGradientType) to control the direction and origin of a shape's gradient effect.
IShape shape = worksheet.getShapes().addShape("GradientRect", AutoShapeType.Rectangle, 20, 20, 120, 60);
shape.getFill().twoColorGradient(GradientStyle.Horizontal, 1);
IGradientStops gradientStops = shape.getFill().getGradientStops();
gradientStops.get(0).getColor().setRGB(Color.GetBlue());
gradientStops.get(1).getColor().setRGB(Color.GetRed());
Enum.EnumDesc<E extends Enum<E>>static GradientStylestatic GradientStyle[]values()Use this value to apply a center-based gradient style. When used with gradient APIs that accept a variant, only variants 1 and 2 are supported.
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum class has no constant with the specified nameNullPointerException - if the argument is null