You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.spreadsheet.

Class SheetChartWrapper

  • All Implemented Interfaces:

    Serializable

    public class SheetChartWrapper
    extends SheetOverlayWrapper
    implements Serializable

    SheetChartWrapper is an utility class of the Spreadsheet component. In addition to the chart resource, this wrapper contains the chart's visibility state, position and size.

    Author:

    Vaadin Ltd.

    See Also:

    Serialized Form

    • Constructor Detail

      • SheetChartWrapper

        public SheetChartWrapper​(org.apache.poi.xssf.usermodel.XSSFChart chartXml,
                                 Spreadsheet spreadsheet)
    • Method Detail

      • setChartCreator

        public static void setChartCreator​(ChartCreator newChartCreator)
      • getComponent

        public Component getComponent​(boolean init)

        Description copied from class: SheetOverlayWrapper

        Returns the component contained in this wrapper if there is one.

        Overrides:

        getComponent in class SheetOverlayWrapper

        Parameters:

        init - false if you don't want to initialize the component, calling with true after the first time has no effect.

      • getHeight

        public float getHeight​(org.apache.poi.ss.usermodel.Sheet sheet,
                               float[] rowH)

        Description copied from class: SheetOverlayWrapper

        Calculates the height of the image. Might not be 100% correct because of bugs in POI (returns inconsistent values for Dx and Dy).

        If the image doesn't have a specified height and should be sized to image file size, -1 is returned.

        Overrides:

        getHeight in class SheetOverlayWrapper

        Parameters:

        sheet - The sheet this image belongs to

        rowH - Array of row heights in points

        Returns:

        Image height in points, or -1 if image file height should be used.

      • getWidth

        public float getWidth​(org.apache.poi.ss.usermodel.Sheet sheet,
                              int[] colW,
                              int defaultColumnWidthPX)

        Description copied from class: SheetOverlayWrapper

        Calculates the width of the image. Might not be 100% correct because of bugs in POI (returns inconsistent values for Dx and Dy).

        If the image doesn't have a specified width and should be sized to image file size, -1 is returned.

        Overrides:

        getWidth in class SheetOverlayWrapper

        Parameters:

        sheet - The sheet this image belongs to

        colW - Array of column widths in pixels

        defaultColumnWidthPX - Default column width in pixels

        Returns:

        Width of the image in pixels, or -1 if image file width should be used