public final class RichTextRun extends Object
Constructor and Description |
---|
RichTextRun(TextRun parent,
int startAt,
int len)
Create a new wrapper around a (currently not)
rich text string
|
RichTextRun(TextRun parent,
int startAt,
int len,
TextPropCollection pStyle,
TextPropCollection cStyle,
boolean pShared,
boolean cShared)
Create a new wrapper around a rich text string
|
Modifier and Type | Method and Description |
---|---|
TextPropCollection |
_getRawCharacterStyle()
Internal Use Only - get the underlying character style collection.
|
TextPropCollection |
_getRawParagraphStyle()
Internal Use Only - get the underlying paragraph style collection.
|
boolean |
_isCharacterStyleShared()
Internal Use Only - are the Character styles shared?
|
boolean |
_isParagraphStyleShared()
Internal Use Only - are the Paragraph styles shared?
|
int |
getAlignment()
Returns the type of horizontal alignment for the text.
|
char |
getBulletChar()
Returns the bullet character
|
Color |
getBulletColor()
Returns the bullet color
|
int |
getBulletFont()
Returns the bullet font
|
int |
getBulletOffset()
Returns the bullet offset
|
int |
getBulletSize()
Returns the bullet size
|
int |
getEndIndex()
The ending index, exclusive.
|
Color |
getFontColor() |
int |
getFontIndex()
Gets the font index
|
String |
getFontName()
Gets the font name
|
int |
getFontSize()
Gets the font size
|
int |
getIndentLevel() |
int |
getLength()
Get the length of the text
|
int |
getLineSpacing()
Returns the line spacing
|
String |
getRawText()
Fetch the text, in raw storage form
|
int |
getSpaceAfter()
Returns spacing after a paragraph
|
int |
getSpaceBefore()
Returns spacing before a paragraph
|
int |
getStartIndex()
The beginning index, inclusive.
|
int |
getSuperscript()
Gets the subscript/superscript option
|
String |
getText()
Fetch the text, in output suitable form
|
int |
getTextOffset()
Returns the text offset
|
boolean |
isBold()
Is the text bold?
|
boolean |
isBullet()
Returns whether this rich text run has bullets
|
boolean |
isBulletHard()
Returns whether this rich text run has bullets
|
boolean |
isEmbossed()
Is this text embossed?
|
boolean |
isItalic()
Is the text italic?
|
boolean |
isShadowed()
Does the text have a shadow?
|
boolean |
isStrikethrough()
Gets the strikethrough flag
|
boolean |
isUnderlined()
Is the text underlined?
|
void |
setAlignment(int align)
Sets the type of horizontal alignment for the text.
|
void |
setBold(boolean bold)
Is the text bold?
|
void |
setBullet(boolean flag)
Sets whether this rich text run has bullets
|
void |
setBulletChar(char c)
Sets the bullet character
|
void |
setBulletColor(Color color)
Sets the bullet color
|
void |
setBulletFont(int idx)
Sets the bullet font
|
void |
setBulletOffset(int offset)
Sets the bullet offset
|
void |
setBulletSize(int size)
Sets the bullet size
|
void |
setCharTextPropVal(String propName,
int val)
Sets the value of the given Paragraph TextProp, add if required
|
void |
setEmbossed(boolean flag)
Is this text embossed?
|
void |
setFlag(boolean isCharacter,
int index,
boolean value) |
void |
setFontColor(Color color)
Sets color of the text, as a java.awt.Color
|
void |
setFontColor(int bgr)
Sets color of the text, as a int bgr.
|
void |
setFontIndex(int idx)
Sets the font index
|
void |
setFontName(String fontName)
Sets the font name to use
|
void |
setFontSize(int fontSize)
Sets the font size
|
void |
setIndentLevel(int level)
Sets indentation level
|
void |
setItalic(boolean italic)
Is the text italic?
|
void |
setLineSpacing(int val)
Sets the line spacing.
|
void |
setParaTextPropVal(String propName,
int val)
Sets the value of the given Character TextProp, add if required
|
void |
setRawText(String text)
Change the text
|
void |
setShadowed(boolean flag)
Does the text have a shadow?
|
void |
setSpaceAfter(int val)
Sets spacing after a paragraph.
|
void |
setSpaceBefore(int val)
Sets spacing before a paragraph.
|
void |
setStrikethrough(boolean flag)
Sets the strikethrough flag
|
void |
setSuperscript(int val)
Sets the subscript/superscript option
|
void |
setText(String text)
Change the text
|
void |
setTextOffset(int offset)
Sets the text offset
|
void |
setUnderlined(boolean underlined)
Is the text underlined?
|
void |
supplySlideShow(SlideShow ss)
Supply the SlideShow we belong to
|
void |
supplyTextProps(TextPropCollection pStyle,
TextPropCollection cStyle,
boolean pShared,
boolean cShared)
Supply (normally default) textprops, and if they're shared,
when a run gets them
|
void |
updateStartPosition(int startAt)
Tells the RichTextRun its new position in the parent TextRun
|
protected POILogger logger
public RichTextRun(TextRun parent, int startAt, int len)
parent
- startAt
- len
- public RichTextRun(TextRun parent, int startAt, int len, TextPropCollection pStyle, TextPropCollection cStyle, boolean pShared, boolean cShared)
parent
- The parent TextRunstartAt
- The start position of this runlen
- The length of this runpStyle
- The paragraph style property collectioncStyle
- The character style property collectionpShared
- The paragraph styles are shared with other runscShared
- The character styles are shared with other runspublic void supplyTextProps(TextPropCollection pStyle, TextPropCollection cStyle, boolean pShared, boolean cShared)
public void supplySlideShow(SlideShow ss)
public int getLength()
public int getStartIndex()
public int getEndIndex()
public String getText()
public String getRawText()
public void setText(String text)
public void setRawText(String text)
public void updateStartPosition(int startAt)
startAt
- public void setFlag(boolean isCharacter, int index, boolean value)
public void setParaTextPropVal(String propName, int val)
propName
- The name of the Character TextPropval
- The value to set for the TextProppublic void setCharTextPropVal(String propName, int val)
propName
- The name of the Paragraph TextPropval
- The value to set for the TextProppublic boolean isBold()
public void setBold(boolean bold)
public boolean isItalic()
public void setItalic(boolean italic)
public boolean isUnderlined()
public void setUnderlined(boolean underlined)
public boolean isShadowed()
public void setShadowed(boolean flag)
public boolean isEmbossed()
public void setEmbossed(boolean flag)
public boolean isStrikethrough()
public void setStrikethrough(boolean flag)
public int getSuperscript()
public void setSuperscript(int val)
val
- the percentage of the font size. If the value is positive, it is superscript, otherwise it is subscriptpublic int getFontSize()
public void setFontSize(int fontSize)
public int getFontIndex()
public void setFontIndex(int idx)
public void setFontName(String fontName)
public String getFontName()
public void setFontColor(int bgr)
Color
public void setFontColor(Color color)
public void setAlignment(int align)
Align*
constants defined in the TextBox
class.align
- - the type of alignmentpublic int getAlignment()
Align*
constants defined in the TextBox class.
public int getIndentLevel()
public void setIndentLevel(int level)
level
- indentation level. Must be in the range [0, 4]public void setBullet(boolean flag)
public boolean isBullet()
public boolean isBulletHard()
public void setBulletChar(char c)
public char getBulletChar()
public void setBulletOffset(int offset)
public int getBulletOffset()
public void setTextOffset(int offset)
public int getTextOffset()
public void setBulletSize(int size)
public int getBulletSize()
public void setBulletColor(Color color)
public Color getBulletColor()
public void setBulletFont(int idx)
public int getBulletFont()
public void setLineSpacing(int val)
If linespacing >= 0, then linespacing is a percentage of normal line height. If linespacing < 0, the absolute value of linespacing is the spacing in master coordinates.
public int getLineSpacing()
If linespacing >= 0, then linespacing is a percentage of normal line height. If linespacing < 0, the absolute value of linespacing is the spacing in master coordinates.
public void setSpaceBefore(int val)
If spacebefore >= 0, then spacebefore is a percentage of normal line height. If spacebefore < 0, the absolute value of spacebefore is the spacing in master coordinates.
public int getSpaceBefore()
If spacebefore >= 0, then spacebefore is a percentage of normal line height. If spacebefore < 0, the absolute value of spacebefore is the spacing in master coordinates.
public void setSpaceAfter(int val)
If spaceafter >= 0, then spaceafter is a percentage of normal line height. If spaceafter < 0, the absolute value of spaceafter is the spacing in master coordinates.
public int getSpaceAfter()
If spaceafter >= 0, then spaceafter is a percentage of normal line height. If spaceafter < 0, the absolute value of spaceafter is the spacing in master coordinates.
public TextPropCollection _getRawParagraphStyle()
public TextPropCollection _getRawCharacterStyle()
public boolean _isParagraphStyleShared()
public boolean _isCharacterStyleShared()
Copyright © 2020. All rights reserved.