|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.xssf.streaming.SXSSFPicture
public final class SXSSFPicture
Streaming version of Picture. Most of the code is a copy of the non-streaming XSSFPicture code. This is necessary as a private method getRowHeightInPixels of that class needs to be changed, which is called by a method call chain nested several levels. The main change is to access the rows in the SXSSF sheet, not the always empty rows in the XSSF sheet when checking the row heights.
Method Summary | |
---|---|
XSSFAnchor |
getAnchor()
|
XSSFClientAnchor |
getClientAnchor()
|
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture |
getCTPicture()
Return the underlying CTPicture bean that holds all properties for this picture |
XSSFDrawing |
getDrawing()
|
java.awt.Dimension |
getImageDimension()
|
protected static java.awt.Dimension |
getImageDimension(PackagePart part,
int type)
Return the dimension of this image |
Shape |
getParent()
|
XSSFPictureData |
getPictureData()
Return picture data for this shape |
XSSFClientAnchor |
getPreferredSize()
Calculate the preferred size for this picture. |
XSSFClientAnchor |
getPreferredSize(double scale)
Calculate the preferred size for this picture. |
XSSFClientAnchor |
getPreferredSize(double scaleX,
double scaleY)
|
java.lang.String |
getShapeName()
|
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties |
getShapeProperties()
|
XSSFSheet |
getSheet()
|
boolean |
isNoFill()
|
void |
resize()
Reset the image to the original size. |
void |
resize(double scale)
Reset the image to the original size. |
void |
resize(double scaleX,
double scaleY)
|
void |
setFillColor(int red,
int green,
int blue)
|
void |
setLineStyleColor(int red,
int green,
int blue)
|
void |
setNoFill(boolean noFill)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@Internal public org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPicture getCTPicture()
public void resize()
Please note, that this method works correctly only for workbooks with the default font size (Calibri 11pt for .xlsx). If the default font is changed the resized image can be streched vertically or horizontally.
resize
in interface Picture
public void resize(double scale)
Please note, that this method works correctly only for workbooks with the default font size (Calibri 11pt for .xlsx). If the default font is changed the resized image can be streched vertically or horizontally.
resize
in interface Picture
scale
- the amount by which image dimensions are multiplied relative to the original size.
resize(1.0)
sets the original size, resize(0.5)
resize to 50% of the original,
resize(2.0)
resizes to 200% of the original.public XSSFClientAnchor getPreferredSize()
getPreferredSize
in interface Picture
public XSSFClientAnchor getPreferredSize(double scale)
scale
- the amount by which image dimensions are multiplied relative to the original size.
protected static java.awt.Dimension getImageDimension(PackagePart part, int type)
part
- the package part holding raw picture datatype
- type of the picture: Workbook.PICTURE_TYPE_JPEG
,
Workbook.PICTURE_TYPE_PNG
or Workbook.PICTURE_TYPE_DIB
public XSSFPictureData getPictureData()
getPictureData
in interface Picture
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties getShapeProperties()
public XSSFAnchor getAnchor()
getAnchor
in interface Shape
public void resize(double scaleX, double scaleY)
resize
in interface Picture
public XSSFClientAnchor getPreferredSize(double scaleX, double scaleY)
getPreferredSize
in interface Picture
public java.awt.Dimension getImageDimension()
getImageDimension
in interface Picture
public XSSFClientAnchor getClientAnchor()
getClientAnchor
in interface Picture
public XSSFDrawing getDrawing()
public XSSFSheet getSheet()
getSheet
in interface Picture
public java.lang.String getShapeName()
getShapeName
in interface Shape
public Shape getParent()
getParent
in interface Shape
public boolean isNoFill()
isNoFill
in interface Shape
public void setNoFill(boolean noFill)
setNoFill
in interface Shape
public void setFillColor(int red, int green, int blue)
setFillColor
in interface Shape
public void setLineStyleColor(int red, int green, int blue)
setLineStyleColor
in interface Shape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |