Class SheetImpl

java.lang.Object
io.keikai.api.model.impl.SheetImpl
All Implemented Interfaces:
Sheet, Serializable

public class SheetImpl extends Object implements Sheet, Serializable
Since:
3.0.0
Author:
dennis
See Also:
  • Constructor Details

  • Method Details

    • getNative

      public SSheet getNative()
    • getInternalSheet

      public SSheet getInternalSheet()
      Description copied from interface: Sheet
      get the internal model object to do advanced operation
      Note : operate on internal object will not automatically update Spreadsheet
      Specified by:
      getInternalSheet in interface Sheet
      Returns:
    • getRef

      public ModelRef<SSheet> getRef()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getBook

      public Book getBook()
      Specified by:
      getBook in interface Sheet
    • isProtected

      public boolean isProtected()
      Specified by:
      isProtected in interface Sheet
    • isAutoFilterEnabled

      public boolean isAutoFilterEnabled()
      Specified by:
      isAutoFilterEnabled in interface Sheet
    • isDisplayGridlines

      public boolean isDisplayGridlines()
      Specified by:
      isDisplayGridlines in interface Sheet
    • getSheetName

      public String getSheetName()
      Specified by:
      getSheetName in interface Sheet
    • isRowHidden

      public boolean isRowHidden(int row)
      Specified by:
      isRowHidden in interface Sheet
    • isColumnHidden

      public boolean isColumnHidden(int column)
      Specified by:
      isColumnHidden in interface Sheet
    • getCharts

      public List<Chart> getCharts()
      Specified by:
      getCharts in interface Sheet
    • getPictures

      public List<Picture> getPictures()
      Specified by:
      getPictures in interface Sheet
    • getRowFreeze

      public int getRowFreeze()
      Description copied from interface: Sheet
      Get number of row freeze of this sheet, 0 means no row freeze
      Specified by:
      getRowFreeze in interface Sheet
      Returns:
    • getColumnFreeze

      public int getColumnFreeze()
      Description copied from interface: Sheet
      Get number of column freeze of this sheet, 0 means no column freeze
      Specified by:
      getColumnFreeze in interface Sheet
      Returns:
    • isPrintGridlines

      public boolean isPrintGridlines()
      Specified by:
      isPrintGridlines in interface Sheet
    • getRowHeight

      public int getRowHeight(int row)
      Description copied from interface: Sheet
      get row height in pixel
      Specified by:
      getRowHeight in interface Sheet
      Returns:
      row height in pixel
    • getColumnWidth

      public int getColumnWidth(int column)
      Description copied from interface: Sheet
      get column width in pixel
      Specified by:
      getColumnWidth in interface Sheet
      Returns:
      column width in pixel
    • toViewAnchor

      public static ViewAnchor toViewAnchor(SSheet sheet, SheetAnchor anchor)
      Utility method, internal use only
    • toSheetAnchor

      public static SheetAnchor toSheetAnchor(SSheet sheet, ViewAnchor anchor)
      Utility method, internal use only
    • getFirstRow

      public int getFirstRow()
      Description copied from interface: Sheet
      get the first row which contains data of this sheet
      Specified by:
      getFirstRow in interface Sheet
      Returns:
    • getLastRow

      public int getLastRow()
      Description copied from interface: Sheet
      get the last row which contains data of this sheet
      Specified by:
      getLastRow in interface Sheet
      Returns:
    • getFirstColumn

      public int getFirstColumn(int row)
      Description copied from interface: Sheet
      Get the first column of row which contains data
      Specified by:
      getFirstColumn in interface Sheet
      Returns:
      -1 if not such column or no no such row
    • getLastColumn

      public int getLastColumn(int row)
      Description copied from interface: Sheet
      Get the last column of row which contains data
      Specified by:
      getLastColumn in interface Sheet
      Returns:
      -1 if not such column or no no such row
    • isHidden

      public boolean isHidden()
      Description copied from interface: Sheet
      Returns whether this sheet is hidden.
      Specified by:
      isHidden in interface Sheet
    • isVeryHidden

      public boolean isVeryHidden()
      Description copied from interface: Sheet
      Returns whether this sheet is very hidden.
      Specified by:
      isVeryHidden in interface Sheet
    • isSummaryBelow

      public boolean isSummaryBelow()
      Description copied from interface: Sheet
      Returns whether to display summary below or above for rows.
      Specified by:
      isSummaryBelow in interface Sheet
      Returns:
      true to display summary below, unless display summary above.
    • isSummaryRight

      public boolean isSummaryRight()
      Description copied from interface: Sheet
      Returns whether to display summary right or left for columns.
      Specified by:
      isSummaryRight in interface Sheet
      Returns:
      true to display summary right, unless display summary left.
    • addCellRegionValueChangeListener

      public void addCellRegionValueChangeListener(CellRegion cellRegion, SerializableConsumer<CellRegion> listener)
      Description copied from interface: Sheet
      Adds the listener when specific cell region value change.
      Specified by:
      addCellRegionValueChangeListener in interface Sheet
    • removeCellRegionValueChangeListener

      public boolean removeCellRegionValueChangeListener(CellRegion cellRegion)
      Description copied from interface: Sheet
      Remove all cell region value change listeners of specific cell region.
      Specified by:
      removeCellRegionValueChangeListener in interface Sheet
      Returns:
      whether the listeners are removed successfully.
    • removeCellRegionValueChangeListener

      public boolean removeCellRegionValueChangeListener(SerializableConsumer<CellRegion> listener)
      Description copied from interface: Sheet
      Remove the cell region value change listener.
      Specified by:
      removeCellRegionValueChangeListener in interface Sheet
      Returns:
      whether the listener is removed successfully.
    • addChart

      public Chart addChart(String name, SChart.ChartType type, ViewAnchor anchor)
      Description copied from interface: Sheet
      Add a chart with name, type and anchor
      Specified by:
      addChart in interface Sheet
      Returns:
      the created chart
    • getChartByName

      public Chart getChartByName(String name)
      Description copied from interface: Sheet
      Returns the first chart with specific name
      Specified by:
      getChartByName in interface Sheet
      Returns:
      the chart with specific name
    • getChartsByName

      public List<Chart> getChartsByName(String name)
      Description copied from interface: Sheet
      Returns the charts with specific name
      Specified by:
      getChartsByName in interface Sheet
      Returns:
      the charts with specific name