Record Class Table
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.Table
- Record Components:
id- 選填識別columns- 欄定義headerRows- 指定表頭列;啟用columnTitles時追加在欄標題之後rows- 列來源style- 表格樣式覆寫;null表示沿用文件預設repeatHeader- 是否每頁重複表頭columnTitles- 是否先產生欄標題列;預設true,false僅使用指定的headerRowsmaxRecordsPerPage- 每頁此表格的邏輯紀錄上限;0 表示不限制,正值時每筆完整放置firstHeaderRows- 首張表格頁的指定表頭;空清單沿用headerRows,續頁仍使用headerRows
- All Implemented Interfaces:
Block
public record Table(String id, List<Column> columns, List<TableRow> headerRows, RowSource rows, TableStyle style, boolean repeatHeader, boolean columnTitles, int maxRecordsPerPage, List<TableRow> firstHeaderRows)
extends Record
implements Block
可跨頁表格
預設以各欄的 Column.title() 產生標題列,再追加 headerRows;關閉 columnTitles 時只使用指定表頭。
repeatHeader 時每頁重複完整表頭。
群組跨頁時 renderer 依列的 groupPath 補續接列,格式見 TableStyle.continuationLabel()。
- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionTable(String id, List<Column> columns, List<TableRow> headerRows, RowSource rows, TableStyle style, boolean repeatHeader) 相容既有六參數建構器;保留自動欄標題Table(String id, List<Column> columns, List<TableRow> headerRows, RowSource rows, TableStyle style, boolean repeatHeader, boolean columnTitles, int maxRecordsPerPage) 保留八參數建構器;首張表格頁沿用共同表頭。Table(String id, List<Column> columns, List<TableRow> headerRows, RowSource rows, TableStyle style, boolean repeatHeader, boolean columnTitles, int maxRecordsPerPage, List<TableRow> firstHeaderRows) Creates an instance of aTablerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolumns()Returns the value of thecolumnsrecord component.booleanReturns the value of thecolumnTitlesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstHeaderRowsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theheaderRowsrecord component.id()Returns the value of theidrecord component.intReturns the value of themaxRecordsPerPagerecord component.booleanReturns the value of therepeatHeaderrecord component.rows()Returns the value of therowsrecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Table
-
Table
-
Table
public Table(String id, List<Column> columns, List<TableRow> headerRows, RowSource rows, TableStyle style, boolean repeatHeader, boolean columnTitles, int maxRecordsPerPage, List<TableRow> firstHeaderRows) Creates an instance of aTablerecord class.- Parameters:
id- the value for theidrecord componentcolumns- the value for thecolumnsrecord componentheaderRows- the value for theheaderRowsrecord componentrows- the value for therowsrecord componentstyle- the value for thestylerecord componentrepeatHeader- the value for therepeatHeaderrecord componentcolumnTitles- the value for thecolumnTitlesrecord componentmaxRecordsPerPage- the value for themaxRecordsPerPagerecord componentfirstHeaderRows- the value for thefirstHeaderRowsrecord component
-
-
Method Details
-
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. -
id
-
columns
-
headerRows
Returns the value of theheaderRowsrecord component.- Returns:
- the value of the
headerRowsrecord component
-
rows
-
style
-
repeatHeader
public boolean repeatHeader()Returns the value of therepeatHeaderrecord component.- Returns:
- the value of the
repeatHeaderrecord component
-
columnTitles
public boolean columnTitles()Returns the value of thecolumnTitlesrecord component.- Returns:
- the value of the
columnTitlesrecord component
-
maxRecordsPerPage
public int maxRecordsPerPage()Returns the value of themaxRecordsPerPagerecord component.- Returns:
- the value of the
maxRecordsPerPagerecord component
-
firstHeaderRows
Returns the value of thefirstHeaderRowsrecord component.- Returns:
- the value of the
firstHeaderRowsrecord component
-