Package io.keikai.axyra.sheets.content
Class ConditionalFormat.Builder
java.lang.Object
io.keikai.axyra.sheets.content.ConditionalFormat.Builder
- Enclosing class:
- ConditionalFormat
Fluent builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaboveAverage(boolean below, boolean includeEqual) An above-average (or below-average whenbelow) rule.aboveAverage(boolean below, boolean includeEqual, int stdDev) An above/below-average rule restricted to a standard-deviation band: select cellsstdDevstandard deviations above (or below, whenbelow) the mean (ECMA-376 §18.3.1.1stdDev, values 1-3).The data-bar axis color.axisPosition(String position) Data-bar axis position:"automatic","middle", or"none".barBorderColor(Color color) Draw a data-bar border incolor.barDirection(String direction) Data-bar direction:"context","leftToRight", or"rightToLeft".beginsWith(String text) A "cell text begins withtext" rule.Abetweenrule.bold()border(BorderStyle style, Color color) Draw the same border style and color on all four edges of matching cells — the differential<border>of the rule style.borderSide(String side, BorderStyle borderStyle, Color color) Draw a border on one edge ("left","right","top", or"bottom") of matching cells.build()AcellIsrule, e.g.colorScale(Color... colors) A 2- or 3-color scale rule (min → [mid] → max).Highlight blank cells (Excel's "contains blanks").Highlight cells whose value is an error.containsText(String text) A "cell text containstext" rule.A data-bar rule drawn incolor.dateOccurring(TimePeriod period) A "date occurring" rule: highlight cells whose date falls in the given window (ECMA-376 §18.18.82 ST_TimePeriod).Highlight duplicate values in the range.A "cell text ends withtext" rule.expression(String formula) Anexpressionrule (a boolean formula).gradient(boolean gradient) Solid (false) vs gradient (true) data-bar fill.An icon-set rule, e.g.italic()Italicize matching cells.negativeBorderColor(Color color) The border color of negative-value data bars.negativeFillColor(Color color) The fill color of negative-value data bars.Highlight non-blank cells.Highlight cells whose value is not an error.notContainsText(String text) A "cell text does not containtext" rule.numberFormat(String formatCode) Apply a number format code (e.g.priority(int priority) Evaluation priority (lower wins).reverse(boolean reversed) Draw the icon set in reversed order.showValue(boolean show) Show / hide the cell value beside a data bar or icon set.Stop evaluating lower-priority rules once this one matches.Strike through matching cells.top10(int rank, boolean bottom, boolean percent) A top-N (or bottom-N whenbottom) rule;percentranks by %.Single-underline matching cells.Highlight values that occur exactly once in the range.Append a threshold value object (ECMA-376 §18.3.1.11 cfvo) for a color-scale / data-bar / icon-set rule.valueObject(String type) Append a valueless threshold ("min"/"max").valueObject(String type, String value) Append a threshold with a number or formula value.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
cellIs
AcellIsrule, e.g.cellIs("greaterThan", "100"). -
between
Abetweenrule. -
containsText
A "cell text containstext" rule. -
beginsWith
A "cell text begins withtext" rule. -
endsWith
A "cell text ends withtext" rule. -
top10
A top-N (or bottom-N whenbottom) rule;percentranks by %. -
aboveAverage
An above-average (or below-average whenbelow) rule. -
aboveAverage
An above/below-average rule restricted to a standard-deviation band: select cellsstdDevstandard deviations above (or below, whenbelow) the mean (ECMA-376 §18.3.1.1stdDev, values 1-3).includeEqualhas no effect once a band is set — it is accepted for signature symmetry. AstdDevof 0 falls back to the plain above/below-average rule. -
expression
Anexpressionrule (a boolean formula). -
duplicateValues
Highlight duplicate values in the range. -
uniqueValues
Highlight values that occur exactly once in the range. -
containsBlanks
Highlight blank cells (Excel's "contains blanks"). -
notContainsBlanks
Highlight non-blank cells. -
containsErrors
Highlight cells whose value is an error. -
notContainsErrors
Highlight cells whose value is not an error. -
notContainsText
A "cell text does not containtext" rule. -
dateOccurring
A "date occurring" rule: highlight cells whose date falls in the given window (ECMA-376 §18.18.82 ST_TimePeriod). -
colorScale
A 2- or 3-color scale rule (min → [mid] → max). Pass two or three colors; the gradient interpolates the cell values across them. -
dataBar
A data-bar rule drawn incolor. -
iconSet
An icon-set rule, e.g."3TrafficLights1","3Arrows","4Rating","5Quarters". Default thresholds split the range into equal percent bands (Excel's UI defaults); override withvalueObject(io.keikai.axyra.sheets.content.ConditionalFormat.ValueObject). -
priority
Evaluation priority (lower wins). -
stopIfTrue
Stop evaluating lower-priority rules once this one matches. -
valueObject
Append a threshold value object (ECMA-376 §18.3.1.11 cfvo) for a color-scale / data-bar / icon-set rule. Order matters: a data bar takes min then max; a scale or icon set takes one per color / icon. When none are supplied, Excel-matching defaults are synthesized. -
valueObject
Append a valueless threshold ("min"/"max"). -
valueObject
Append a threshold with a number or formula value. -
showValue
Show / hide the cell value beside a data bar or icon set. -
reverse
Draw the icon set in reversed order. -
gradient
Solid (false) vs gradient (true) data-bar fill. -
barBorderColor
Draw a data-bar border incolor. -
negativeFillColor
The fill color of negative-value data bars. -
negativeBorderColor
The border color of negative-value data bars. -
axisColor
The data-bar axis color. -
axisPosition
Data-bar axis position:"automatic","middle", or"none". -
barDirection
Data-bar direction:"context","leftToRight", or"rightToLeft". -
fillColor
-
fontColor
-
bold
-
italic
Italicize matching cells. -
strikethrough
Strike through matching cells. -
underline
Single-underline matching cells. -
numberFormat
Apply a number format code (e.g."0.00%","#,##0") to matching cells — the differential<numFmt>of the rule style. -
border
Draw the same border style and color on all four edges of matching cells — the differential<border>of the rule style. -
borderSide
Draw a border on one edge ("left","right","top", or"bottom") of matching cells. -
build
-