Record Class BoxStyle

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.BoxStyle
Record Components:
border - 框線
fill - 底色
padding - 內距

public record BoxStyle(LineStyle border, ReportColor fill, Length padding) extends Record
區塊框樣式覆寫值;每個欄位為 null 時繼承 DocumentStyles.box()
Since:
4.0.0
  • Constructor Details

    • BoxStyle

      public BoxStyle(LineStyle border, ReportColor fill, Length padding)
      Creates an instance of a BoxStyle record class.
      Parameters:
      border - the value for the border record component
      fill - the value for the fill record component
      padding - the value for the padding record component
  • Method Details

    • inherit

      public static BoxStyle inherit()
      全部欄位繼承的空覆寫
      Returns:
      空覆寫
    • withBorder

      public BoxStyle withBorder(LineStyle border)
    • withFill

      public BoxStyle withFill(ReportColor fill)
    • withPadding

      public BoxStyle withPadding(Length padding)
    • overlay

      public BoxStyle overlay(BoxStyle override)
      以 override 的非 null 欄位覆寫本樣式
      Parameters:
      override - 覆寫值;null 視同空覆寫
      Returns:
      合併後的新樣式
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • border

      public LineStyle border()
      Returns the value of the border record component.
      Returns:
      the value of the border record component
    • fill

      public ReportColor fill()
      Returns the value of the fill record component.
      Returns:
      the value of the fill record component
    • padding

      public Length padding()
      Returns the value of the padding record component.
      Returns:
      the value of the padding record component