Record Class TableStyle
java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.TableStyle
- Record Components:
text- 表格文字樣式覆寫headerFill- 表頭底色groupFill- 群組標題列底色totalFill- 小計與總計列底色rule- 列分隔線cellPadding- 儲存格內距continuationLabel- 群組跨頁時續接列的文字格式,{group}代入群組名稱cellBorders- 各儲存格四邊框線預設;null 不新增框線pageBottomRule- 每個含表身的實體頁片段末端線;null 繼承/預設不覆寫,零寬停用pageBottomRuleOnContinuationOnly- 頁底線只在表格內部換頁時覆寫;null 繼承,預設 false
public record TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders, LineStyle pageBottomRule, Boolean pageBottomRuleOnContinuationOnly)
extends Record
表格樣式覆寫值;每個欄位為
null 時繼承上一層- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionTableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel) 保留既有七參數建構器。TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders) 保留既有八參數建構器。TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders, LineStyle pageBottomRule) 保留 alpha.31 的九參數建構器;頁底線預設也作用於表格自然結束。TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders, LineStyle pageBottomRule, Boolean pageBottomRuleOnContinuationOnly) Creates an instance of aTableStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecellBordersrecord component.Returns the value of thecellPaddingrecord component.Returns the value of thecontinuationLabelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupFillrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theheaderFillrecord component.static TableStyleinherit()全部欄位繼承的空覆寫overlay(TableStyle override) 以override的非null欄位覆寫本樣式;文字樣式逐欄位合併Returns the value of thepageBottomRulerecord component.Returns the value of thepageBottomRuleOnContinuationOnlyrecord component.rule()Returns the value of therulerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalFillrecord component.withCellBorders(CellBorders borders) withCellPadding(Length cellPadding) withContinuationLabel(String continuationLabel) withGroupFill(ReportColor groupFill) withHeaderFill(ReportColor headerFill) withPageBottomRule(LineStyle line) 在每頁最後一個表身片段的底緣畫全寬線,包括最後頁、可拆列續頁及紀錄模式。 取代同一底緣的列線與儲存格水平邊,不增加高度或改變分頁;空表格只畫原表頭。 可透過withPageBottomRuleOnContinuationOnly(Boolean)限制為表格續頁切點。只在表格仍有後續內容而換頁時套用 pageBottomRule;自然結束保留原有列線與儲存格邊。 不影響分頁;不涵蓋表格結束後由其他區塊引發的換頁。空表格不新增底線。withTotalFill(ReportColor totalFill)
-
Constructor Details
-
TableStyle
public TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders, LineStyle pageBottomRule) 保留 alpha.31 的九參數建構器;頁底線預設也作用於表格自然結束。 -
TableStyle
public TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders) 保留既有八參數建構器。 -
TableStyle
public TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel) 保留既有七參數建構器。 -
TableStyle
public TableStyle(TextStyle text, ReportColor headerFill, ReportColor groupFill, ReportColor totalFill, LineStyle rule, Length cellPadding, String continuationLabel, CellBorders cellBorders, LineStyle pageBottomRule, Boolean pageBottomRuleOnContinuationOnly) Creates an instance of aTableStylerecord class.- Parameters:
text- the value for thetextrecord componentheaderFill- the value for theheaderFillrecord componentgroupFill- the value for thegroupFillrecord componenttotalFill- the value for thetotalFillrecord componentrule- the value for therulerecord componentcellPadding- the value for thecellPaddingrecord componentcontinuationLabel- the value for thecontinuationLabelrecord componentcellBorders- the value for thecellBordersrecord componentpageBottomRule- the value for thepageBottomRulerecord componentpageBottomRuleOnContinuationOnly- the value for thepageBottomRuleOnContinuationOnlyrecord component
-
-
Method Details
-
inherit
-
withText
-
withHeaderFill
-
withGroupFill
-
withTotalFill
-
withRule
-
withCellPadding
-
withContinuationLabel
-
withCellBorders
-
withPageBottomRule
在每頁最後一個表身片段的底緣畫全寬線,包括最後頁、可拆列續頁及紀錄模式。 取代同一底緣的列線與儲存格水平邊,不增加高度或改變分頁;空表格只畫原表頭。 可透過withPageBottomRuleOnContinuationOnly(Boolean)限制為表格續頁切點。- Parameters:
line- null 表示繼承;零寬停用覆寫,保留原底線- Returns:
- 新樣式
-
withPageBottomRuleOnContinuationOnly
只在表格仍有後續內容而換頁時套用 pageBottomRule;自然結束保留原有列線與儲存格邊。 不影響分頁;不涵蓋表格結束後由其他區塊引發的換頁。空表格不新增底線。- Parameters:
only- null 繼承;true 只作用於續頁切點,false(預設)作用於每個片段- Returns:
- 新樣式
-
overlay
以override的非null欄位覆寫本樣式;文字樣式逐欄位合併- Parameters:
override- 覆寫值;null視同空覆寫- Returns:
- 合併後的新樣式
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
text
-
headerFill
Returns the value of theheaderFillrecord component.- Returns:
- the value of the
headerFillrecord component
-
groupFill
-
totalFill
-
rule
-
cellPadding
Returns the value of thecellPaddingrecord component.- Returns:
- the value of the
cellPaddingrecord component
-
continuationLabel
Returns the value of thecontinuationLabelrecord component.- Returns:
- the value of the
continuationLabelrecord component
-
cellBorders
Returns the value of thecellBordersrecord component.- Returns:
- the value of the
cellBordersrecord component
-
pageBottomRule
Returns the value of thepageBottomRulerecord component.- Returns:
- the value of the
pageBottomRulerecord component
-
pageBottomRuleOnContinuationOnly
Returns the value of thepageBottomRuleOnContinuationOnlyrecord component.- Returns:
- the value of the
pageBottomRuleOnContinuationOnlyrecord component
-