Record Class Slicer
- Record Components:
name- internal slicer namecaption- header caption shown above the slicer bodycacheName- name of the backing slicer cachesourceField- the pivot field / table column the slicer filterstableSlicer-truewhen it filters an Excel Table (no pivot link)pivotTables- names of the pivot tables filtered (empty for a table slicer)columnCount- number of item columns in the slicer UIshowCaption- whether the caption header is shownstyle- slicer style name (may be empty)sheetIndex- 0-based index of the sheet the control displays on (-1 = unknown)row- anchor from-corner row (0-based)col- anchor from-corner column (0-based)endRow- anchor to-corner row (0-based)endCol- anchor to-corner column (0-based)
Workbook.slicers(); author it with
Workbook.addSlicer(name, source) or the anchored overload
Workbook.addSlicer(name, source, pivotTable, sheetIndex, row, col,
endRow, endCol).
The structural facts here โ name(), caption(), the
filtered sourceField(), the linked pivotTables(),
columnCount() and the on-sheet anchor (sheetIndex(),
row()/col() to endRow()/endCol()) โ
round-trip through the model, and the export path synthesizes the full
display apparatus (slicer part, cache part, workbook registration,
worksheet <x14:slicerList> extension and drawing frame) from them.
The item selection is read and changed with
Workbook.slicerSelection(java.lang.String) and
Workbook.setSlicerSelection(java.lang.String, java.lang.String...); a changed
selection refreshes the filtered pivot tables at once. The style is changed
with Workbook.setSlicerStyle(java.lang.String, java.lang.String). This record is
a snapshot and carries neither the selection nor the item list.
Reference: ECMA-376 Part 4 ยง18.10 (slicers); [MS-XLSX] slicerCacheDefinition.
-
Constructor Summary
ConstructorsConstructorDescriptionSlicer(String name, String caption, String cacheName, String sourceField, boolean tableSlicer, List<String> pivotTables, int columnCount, boolean showCaption, String style, int sheetIndex, int row, int col, int endRow, int endCol) Creates an instance of aSlicerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheNamerecord component.caption()Returns the value of thecaptionrecord component.intcol()Returns the value of thecolrecord component.intReturns the value of thecolumnCountrecord component.intendCol()Returns the value of theendColrecord component.intendRow()Returns the value of theendRowrecord component.final booleanIndicates whether some other object is "equal to" this one.static SlicerBuild aSlicerfrom one decoded FFI JSON object.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thepivotTablesrecord component.introw()Returns the value of therowrecord component.intReturns the value of thesheetIndexrecord component.booleanReturns the value of theshowCaptionrecord component.Returns the value of thesourceFieldrecord component.style()Returns the value of thestylerecord component.booleanReturns the value of thetableSlicerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Slicer
public Slicer(String name, String caption, String cacheName, String sourceField, boolean tableSlicer, List<String> pivotTables, int columnCount, boolean showCaption, String style, int sheetIndex, int row, int col, int endRow, int endCol) Creates an instance of aSlicerrecord class.- Parameters:
name- the value for thenamerecord componentcaption- the value for thecaptionrecord componentcacheName- the value for thecacheNamerecord componentsourceField- the value for thesourceFieldrecord componenttableSlicer- the value for thetableSlicerrecord componentpivotTables- the value for thepivotTablesrecord componentcolumnCount- the value for thecolumnCountrecord componentshowCaption- the value for theshowCaptionrecord componentstyle- the value for thestylerecord componentsheetIndex- the value for thesheetIndexrecord componentrow- the value for therowrecord componentcol- the value for thecolrecord componentendRow- the value for theendRowrecord componentendCol- the value for theendColrecord component
-
-
Method Details
-
fromMap
Build aSlicerfrom one decoded FFI JSON object. -
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. -
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. -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
caption
Returns the value of thecaptionrecord component.- Returns:
- the value of the
captionrecord component
-
cacheName
Returns the value of thecacheNamerecord component.- Returns:
- the value of the
cacheNamerecord component
-
sourceField
Returns the value of thesourceFieldrecord component.- Returns:
- the value of the
sourceFieldrecord component
-
tableSlicer
public boolean tableSlicer()Returns the value of thetableSlicerrecord component.- Returns:
- the value of the
tableSlicerrecord component
-
pivotTables
Returns the value of thepivotTablesrecord component.- Returns:
- the value of the
pivotTablesrecord component
-
columnCount
public int columnCount()Returns the value of thecolumnCountrecord component.- Returns:
- the value of the
columnCountrecord component
-
showCaption
public boolean showCaption()Returns the value of theshowCaptionrecord component.- Returns:
- the value of the
showCaptionrecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
sheetIndex
public int sheetIndex()Returns the value of thesheetIndexrecord component.- Returns:
- the value of the
sheetIndexrecord component
-
row
public int row()Returns the value of therowrecord component.- Returns:
- the value of the
rowrecord component
-
col
public int col()Returns the value of thecolrecord component.- Returns:
- the value of the
colrecord component
-
endRow
public int endRow()Returns the value of theendRowrecord component.- Returns:
- the value of the
endRowrecord component
-
endCol
public int endCol()Returns the value of theendColrecord component.- Returns:
- the value of the
endColrecord component
-