public interface IStyleService
Modifier and Type | Method and Description |
---|---|
void |
clear(IRangeAddress range)
Clears the style in the range of cells
|
void |
clearHighlighting()
Clears highlighting for all cells
|
void |
clearHighlighting(IRangeAddress range)
Clears highlighting for given range
|
void |
highlight(IRangeAddress range,
Consumer<IStyleBuilder> builderConsumer)
Highlights a range of cells.
|
void |
highlight(IRangeAddress range,
IStyle style)
Highlights a range of cells.
|
void |
set(int colNum,
int rowNum,
IStyle style)
Sets the style in the single cell.
|
void |
set(IRangeAddress range,
Consumer<IStyleBuilder> builderConsumer)
Sets the font in the range of cells.
|
void |
set(IRangeAddress range,
IStyle style)
Sets the style in the range of cells
|
void |
set(String range,
IStyle style)
Sets the style to range of cells with the given String with values like "A4" or "D4:G10"
|
void |
updateCommon(IRangeAddress range,
Consumer<IStyleBuilder> builderConsumer)
Edits a common style in the range.
|
void |
updateCommon(IRangeAddress range,
UnaryOperator<IStyle> editor)
Edit a common style in the range.
|
void |
updateEach(IRangeAddress range,
Consumer<IStyleBuilder> builderConsumer)
Edits the style of each cell in the given range.
|
void |
updateEach(IRangeAddress range,
UnaryOperator<IStyle> editor)
Edits the style of each cell in the given range.
|
void updateCommon(IRangeAddress range, UnaryOperator<IStyle> editor)
'Common' means here the following: the value of each attribute of the style is not null when all cells from the selected area have the same value of the attribute. The value of the attribute is null when the style properties of a cell or cells are different from the properties of the other cells in the range
Edit only the attributes that are not null. Otherwise,
use the updateCommon(IRangeAddress, Consumer)
which is more convenient
range
- the IRangeAddress
in which the settings will be appliededitor
- the function which takes the current common style and produces the new style to be appliedUnaryOperator
,
IStyle
void updateCommon(IRangeAddress range, Consumer<IStyleBuilder> builderConsumer)
IStyleBuilder
with the current
properties of the common style.
The function calls IStyleBuilder.build()
and then updateCommon(IRangeAddress, UnaryOperator)
range
- the IRangeAddress
in which the settings will be appliedbuilderConsumer
- the function which takes IStyleBuilder
filled with the current properties
of the common styleConsumer
,
IStyle
void updateEach(IRangeAddress range, UnaryOperator<IStyle> editor)
range
- the IRangeAddress
in which the settings will be appliededitor
- the function which takes the current common style and produces the new style to be appliedUnaryOperator
,
IStyle
void updateEach(IRangeAddress range, Consumer<IStyleBuilder> builderConsumer)
range
- the IRangeAddress
in which the settings will be appliedbuilderConsumer
- the function which takes IStyleBuilder
filled with the current properties
of the common styleConsumer
,
IStyle
void set(int colNum, int rowNum, IStyle style)
In the case of incorrect row/column numbers the IndexOutOfBoundsException
will be thrown
colNum
- the column numberrowNum
- the row numberstyle
- the style to setvoid set(String range, IStyle style)
In the case of the incorrect string value the ParseRangeAddressException
will be thrown
range
- the cells rangestyle
- the valueIStyle
void set(IRangeAddress range, IStyle style)
range
- the IRangeAddress
in which the settings will be appliedstyle
- the style to be setIRangeAddress
,
IStyle
void set(IRangeAddress range, Consumer<IStyleBuilder> builderConsumer)
IStyleBuilder
into which the desired values will be filled in. The builder is instantiated from the IScellApiResolver
so that the user could register his own implementation using custom default data.
The function calls IStyleBuilder.build()
and set(IRangeAddress, IStyle)
with the obtained data resultrange
- the IRangeAddress
in which the settings will be appliedbuilderConsumer
- the Consumer with a new instance of IStyleBuilder
IRangeAddress
,
IStyle
void clear(IRangeAddress range)
range
- the IRangeAddress
in which the clearing will be appliedIRangeAddress
void highlight(IRangeAddress range, Consumer<IStyleBuilder> builderConsumer)
range
- the IRangeAddress
in which the highlighted style will be appliedbuilderConsumer
- the Consumer with a new instance of IStyleBuilder
IRangeAddress
,
IStyleBuilder
void highlight(IRangeAddress range, IStyle style)
range
- the IRangeAddress
in which the highlighted style will be appliedstyle
- the style of highlightIRangeAddress
,
IStyle
void clearHighlighting()
void clearHighlighting(IRangeAddress range)
range
- range to clear highlightingCopyright © 2024. All rights reserved.