public class HSSFPicture extends HSSFSimpleShape implements Picture
Modifier and Type | Field and Description |
---|---|
static int |
PICTURE_TYPE_DIB |
static int |
PICTURE_TYPE_EMF |
static int |
PICTURE_TYPE_JPEG |
static int |
PICTURE_TYPE_PICT |
static int |
PICTURE_TYPE_PNG |
static int |
PICTURE_TYPE_WMF |
OBJECT_TYPE_ARC, OBJECT_TYPE_COMBO_BOX, OBJECT_TYPE_COMMENT, OBJECT_TYPE_LINE, OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING, OBJECT_TYPE_OVAL, OBJECT_TYPE_PICTURE, OBJECT_TYPE_RECTANGLE, WRAP_BY_POINTS, WRAP_NONE, WRAP_SQUARE
FILL__FILLCOLOR_DEFAULT, LINESTYLE__COLOR_DEFAULT, LINESTYLE_DASHDOTDOTSYS, LINESTYLE_DASHDOTGEL, LINESTYLE_DASHDOTSYS, LINESTYLE_DASHGEL, LINESTYLE_DASHSYS, LINESTYLE_DEFAULT, LINESTYLE_DOTGEL, LINESTYLE_DOTSYS, LINESTYLE_LONGDASHDOTDOTGEL, LINESTYLE_LONGDASHDOTGEL, LINESTYLE_LONGDASHGEL, LINESTYLE_NONE, LINESTYLE_SOLID, LINEWIDTH_DEFAULT, LINEWIDTH_ONE_PT, NO_FILL_DEFAULT, NO_FILLHITTEST_FALSE, NO_FILLHITTEST_TRUE
Constructor and Description |
---|
HSSFPicture(EscherContainerRecord spContainer,
ObjRecord objRecord) |
HSSFPicture(HSSFShape parent,
HSSFAnchor anchor)
Constructs a picture object.
|
Modifier and Type | Method and Description |
---|---|
protected HSSFShape |
cloneShape() |
protected EscherContainerRecord |
createSpContainer() |
String |
getAlt() |
ClientAnchor |
getClientAnchor() |
String |
getFileName()
The color applied to the lines of this shape.
|
Dimension |
getImageDimension()
Return the dimension of this image
|
String |
getName() |
PictureData |
getPictureData()
Return picture data for this picture
|
String |
getPictureId() |
int |
getPictureIndex() |
HSSFClientAnchor |
getPreferredSize()
Calculate the preferred size for this picture.
|
HSSFClientAnchor |
getPreferredSize(double scale)
Calculate the preferred size for this picture.
|
void |
resize()
Reset the image to the original size.
|
void |
resize(double scale)
Resize the image
|
void |
setAlt(String alt) |
void |
setClientAnchor(ClientAnchor newanchor) |
void |
setFileName(String data) |
void |
setName(String name) |
void |
setPictureIndex(int pictureIndex) |
void |
setShapeType(int shapeType) |
afterRemove, createObjRecord, createTextObjRecord, getShapeType, getString, getTextObjectRecord, getWrapText, setString, setWrapText
countOfAllChildren, getAnchor, getEscherContainer, getFillColor, getLineStyle, getLineStyleColor, getLineWidth, getObjRecord, getOptRecord, getParent, getPatriarch, getRotationDegree, isFlipHorizontal, isFlipVertical, isNoFill, setAnchor, setFillColor, setFillColor, setFlipHorizontal, setFlipVertical, setLineStyle, setLineStyleColor, setLineStyleColor, setLineWidth, setNoFill, setParent, setPatriarch, setPropertyValue, setRotationDegree
public static final int PICTURE_TYPE_EMF
public static final int PICTURE_TYPE_WMF
public static final int PICTURE_TYPE_PICT
public static final int PICTURE_TYPE_JPEG
public static final int PICTURE_TYPE_PNG
public static final int PICTURE_TYPE_DIB
public HSSFPicture(EscherContainerRecord spContainer, ObjRecord objRecord)
public HSSFPicture(HSSFShape parent, HSSFAnchor anchor)
public int getPictureIndex()
public void setPictureIndex(int pictureIndex)
protected EscherContainerRecord createSpContainer()
createSpContainer
in class HSSFSimpleShape
public void resize(double scale)
Please note, that this method works correctly only for workbooks with default font size (Arial 10pt for .xls). If the default font is changed the resized image can be streched vertically or horizontally.
public void resize()
Please note, that this method works correctly only for workbooks with default font size (Arial 10pt for .xls). If the default font is changed the resized image can be streched vertically or horizontally.
public HSSFClientAnchor getPreferredSize()
getPreferredSize
in interface Picture
public HSSFClientAnchor getPreferredSize(double scale)
scale
- the amount by which image dimensions are multiplied relative to the original size.public Dimension getImageDimension()
public String getFileName()
public void setFileName(String data)
public void setShapeType(int shapeType)
setShapeType
in class HSSFSimpleShape
shapeType
- - shapeTypeHSSFShapeTypes
protected HSSFShape cloneShape()
cloneShape
in class HSSFSimpleShape
public PictureData getPictureData()
Picture
getPictureData
in interface Picture
public void setName(String name)
public void setAlt(String alt)
public ClientAnchor getClientAnchor()
getClientAnchor
in interface Picture
public String getPictureId()
getPictureId
in interface Picture
public void setClientAnchor(ClientAnchor newanchor)
setClientAnchor
in interface Picture
Copyright © 2020. All rights reserved.