Package org.apache.poi.hssf.usermodel
Class HSSFSimpleShape
- java.lang.Object
-
- org.apache.poi.hssf.usermodel.HSSFShape
-
- org.apache.poi.hssf.usermodel.HSSFSimpleShape
-
- All Implemented Interfaces:
Shape,SimpleShape
- Direct Known Subclasses:
HSSFChartShape,HSSFCombobox,HSSFPicture,HSSFPolygon,HSSFTextbox
public class HSSFSimpleShape extends HSSFShape implements SimpleShape
Represents a simple shape such as a line, rectangle or oval.
-
-
Field Summary
Fields Modifier and Type Field Description static shortOBJECT_TYPE_ARCstatic shortOBJECT_TYPE_COMBO_BOXstatic shortOBJECT_TYPE_COMMENTstatic shortOBJECT_TYPE_LINEstatic shortOBJECT_TYPE_MICROSOFT_OFFICE_DRAWINGstatic shortOBJECT_TYPE_OVALstatic shortOBJECT_TYPE_PICTUREstatic shortOBJECT_TYPE_RECTANGLEstatic intWRAP_BY_POINTSstatic intWRAP_NONEstatic intWRAP_SQUARE-
Fields inherited from class org.apache.poi.hssf.usermodel.HSSFShape
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 Summary
Constructors Constructor Description HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord)HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord)HSSFSimpleShape(HSSFShape parent, HSSFAnchor anchor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterRemove(HSSFPatriarch patriarch)remove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapesprotected HSSFShapecloneShape()protected ObjRecordcreateObjRecord()protected EscherContainerRecordcreateSpContainer()protected TextObjectRecordcreateTextObjRecord()intgetShapeId()intgetShapeType()Gets the shape type.HSSFRichTextStringgetString()protected TextObjectRecordgetTextObjectRecord()intgetWrapText()voidsetShapeType(int value)voidsetString(RichTextString string)voidsetWrapText(int value)-
Methods inherited from class org.apache.poi.hssf.usermodel.HSSFShape
countOfAllChildren, getAnchor, getEscherContainer, getFillColor, getLineStyle, getLineStyleColor, getLineWidth, getObjRecord, getOptRecord, getParent, getPatriarch, getRotationDegree, getShapeName, isFlipHorizontal, isFlipVertical, isNoFill, setAnchor, setFillColor, setFillColor, setFlipHorizontal, setFlipVertical, setLineStyle, setLineStyleColor, setLineStyleColor, setLineWidth, setNoFill, setParent, setPatriarch, setPropertyValue, setRotationDegree
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.poi.ss.usermodel.Shape
getAnchor, getParent, getShapeName, isNoFill, setFillColor, setLineStyleColor, setNoFill
-
-
-
-
Field Detail
-
OBJECT_TYPE_LINE
public static final short OBJECT_TYPE_LINE
- See Also:
- Constant Field Values
-
OBJECT_TYPE_RECTANGLE
public static final short OBJECT_TYPE_RECTANGLE
- See Also:
- Constant Field Values
-
OBJECT_TYPE_OVAL
public static final short OBJECT_TYPE_OVAL
- See Also:
- Constant Field Values
-
OBJECT_TYPE_ARC
public static final short OBJECT_TYPE_ARC
- See Also:
- Constant Field Values
-
OBJECT_TYPE_PICTURE
public static final short OBJECT_TYPE_PICTURE
- See Also:
- Constant Field Values
-
OBJECT_TYPE_COMBO_BOX
public static final short OBJECT_TYPE_COMBO_BOX
- See Also:
- Constant Field Values
-
OBJECT_TYPE_COMMENT
public static final short OBJECT_TYPE_COMMENT
- See Also:
- Constant Field Values
-
OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING
public static final short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING
- See Also:
- Constant Field Values
-
WRAP_SQUARE
public static final int WRAP_SQUARE
- See Also:
- Constant Field Values
-
WRAP_BY_POINTS
public static final int WRAP_BY_POINTS
- See Also:
- Constant Field Values
-
WRAP_NONE
public static final int WRAP_NONE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HSSFSimpleShape
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord)
-
HSSFSimpleShape
public HSSFSimpleShape(EscherContainerRecord spContainer, ObjRecord objRecord)
-
HSSFSimpleShape
public HSSFSimpleShape(HSSFShape parent, HSSFAnchor anchor)
-
-
Method Detail
-
getTextObjectRecord
protected TextObjectRecord getTextObjectRecord()
-
createTextObjRecord
protected TextObjectRecord createTextObjRecord()
-
createSpContainer
protected EscherContainerRecord createSpContainer()
- Specified by:
createSpContainerin classHSSFShape
-
createObjRecord
protected ObjRecord createObjRecord()
- Specified by:
createObjRecordin classHSSFShape
-
afterRemove
protected void afterRemove(HSSFPatriarch patriarch)
Description copied from class:HSSFShaperemove escher container from the patriarch.escherAggregate remove obj, textObj and note records if it's necessary in case of ShapeGroup remove all contained shapes- Specified by:
afterRemovein classHSSFShape
-
getString
public HSSFRichTextString getString()
- Returns:
- the rich text string for this textbox.
-
setString
public void setString(RichTextString string)
- Parameters:
string- Sets the rich text string used by this object.
-
cloneShape
protected HSSFShape cloneShape()
- Specified by:
cloneShapein classHSSFShape
-
getShapeType
public int getShapeType()
Gets the shape type.- Returns:
- One of the OBJECT_TYPE_* constants.
- See Also:
OBJECT_TYPE_LINE,OBJECT_TYPE_OVAL,OBJECT_TYPE_RECTANGLE,OBJECT_TYPE_PICTURE,OBJECT_TYPE_COMMENT
-
getWrapText
public int getWrapText()
-
setWrapText
public void setWrapText(int value)
-
setShapeType
public void setShapeType(int value)
- Parameters:
value- - shapeType- See Also:
HSSFShapeTypes
-
getShapeId
public int getShapeId()
- Specified by:
getShapeIdin interfaceSimpleShape- Returns:
- the shape id, which is unique within the sheet
-
-