|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hslf.usermodel.RichTextRun
public class RichTextRun
Represents a run of text, all with the same style TODO: finish all the getters and setters to the font/character/paragraph properties (currently only has some of them)
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
int |
getBulletOffset()
Returns the bullet offset |
java.awt.Color |
getFontColor()
|
java.lang.String |
getFontName()
|
int |
getFontSize()
|
int |
getIndentLevel()
|
int |
getLength()
Get the length of the text |
java.lang.String |
getRawText()
Fetch the text, in raw storage form |
java.lang.String |
getText()
Fetch the text, in output suitable form |
int |
getTextOffset()
Returns the text offset |
boolean |
isBold()
|
boolean |
isBullet()
Returns whether this rich text run has bullets |
boolean |
isItalic()
|
boolean |
isUnderlined()
|
void |
setAlignment(int align)
Sets the type of horizontal alignment for the text. |
void |
setBold(boolean bold)
|
void |
setBullet(boolean flag)
Sets whether this rich text run has bullets |
void |
setBulletChar(char c)
Sets the bullet character |
void |
setBulletOffset(int offset)
Sets the bullet offset |
void |
setCharTextPropVal(java.lang.String propName,
int val)
Sets the value of the given Paragraph TextProp, add if required |
void |
setFlag(boolean isCharacter,
int index,
boolean value)
|
void |
setFontColor(java.awt.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 |
setFontName(java.lang.String fontName)
|
void |
setFontSize(int fontSize)
|
void |
setItalic(boolean italic)
|
void |
setParaTextPropVal(java.lang.String propName,
int val)
Sets the value of the given Character TextProp, add if required |
void |
setText(java.lang.String text)
Change the text |
void |
setTextOffset(int offset)
Sets the text offset |
void |
setUnderlined(boolean 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 runsMethod Detail |
---|
public void supplyTextProps(TextPropCollection pStyle, TextPropCollection cStyle, boolean pShared, boolean cShared)
public void supplySlideShow(SlideShow ss)
public int getLength()
public java.lang.String getText()
public java.lang.String getRawText()
public void setText(java.lang.String text)
public void updateStartPosition(int startAt)
startAt
- public void setFlag(boolean isCharacter, int index, boolean value)
public void setParaTextPropVal(java.lang.String propName, int val)
propName
- The name of the Character TextPropval
- The value to set for the TextProppublic void setCharTextPropVal(java.lang.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 int getFontSize()
public void setFontSize(int fontSize)
public void setFontName(java.lang.String fontName)
public java.lang.String getFontName()
public java.awt.Color getFontColor()
Color
public void setFontColor(int bgr)
Color
public void setFontColor(java.awt.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.
- Returns:
- the type of alignment
public int getIndentLevel()
public void setBullet(boolean flag)
public boolean isBullet()
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 TextPropCollection _getRawParagraphStyle()
public TextPropCollection _getRawCharacterStyle()
public boolean _isParagraphStyleShared()
public boolean _isCharacterStyleShared()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |