Record Class PivotStyle

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.PivotStyle
Record Components:
name - the style name
showRowHeaders - style the row-header column
showColHeaders - style the column-header row
showRowStripes - banded rows
showColStripes - banded columns
showLastColumn - style the last (grand total) column

public record PivotStyle(String name, boolean showRowHeaders, boolean showColHeaders, boolean showRowStripes, boolean showColStripes, boolean showLastColumn) extends Record
A named pivot-table style plus banding flags ( <pivotTableStyleInfo> — ECMA-376 Part 1 §18.10.1.88), read back via PivotTableView.style(). Built-in names run PivotStyleLight1..28, PivotStyleMedium1.. 28, PivotStyleDark1..28. The engine does not check the name against this list. Apply it with PivotTableView.setStyle(PivotStyle).
  • Constructor Details

    • PivotStyle

      public PivotStyle(String name, boolean showRowHeaders, boolean showColHeaders, boolean showRowStripes, boolean showColStripes, boolean showLastColumn)
      Creates an instance of a PivotStyle record class.
      Parameters:
      name - the value for the name record component
      showRowHeaders - the value for the showRowHeaders record component
      showColHeaders - the value for the showColHeaders record component
      showRowStripes - the value for the showRowStripes record component
      showColStripes - the value for the showColStripes record component
      showLastColumn - the value for the showLastColumn record component
  • Method Details

    • of

      public static PivotStyle of(String name)
      The style name with Excel's Design-tab default flags: row and column headers on, banded rows and columns off, last column on.
    • withRowStripes

      public PivotStyle withRowStripes()
      A copy with banded rows on.
    • withColStripes

      public PivotStyle withColStripes()
      A copy with banded columns on.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • showRowHeaders

      public boolean showRowHeaders()
      Returns the value of the showRowHeaders record component.
      Returns:
      the value of the showRowHeaders record component
    • showColHeaders

      public boolean showColHeaders()
      Returns the value of the showColHeaders record component.
      Returns:
      the value of the showColHeaders record component
    • showRowStripes

      public boolean showRowStripes()
      Returns the value of the showRowStripes record component.
      Returns:
      the value of the showRowStripes record component
    • showColStripes

      public boolean showColStripes()
      Returns the value of the showColStripes record component.
      Returns:
      the value of the showColStripes record component
    • showLastColumn

      public boolean showLastColumn()
      Returns the value of the showLastColumn record component.
      Returns:
      the value of the showLastColumn record component