org.apache.poi.hslf.model
Class AutoShape
java.lang.Object
org.apache.poi.hslf.model.Shape
org.apache.poi.hslf.model.SimpleShape
org.apache.poi.hslf.model.TextShape
org.apache.poi.hslf.model.AutoShape
- Direct Known Subclasses:
- Freeform, Polygon
public class AutoShape
- extends TextShape
Represents an AutoShape.
AutoShapes are drawing objects with a particular shape that may be customized through smart resizing and adjustments.
See ShapeTypes
- Author:
- Yegor Kozlov
Fields inherited from class org.apache.poi.hslf.model.TextShape |
_frc, _txtbox, _txtrun, AlignCenter, AlignJustify, AlignLeft, AlignRight, AnchorBottom, AnchorBottomBaseline, AnchorBottomCentered, AnchorBottomCenteredBaseline, AnchorMiddle, AnchorMiddleCentered, AnchorTop, AnchorTopBaseline, AnchorTopCentered, AnchorTopCenteredBaseline, WrapByPoints, WrapNone, WrapSquare, WrapThrough, WrapTopBottom |
Fields inherited from class org.apache.poi.hslf.model.Shape |
_escherContainer, _fill, _parent, _sheet, EMU_PER_CENTIMETER, EMU_PER_INCH, EMU_PER_POINT, logger, MASTER_DPI, PIXEL_DPI, POINT_DPI |
Methods inherited from class org.apache.poi.hslf.model.TextShape |
afterInsert, createTextRun, draw, getEscherTextboxWrapper, getHorizontalAlignment, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPlaceholderAtom, getText, getTextId, getTextRun, getVerticalAlignment, getWordWrap, initTextRun, resizeToFitText, setHorizontalAlignment, setHyperlink, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setSheet, setText, setTextId, setVerticalAlignment, setWordWrap |
Methods inherited from class org.apache.poi.hslf.model.SimpleShape |
createSpContainer, getClientDataRecord, getClientRecords, getFillColor, getFlipHorizontal, getFlipVertical, getLineColor, getLineDashing, getLineStyle, getLineWidth, getLogicalAnchor2D, getRotation, setFillColor, setHyperlink, setLineColor, setLineDashing, setLineStyle, setLineWidth, setRotation, updateClientData |
Methods inherited from class org.apache.poi.hslf.model.Shape |
getAnchor, getAnchor2D, getEscherChild, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getHyperlink, getParent, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setShapeId, setShapeType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoShape
protected AutoShape(EscherContainerRecord escherRecord,
Shape parent)
AutoShape
public AutoShape(int type,
Shape parent)
AutoShape
public AutoShape(int type)
createSpContainer
protected EscherContainerRecord createSpContainer(int shapeType,
boolean isChild)
setDefaultTextProperties
protected void setDefaultTextProperties(TextRun _txtrun)
- Description copied from class:
TextShape
- Set default properties for the TextRun.
Depending on the text and shape type the defaults are different:
TextBox: align=left, valign=top
AutoShape: align=center, valign=middle
- Overrides:
setDefaultTextProperties
in class TextShape
getAdjustmentValue
public int getAdjustmentValue(int idx)
- Gets adjust value which controls smart resizing of the auto-shape.
The adjustment values are given in shape coordinates:
the origin is at the top-left, positive-x is to the right, positive-y is down.
The region from (0,0) to (S,S) maps to the geometry box of the shape (S=21600 is a constant).
- Parameters:
idx
- the adjust index in the [0, 9] range
- Returns:
- the adjustment value
setAdjustmentValue
public void setAdjustmentValue(int idx,
int val)
- Sets adjust value which controls smart resizing of the auto-shape.
The adjustment values are given in shape coordinates:
the origin is at the top-left, positive-x is to the right, positive-y is down.
The region from (0,0) to (S,S) maps to the geometry box of the shape (S=21600 is a constant).
- Parameters:
idx
- the adjust index in the [0, 9] rangeval
- the adjustment value
getOutline
public java.awt.Shape getOutline()
- Description copied from class:
Shape
- Return shape outline as a java.awt.Shape object
- Overrides:
getOutline
in class Shape
- Returns:
- the shape outline
Copyright 2012 The Apache Software Foundation or
its licensors, as applicable.