Class SheetChartWrapper
java.lang.Object
com.vaadin.flow.component.spreadsheet.SheetOverlayWrapper
com.vaadin.flow.component.spreadsheet.SheetChartWrapper
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.spreadsheet.SheetOverlayWrapper
SheetOverlayWrapper.OverlayChangeListener -
Constructor Summary
ConstructorsConstructorDescriptionSheetChartWrapper(org.apache.poi.xssf.usermodel.XSSFChart chartXml, Spreadsheet spreadsheet) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentgetComponent(boolean init) Returns the component contained in this wrapper if there is one.floatgetHeight(org.apache.poi.ss.usermodel.Sheet sheet, float[] rowH) Calculates the height of the image.getId()Returns a unique ID of this overlay, used also as a resource key for images.getType()floatgetWidth(org.apache.poi.ss.usermodel.Sheet sheet, int[] colW, int defaultColumnWidthPX) Calculates the width of the image.static voidsetChartCreator(ChartCreator newChartCreator) voidIf this overlay's state can be dynamically changed (like minimizing), this method can inform the spreadsheet.Methods inherited from class com.vaadin.flow.component.spreadsheet.SheetOverlayWrapper
equals, getAnchor, getResourceHandler, hashCode, isVisible, isVisible, setVisible, toString
-
Constructor Details
-
SheetChartWrapper
-
-
Method Details
-
setOverlayChangeListener
Description copied from class:SheetOverlayWrapperIf this overlay's state can be dynamically changed (like minimizing), this method can inform the spreadsheet.- Overrides:
setOverlayChangeListenerin classSheetOverlayWrapper
-
setChartCreator
-
getId
Description copied from class:SheetOverlayWrapperReturns a unique ID of this overlay, used also as a resource key for images.- Overrides:
getIdin classSheetOverlayWrapper
-
getComponent
public com.vaadin.flow.component.Component getComponent(boolean init) Description copied from class:SheetOverlayWrapperReturns the component contained in this wrapper if there is one.- Overrides:
getComponentin classSheetOverlayWrapper- Parameters:
init- false if you don't want to initialize the component, calling with true after the first time has no effect.
-
getType
- Specified by:
getTypein classSheetOverlayWrapper
-
getHeight
public float getHeight(org.apache.poi.ss.usermodel.Sheet sheet, float[] rowH) Description copied from class:SheetOverlayWrapperCalculates 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:
getHeightin classSheetOverlayWrapper- Parameters:
sheet- The sheet this image belongs torowH- 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:SheetOverlayWrapperCalculates 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:
getWidthin classSheetOverlayWrapper- Parameters:
sheet- The sheet this image belongs tocolW- Array of column widths in pixelsdefaultColumnWidthPX- Default column width in pixels- Returns:
- Width of the image in pixels, or -1 if image file width should be used
-