Top Constructors Methods
org.apache.poi.sl.draw

public Class DrawTextShape

extends DrawSimpleShape
Class Inheritance
Known Direct Subclasses
org.apache.poi.sl.draw.DrawAutoShape
Imports
java.awt.Graphics2D, java.awt.geom.AffineTransform, .Rectangle2D, java.awt.image.BufferedImage, java.util.Iterator, org.apache.poi.sl.usermodel.Insets2D, .PlaceableShape, .ShapeContainer, .TextParagraph, .TextParagraph.BulletStyle, .TextRun, .TextShape, .TextShape.TextDirection

Constructor Summary

AccessConstructor and Description
public
DrawTextShape(TextShape<?, ?> shape)

Method Summary

Modifier and TypeMethod and Description
public void
drawContent(Graphics2D
the graphics to draw into
graphics
)

Overrides org.apache.poi.sl.draw.DrawShape.drawContent.

Implements org.apache.poi.sl.draw.Drawable.drawContent.

draw any content within this shape (image, text, etc.).

public double

Returns:

the vertical advance, i.e. the cumulative space occupied by the text
drawParagraphs
(Graphics2D graphics, double x, double y)

paint the paragraphs starting from top left (x,y)

protected TextShape<?, ? extends TextParagraph<?, ?, ? extends TextRun>>
public double

Returns:

the height in points
getTextHeight
()

Compute the cumulative height occupied by the text

public double

Returns:

the height in points
getTextHeight
(Graphics2D
the graphics context, which properties are to be copied, may be null
oldGraphics
)

Compute the cumulative height occupied by the text

Inherited from org.apache.poi.sl.draw.DrawSimpleShape:
computeOutlinesdrawdrawDecorationdrawShadowgetFillPaintgetHeadDecorationgetLinePaintgetStrokegetTailDecoration

Constructor Detail

DrawTextShapeback to summary
public DrawTextShape(TextShape<?, ?> shape)

Method Detail

drawContentback to summary
public void drawContent(Graphics2D graphics)

Overrides org.apache.poi.sl.draw.DrawShape.drawContent.

Implements org.apache.poi.sl.draw.Drawable.drawContent.

Doc from org.apache.poi.sl.draw.Drawable.drawContent.

draw any content within this shape (image, text, etc.).

Parameters
graphics:Graphics2D

the graphics to draw into

Annotations
@Override
drawParagraphsback to summary
public double drawParagraphs(Graphics2D graphics, double x, double y)

paint the paragraphs starting from top left (x,y)

Returns:double

the vertical advance, i.e. the cumulative space occupied by the text

getShapeback to summary
protected TextShape<?, ? extends TextParagraph<?, ?, ? extends TextRun>> getShape()

Overrides org.apache.poi.sl.draw.DrawSimpleShape.getShape.

Annotations
@Override
getTextHeightback to summary
public double getTextHeight()

Compute the cumulative height occupied by the text

Returns:double

the height in points

getTextHeightback to summary
public double getTextHeight(Graphics2D oldGraphics)

Compute the cumulative height occupied by the text

Parameters
oldGraphics:Graphics2D

the graphics context, which properties are to be copied, may be null

Returns:double

the height in points