Package org.apache.poi.sl.draw
Class DrawTextParagraph
java.lang.Object
org.apache.poi.sl.draw.DrawTextParagraph
- All Implemented Interfaces:
Drawable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.poi.sl.draw.Drawable
Drawable.DrawableHint
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected DrawTextFragment
static final org.apache.poi.sl.draw.DrawTextParagraph.XlinkAttribute
Keys for passing hyperlinks to the graphics contextstatic final org.apache.poi.sl.draw.DrawTextParagraph.XlinkAttribute
protected List
<DrawTextFragment> protected double
the highest line in this paragraph.protected TextParagraph
<?, ?, ?> protected String
Fields inherited from interface org.apache.poi.sl.draw.Drawable
CURRENT_SLIDE, DRAW_FACTORY, FONT_FALLBACK, FONT_HANDLER, FONT_MAP, GRADIENT_SHAPE, GRESTORE, GROUP_TRANSFORM, GSAVE, IMAGE_RENDERER, PRESET_GEOMETRY_CACHE, TEXT_AS_CHARACTERS, TEXT_AS_SHAPES, TEXT_RENDERING_MODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyTransform
(Graphics2D graphics) Apply 2-D transforms before drawing this shape.protected void
breakText
(Graphics2D graphics) break text into lines, each representing a line of text that fits in the wrapping widthvoid
draw
(Graphics2D graphics) Draw this shape into the supplied canvasvoid
drawContent
(Graphics2D graphics) draw any content within this shape (image, text, etc.).protected AttributedString
getAttributedString
(Graphics2D graphics, StringBuilder text) protected DrawTextFragment
getBullet
(Graphics2D graphics, AttributedCharacterIterator firstLineAttr) float
float
float
protected String
getRenderableText
(Graphics2D graphics, TextRun tr) protected double
getWrappingWidth
(boolean firstLine, Graphics2D graphics) Returns wrapping width to break lines in this paragraphdouble
getY()
boolean
protected boolean
isHSLF()
void
setAutoNumberingIdx
(int index) Sets the auto numbering index of the handled paragraphvoid
setPosition
(double x, double y)
-
Field Details
-
HYPERLINK_HREF
public static final org.apache.poi.sl.draw.DrawTextParagraph.XlinkAttribute HYPERLINK_HREFKeys for passing hyperlinks to the graphics context -
HYPERLINK_LABEL
public static final org.apache.poi.sl.draw.DrawTextParagraph.XlinkAttribute HYPERLINK_LABEL -
paragraph
-
lines
-
rawText
-
bullet
-
autoNbrIdx
protected int autoNbrIdx -
maxLineHeight
protected double maxLineHeightthe highest line in this paragraph. Used for line spacing.
-
-
Constructor Details
-
DrawTextParagraph
-
-
Method Details
-
setPosition
public void setPosition(double x, double y) -
getY
public double getY() -
setAutoNumberingIdx
public void setAutoNumberingIdx(int index) Sets the auto numbering index of the handled paragraph- Parameters:
index
- the auto numbering index
-
draw
Description copied from interface:Drawable
Draw this shape into the supplied canvas -
getFirstLineLeading
public float getFirstLineLeading() -
getFirstLineHeight
public float getFirstLineHeight() -
getLastLineHeight
public float getLastLineHeight() -
isEmptyParagraph
public boolean isEmptyParagraph() -
applyTransform
Description copied from interface:Drawable
Apply 2-D transforms before drawing this shape. This includes rotation and flipping.- Specified by:
applyTransform
in interfaceDrawable
- Parameters:
graphics
- the graphics whos transform matrix will be modified
-
drawContent
Description copied from interface:Drawable
draw any content within this shape (image, text, etc.).- Specified by:
drawContent
in interfaceDrawable
- Parameters:
graphics
- the graphics to draw into
-
breakText
break text into lines, each representing a line of text that fits in the wrapping width- Parameters:
graphics
- The drawing context for computing text-lengths.
-
getBullet
protected DrawTextFragment getBullet(Graphics2D graphics, AttributedCharacterIterator firstLineAttr) -
getRenderableText
-
getRenderableText
-
getWrappingWidth
Returns wrapping width to break lines in this paragraph- Parameters:
firstLine
- whether the first line is breaking- Returns:
- wrapping width in points
-
getAttributedString
-
isHSLF
protected boolean isHSLF()- Returns:
true
if the HSLF implementation is used
-