Record Class Cell
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.Cell
- Record Components:
blocks- 內容align- 選填的段落預設對齊verticalAlign- 選填的垂直對齊;null表示靠上colSpan- 跨欄數(≥ 1)borders- 各邊框線覆寫;null 繼承表格rowSpan- 跨列數(1~256);僅允許不可拆的邏輯紀錄內,續列省略已占用欄位
public record Cell(List<Block> blocks, Align align, VerticalAlign verticalAlign, int colSpan, CellBorders borders, int rowSpan)
extends Record
表格儲存格
內容是受限的區塊清單,只允許 Paragraph、Image、Figure、Spacer。
對齊的優先順序為:段落自身的 ParagraphStyle.align() → 本儲存格的 align → 欄的預設對齊。
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCell(List<Block> blocks, Align align, VerticalAlign verticalAlign, int colSpan) 保留既有四參數建構器。Cell(List<Block> blocks, Align align, VerticalAlign verticalAlign, int colSpan, CellBorders borders, int rowSpan) Creates an instance of aCellrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalign()Returns the value of thealignrecord component.blocks()Returns the value of theblocksrecord component.borders()Returns the value of thebordersrecord component.intcolSpan()Returns the value of thecolSpanrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static Cell單一段落的儲存格static Cell單一純文字段落的儲存格introwSpan()Returns the value of therowSpanrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theverticalAlignrecord component.withBorders(CellBorders borders) withColSpan(int colSpan) withRowSpan(int rowSpan) withVerticalAlign(VerticalAlign verticalAlign)
-
Constructor Details
-
Cell
保留既有四參數建構器。 -
Cell
public Cell(List<Block> blocks, Align align, VerticalAlign verticalAlign, int colSpan, CellBorders borders, int rowSpan) Creates an instance of aCellrecord class.- Parameters:
blocks- the value for theblocksrecord componentalign- the value for thealignrecord componentverticalAlign- the value for theverticalAlignrecord componentcolSpan- the value for thecolSpanrecord componentborders- the value for thebordersrecord componentrowSpan- the value for therowSpanrecord component
-
-
Method Details
-
of
-
of
-
withColSpan
-
withAlign
-
withVerticalAlign
-
withRowSpan
- Parameters:
rowSpan- 同筆紀錄內跨列數(1~256)- Returns:
- 新儲存格;複製其他設定
-
withBorders
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
blocks
-
align
-
verticalAlign
Returns the value of theverticalAlignrecord component.- Returns:
- the value of the
verticalAlignrecord component
-
colSpan
-
borders
-
rowSpan
-