Record Class Figure

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.node.Figure
Record Components:
id - 選填識別
content - 圖形內容
width - 寬度
height - 高度
altText - 替代文字(必填)
caption - 圖說(必填,須含非空白文字)
All Implemented Interfaces:
Block

public record Figure(String id, FigureContent content, Length width, Length height, String altText, List<Inline> caption) extends Record implements Block

有界的局部座標圖形,例如統計圖表

圖內文字不保證可被抽取或讀取,因此替代文字與含實際文字的圖說都必填。 移頁後仍放不下時,renderer 等比縮小圖形並回報 WARNING;連圖說都放不下時回報 ERROR。

Since:
4.0.0
  • Constructor Details

    • Figure

      public Figure(String id, FigureContent content, Length width, Length height, String altText, List<Inline> caption)
      Creates an instance of a Figure record class.
      Parameters:
      id - the value for the id record component
      content - the value for the content record component
      width - the value for the width record component
      height - the value for the height record component
      altText - the value for the altText record component
      caption - the value for the caption record component
  • Method Details

    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • content

      public FigureContent content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • width

      public Length width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public Length height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • altText

      public String altText()
      Returns the value of the altText record component.
      Returns:
      the value of the altText record component
    • caption

      public List<Inline> caption()
      Returns the value of the caption record component.
      Returns:
      the value of the caption record component