public enum GradientShadingStyle extends Enum<GradientShadingStyle>
Represents a shading style and variant of a gradient fill effect.
Gradient fill is currently supported in XLSX
Following code demonstrates fill formatting:// 'Fill' formatting group
sheet.getCell("B24").setValue("FillPattern.setPattern(...)");
sheet.getCell("C24").getStyle().getFillPattern().setPattern(FillPatternStyle.THIN_HORIZONTAL_CROSSHATCH, SpreadsheetColor.fromName(ColorName.GREEN), SpreadsheetColor.fromName(ColorName.YELLOW));
sheet.getCell("B25").setValue("FillPattern.setGradient(...)");
sheet.getCell("C25").getStyle().getFillPattern().setGradient(GradientShadingStyle.HORIZONTAL_HIGH, SpreadsheetColor.fromName(ColorName.GREEN), SpreadsheetColor.fromName(ColorName.YELLOW));
ExcelFillPattern.getGradientStyle()
Enum Constant and Description |
---|
COMPLEX
Gradient fill effect is too complex to be described with this enumeration.
|
DIAGONAL_DOWN
Linear gradient where the first color starts at the top-right and bottom-left corners of the cell and blends diagonally with the second color which starts in the middle of the cell [1 \ 2 \ 1].
|
DIAGONAL_DOWN_HIGH
Linear gradient where the first color starts at the top-right corner of the cell and blends diagonally with the second color which starts at the bottom-left corner of the cell [2 \ 1].
|
DIAGONAL_DOWN_LOW
Linear gradient where the first color starts at the bottom-left corner of the cell and blends diagonally with the second color which starts at the top-right corner of the cell [1 \ 2].
|
DIAGONAL_UP
Linear gradient where the first color starts at the top-left and bottom-right corners of the cell and blends diagonally with the second color which starts in the middle of the cell [1 / 2 / 1].
|
DIAGONAL_UP_HIGH
Linear gradient where the first color starts at the top-left corner of the cell and blends diagonally with the second color which starts at the bottom-right corner of the cell [1 / 2].
|
DIAGONAL_UP_LOW
Linear gradient where the first color starts at the bottom-right corner of the cell and blends diagonally with the second color which starts at the top-left corner of the cell [2 / 1].
|
FROM_BOTTOM_LEFT_CORNER
Path gradient where the first color starts at the bottom-left corner of the cell and blends with the second color which starts at the other corners of the cell.
|
FROM_BOTTOM_RIGHT_CORNER
Path gradient where the first color starts at the bottom-right corner of the cell and blends with the second color which starts at the other corners of the cell.
|
FROM_CENTER
Path gradient where the first color starts in the middle of the cell and blends with the second color which starts at the corners of the cell.
|
FROM_TOP_LEFT_CORNER
Path gradient where the first color starts at the top-left corner of the cell and blends with the second color which starts at the other corners of the cell.
|
FROM_TOP_RIGHT_CORNER
Path gradient where the first color starts at the top-right corner of the cell and blends with the second color which starts at the other corners of the cell.
|
HORIZONTAL
Linear gradient where the first color starts at the top and bottom sides of the cell and blends horizontally with the second color which starts in the middle of the cell [1 - 2 - 1].
|
HORIZONTAL_HIGH
Linear gradient where the first color starts at the top side of the cell and blends horizontally with the second color which starts at the bottom side of the cell [1 - 2].
|
HORIZONTAL_LOW
Linear gradient where the first color starts at the bottom side of the cell and blends horizontally with the second color which starts at the top side of the cell [2 - 1].
|
NONE
Cell doesn't have any gradient fill effect.
|
VERTICAL
Linear gradient where the first color starts at the left and right sides of the cell and blends vertically with the second color which starts in the middle of the cell [1 | 2 | 1].
|
VERTICAL_HIGH
Linear gradient where the first color starts at the right side of the cell and blends vertically with the second color which starts at the left side of the cell [2 | 1].
|
VERTICAL_LOW
Linear gradient where the first color starts at the left side of the cell and blends vertically with the second color which starts at the right side of the cell [1 | 2].
|
Modifier and Type | Method and Description |
---|---|
static GradientShadingStyle |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GradientShadingStyle[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GradientShadingStyle COMPLEX
public static final GradientShadingStyle DIAGONAL_DOWN
public static final GradientShadingStyle DIAGONAL_DOWN_HIGH
public static final GradientShadingStyle DIAGONAL_DOWN_LOW
public static final GradientShadingStyle DIAGONAL_UP
public static final GradientShadingStyle DIAGONAL_UP_HIGH
public static final GradientShadingStyle DIAGONAL_UP_LOW
public static final GradientShadingStyle FROM_BOTTOM_LEFT_CORNER
public static final GradientShadingStyle FROM_BOTTOM_RIGHT_CORNER
public static final GradientShadingStyle FROM_CENTER
public static final GradientShadingStyle FROM_TOP_LEFT_CORNER
public static final GradientShadingStyle FROM_TOP_RIGHT_CORNER
public static final GradientShadingStyle HORIZONTAL
public static final GradientShadingStyle HORIZONTAL_HIGH
public static final GradientShadingStyle HORIZONTAL_LOW
public static final GradientShadingStyle NONE
public static final GradientShadingStyle VERTICAL
public static final GradientShadingStyle VERTICAL_HIGH
public static final GradientShadingStyle VERTICAL_LOW
public static GradientShadingStyle valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static GradientShadingStyle[] values()
for (GradientShadingStyle c : GradientShadingStyle.values()) System.out.println(c);
© GemBox Ltd. — All rights reserved.