|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hslf.model.TextRun
public class TextRun
This class represents a run of text in a powerpoint document. That run could be text on a sheet, or text in a note. It is only a very basic class for now
Field Summary | |
---|---|
protected TextBytesAtom |
_byteAtom
|
protected TextCharsAtom |
_charAtom
|
protected TextHeaderAtom |
_headerAtom
|
protected boolean |
_isUnicode
|
protected Record[] |
_records
all text run records that follow TextHeaderAtom. |
protected RichTextRun[] |
_rtRuns
|
protected StyleTextPropAtom |
_styleAtom
|
Constructor Summary | |
---|---|
TextRun(TextHeaderAtom tha,
TextBytesAtom tba,
StyleTextPropAtom sta)
Constructs a Text Run from a Ascii text block |
|
TextRun(TextHeaderAtom tha,
TextCharsAtom tca,
StyleTextPropAtom sta)
Constructs a Text Run from a Unicode text block |
Method Summary | |
---|---|
RichTextRun |
appendText(java.lang.String s)
Adds the supplied text onto the end of the TextRun, creating a new RichTextRun (returned) for it to sit in. |
void |
changeTextInRichTextRun(RichTextRun run,
java.lang.String s)
Handles an update to the text stored in one of the Rich Text Runs |
void |
ensureStyleAtomPresent()
Ensure a StyleTextPropAtom is present for this run, by adding if required. |
Hyperlink[] |
getHyperlinks()
Returns the array of all hyperlinks in this text run |
protected int |
getIndex()
|
java.lang.String |
getRawText()
Returns the raw text content of the run. |
Record[] |
getRecords()
Returns records that make up this text run |
RichTextRun |
getRichTextRunAt(int pos)
Fetch RichTextRun at a given position |
RichTextRun[] |
getRichTextRuns()
Fetch the rich text runs (runs of text with the same styling) that are contained within this block of text |
int |
getRunType()
Returns the type of the text, from the TextHeaderAtom. |
protected int |
getShapeId()
|
Sheet |
getSheet()
|
java.lang.String |
getText()
Returns the text content of the run, which has been made safe for printing and other use. |
TextRulerAtom |
getTextRuler()
|
java.lang.String |
normalize(java.lang.String s)
Returns a new string with line breaks converted into internal ppt representation |
protected void |
setIndex(int id)
|
void |
setRawText(java.lang.String s)
Changes the text, and sets it all to have the same styling as the the first character has. |
void |
setRunType(int type)
Changes the type of the text. |
protected void |
setShapeId(int id)
|
void |
setSheet(Sheet sheet)
|
void |
setText(java.lang.String s)
Changes the text. |
void |
supplySlideShow(SlideShow ss)
Supply the SlideShow we belong to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TextHeaderAtom _headerAtom
protected TextBytesAtom _byteAtom
protected TextCharsAtom _charAtom
protected StyleTextPropAtom _styleAtom
protected boolean _isUnicode
protected RichTextRun[] _rtRuns
protected Record[] _records
Constructor Detail |
---|
public TextRun(TextHeaderAtom tha, TextCharsAtom tca, StyleTextPropAtom sta)
tha
- the TextHeaderAtom that defines what's whattca
- the TextCharsAtom containing the textsta
- the StyleTextPropAtom which defines the character stylingspublic TextRun(TextHeaderAtom tha, TextBytesAtom tba, StyleTextPropAtom sta)
tha
- the TextHeaderAtom that defines what's whattba
- the TextBytesAtom containing the textsta
- the StyleTextPropAtom which defines the character stylingsMethod Detail |
---|
public RichTextRun appendText(java.lang.String s)
public void changeTextInRichTextRun(RichTextRun run, java.lang.String s)
run
- s
- public void setRawText(java.lang.String s)
public void setText(java.lang.String s)
public void ensureStyleAtomPresent()
public java.lang.String getText()
public java.lang.String getRawText()
public RichTextRun[] getRichTextRuns()
public int getRunType()
TextHeaderAtom
public void setRunType(int type)
TextHeaderAtom
public void supplySlideShow(SlideShow ss)
public void setSheet(Sheet sheet)
public Sheet getSheet()
protected int getShapeId()
protected void setShapeId(int id)
id
- Shape IDprotected int getIndex()
protected void setIndex(int id)
id
- 0-based index of the text run in the SLWT containerpublic Hyperlink[] getHyperlinks()
null
if not found.public RichTextRun getRichTextRunAt(int pos)
pos
- 0-based index in the text
public TextRulerAtom getTextRuler()
public java.lang.String normalize(java.lang.String s)
public Record[] getRecords()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |