public final class HSLFTextParagraph extends Object implements TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>
TextParagraph.BulletStyle, TextParagraph.FontAlign, TextParagraph.TextAlign| Modifier and Type | Method and Description |
|---|---|
void |
addTabStops(double positionInPoints,
TabStop.TabStopType tabStopType)
Set the
TabStop collection |
void |
addTextRun(HSLFTextRun run) |
void |
clearTabStops()
Removes the tabstops of this paragraphs.
|
TextRulerAtom |
createTextRuler() |
static List<List<HSLFTextParagraph>> |
findTextParagraphs(PPDrawing ppdrawing,
HSLFSheet sheet)
For a given PPDrawing, grab all the TextRuns
|
AutoNumberingScheme |
getAutoNumberingScheme() |
Integer |
getAutoNumberingStartAt() |
Character |
getBulletChar()
Returns the bullet character
|
Color |
getBulletColor()
Returns the bullet color
|
String |
getBulletFont()
Returns the bullet font
|
Double |
getBulletSize()
Returns the bullet size, null if unset
|
TextParagraph.BulletStyle |
getBulletStyle() |
String |
getDefaultFontFamily() |
Double |
getDefaultFontSize() |
Double |
getDefaultTabSize() |
TextParagraph.FontAlign |
getFontAlign()
Returns the font alignment that is applied to the paragraph.
|
Double |
getIndent() |
int |
getIndentLevel() |
Double |
getLeftMargin() |
Double |
getLineSpacing()
Returns the vertical line spacing that is to be used within a paragraph.
|
TextPropCollection |
getParagraphStyle() |
HSLFTextShape |
getParentShape() |
static String |
getRawText(List<HSLFTextParagraph> paragraphs) |
Record[] |
getRecords()
Returns records that make up the list of text paragraphs
(there can be misc InteractiveInfo, TxInteractiveInfo and other records)
|
Double |
getRightMargin()
Specifies the right margin of the paragraph.
|
int |
getRunType()
Returns the type of the text, from the TextHeaderAtom.
|
HSLFSheet |
getSheet() |
Double |
getSpaceAfter()
The amount of vertical white space after the paragraph
This may be specified in two different ways, percentage spacing and font point spacing:
|
Double |
getSpaceBefore()
The amount of vertical white space before the paragraph
This may be specified in two different ways, percentage spacing and font point spacing:
|
StyleTextProp9Atom |
getStyleTextProp9Atom()
Numbered List info
|
List<? extends TabStop> |
getTabStops()
Get the
TabStops - the list can't be and it's entries shouldn't be modified. |
static String |
getText(List<HSLFTextParagraph> paragraphs) |
TextParagraph.TextAlign |
getTextAlign()
Returns the alignment that is applied to the paragraph.
|
EscherTextboxWrapper |
getTextboxWrapper() |
TextRulerAtom |
getTextRuler() |
List<HSLFTextRun> |
getTextRuns()
Fetch the text runs that are contained within this block of text
|
boolean |
isBullet()
Returns whether this rich text run has bullets
|
boolean |
isDirty() |
boolean |
isDrawingBased()
Is this Text Run one from a
PPDrawing, or is it
one from the SlideListWithText? |
boolean |
isHeaderOrFooter()
Convenience method to determine if this text paragraph is part of
the slide header or footer
|
Iterator<HSLFTextRun> |
iterator() |
void |
setBullet(boolean flag)
Sets whether this rich text run has bullets
|
void |
setBulletChar(Character c)
Sets the bullet character
|
void |
setBulletColor(Color color)
Sets the bullet color
|
void |
setBulletFont(String typeface)
Sets the bullet font
|
void |
setBulletSize(Double size)
Sets the bullet size
|
void |
setBulletStyle(Object... styles)
Sets the bullet styles.
|
void |
setDirty()
marks this paragraph dirty, so its records will be renewed on save
|
void |
setIndent(Double indent)
Specifies the indent size that will be applied to the first line of text in the paragraph.
|
void |
setIndentLevel(int level)
Specifies the particular level text properties that this paragraph will follow.
|
void |
setLeftMargin(Double leftMargin)
Specifies the left margin of the paragraph.
|
void |
setLineSpacing(Double lineSpacing)
This element specifies the vertical line spacing that is to be used within a paragraph.
|
void |
setParagraphStyle(TextPropCollection paragraphStyle) |
void |
setParagraphTextPropVal(String propName,
Integer val)
Sets the value of the given Paragraph TextProp, add if required
|
void |
setParentShape(HSLFTextShape parentShape) |
void |
setRightMargin(Double rightMargin) |
void |
setRunType(int runType) |
void |
setSpaceAfter(Double spaceAfter)
Set the amount of vertical white space that will be present after the paragraph.
|
void |
setSpaceBefore(Double spaceBefore)
Set the amount of vertical white space that will be present before the paragraph.
|
void |
setStyleTextProp9Atom(StyleTextProp9Atom styleTextProp9Atom)
Numbered List info
|
static HSLFTextRun |
setText(List<HSLFTextParagraph> paragraphs,
String text)
Sets (overwrites) the current text.
|
void |
setTextAlign(TextParagraph.TextAlign align)
Specifies the alignment that is to be applied to the paragraph.
|
static void |
supplySheet(List<HSLFTextParagraph> paragraphs,
HSLFSheet sheet)
Supply the Sheet we belong to, which might have an assigned SlideShow
Also passes it on to our child RichTextRuns
|
static String |
toExternalString(String rawText,
int runType)
Converts raw text from the text paragraphs to a formatted string,
i.e.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic void addTextRun(HSLFTextRun run)
public List<HSLFTextRun> getTextRuns()
TextParagraphgetTextRuns in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public TextPropCollection getParagraphStyle()
public void setParagraphStyle(TextPropCollection paragraphStyle)
public static void supplySheet(List<HSLFTextParagraph> paragraphs, HSLFSheet sheet)
public HSLFSheet getSheet()
public int getRunType()
TextHeaderAtompublic void setRunType(int runType)
public boolean isDrawingBased()
PPDrawing, or is it
one from the SlideListWithText?public TextRulerAtom getTextRuler()
public TextRulerAtom createTextRuler()
public Record[] getRecords()
public void setStyleTextProp9Atom(StyleTextProp9Atom styleTextProp9Atom)
public StyleTextProp9Atom getStyleTextProp9Atom()
public Iterator<HSLFTextRun> iterator()
iterator in interface Iterable<HSLFTextRun>public Double getLeftMargin()
getLeftMargin in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setLeftMargin(Double leftMargin)
TextParagraphsetLeftMargin in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>leftMargin - the left margin (in points) or null to unsetpublic Double getRightMargin()
TextParagraphgetRightMargin in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setRightMargin(Double rightMargin)
setRightMargin in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>rightMargin - the right margin (in points) of the paragraphpublic Double getIndent()
getIndent in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setIndent(Double indent)
TextParagraphsetIndent in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>indent - the indent (in points) applied to the first line of text in the paragraphpublic String getDefaultFontFamily()
getDefaultFontFamily in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public Double getDefaultFontSize()
getDefaultFontSize in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setTextAlign(TextParagraph.TextAlign align)
TextParagraphTextParagraph.TextAlign.setTextAlign in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>align - text alignpublic TextParagraph.TextAlign getTextAlign()
TextParagraphTextParagraph.TextAlign.LEFT then.getTextAlign in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public TextParagraph.FontAlign getFontAlign()
TextParagraphTextParagraph.FontAlign.AUTOgetFontAlign in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public AutoNumberingScheme getAutoNumberingScheme()
public Integer getAutoNumberingStartAt()
public TextParagraph.BulletStyle getBulletStyle()
getBulletStyle in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>null then no bullets are usedpublic void setBulletStyle(Object... styles)
TextParagraphsetBulletStyle in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public HSLFTextShape getParentShape()
getParentShape in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setParentShape(HSLFTextShape parentShape)
public int getIndentLevel()
getIndentLevel in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setIndentLevel(int level)
TextParagraphsetIndentLevel in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>level - the level (0 ... 4)public void setBullet(boolean flag)
public boolean isBullet()
public void setBulletChar(Character c)
public Character getBulletChar()
public void setBulletSize(Double size)
public Double getBulletSize()
public void setBulletColor(Color color)
public Color getBulletColor()
public void setBulletFont(String typeface)
public String getBulletFont()
public void setLineSpacing(Double lineSpacing)
TextParagraphIf linespacing >= 0, then linespacing is a percentage of normal line height If linespacing < 0, the absolute value of linespacing is the spacing in points
Examples:
// spacing will be 120% of the size of the largest text on each line
paragraph.setLineSpacing(120);
// spacing will be 200% of the size of the largest text on each line
paragraph.setLineSpacing(200);
// spacing will be 48 points
paragraph.setLineSpacing(-48.0);
setLineSpacing in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>lineSpacing - the vertical line spacingpublic Double getLineSpacing()
TextParagraphIf linespacing >= 0, then linespacing is a percentage of normal line height. If linespacing < 0, the absolute value of linespacing is the spacing in points
getLineSpacing in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setSpaceBefore(Double spaceBefore)
TextParagraphIf spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore < 0, the absolute value of linespacing is the spacing in points
Examples:
// The paragraph will be formatted to have a spacing before the paragraph text.
// The spacing will be 200% of the size of the largest text on each line
paragraph.setSpaceBefore(200);
// The spacing will be a size of 48 points
paragraph.setSpaceBefore(-48.0);
setSpaceBefore in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>spaceBefore - the vertical white space before the paragraph, null to unsetpublic Double getSpaceBefore()
TextParagraphIf spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore < 0, the absolute value in points
getSpaceBefore in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void setSpaceAfter(Double spaceAfter)
TextParagraphIf spaceAfter >= 0, then space is a percentage of normal line height. If spaceAfter < 0, the absolute value of linespacing is the spacing in points
Examples:
// The paragraph will be formatted to have a spacing after the paragraph text.
// The spacing will be 200% of the size of the largest text on each line
paragraph.setSpaceAfter(200);
// The spacing will be a size of 48 points
paragraph.setSpaceAfter(-48.0);
setSpaceAfter in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>spaceAfter - the vertical white space after the paragraph, null to unsetpublic Double getSpaceAfter()
TextParagraphIf spaceBefore >= 0, then space is a percentage of normal line height. If spaceBefore < 0, the absolute value of linespacing is the spacing in points
getSpaceAfter in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public Double getDefaultTabSize()
getDefaultTabSize in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public List<? extends TabStop> getTabStops()
TextParagraphTabStops - the list can't be and it's entries shouldn't be modified.
Opposed to other properties, this method is not cascading to the master sheet,
if the property is not defined on the normal slide level, i.e. the tabstops on
different levels aren't merged.getTabStops in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>null if no tabstops are definedpublic void addTabStops(double positionInPoints,
TabStop.TabStopType tabStopType)
TextParagraphTabStop collectionaddTabStops in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public void clearTabStops()
TextParagraphclearTabStops in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>public static HSLFTextRun setText(List<HSLFTextParagraph> paragraphs, String text)
text - the text string used by this object.public static String getText(List<HSLFTextParagraph> paragraphs)
public static String getRawText(List<HSLFTextParagraph> paragraphs)
public static String toExternalString(String rawText, int runType)
rawText - the raw textrunType - the run type of the shape, paragraph or headerAtom.
use -1 if unknownpublic static List<List<HSLFTextParagraph>> findTextParagraphs(PPDrawing ppdrawing, HSLFSheet sheet)
public EscherTextboxWrapper getTextboxWrapper()
public void setParagraphTextPropVal(String propName, Integer val)
propName - The name of the Paragraph TextPropval - The value to set for the TextProppublic void setDirty()
public boolean isDirty()
public boolean isHeaderOrFooter()
isHeaderOrFooter in interface TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun>RoundTripHFPlaceholder12Copyright © 2010 - 2020 Adobe. All Rights Reserved