public final class TextRun
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 TextRulerAtom |
_ruler |
protected StyleTextPropAtom |
_styleAtom |
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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 |
buildRichTextRuns(java.util.LinkedList pStyles,
java.util.LinkedList cStyles,
java.lang.String runRawText) |
void |
changeTextInRichTextRun(RichTextRun run,
java.lang.String s)
Handles an update to the text stored in one of the Rich Text Runs
|
TextRulerAtom |
createTextRuler() |
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() |
StyleTextProp9Atom |
getStyleTextProp9Atom()
Numbered List info
|
StyleTextPropAtom |
getStyleTextPropAtom()
Characters covered
|
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 |
setStyleTextProp9Atom(StyleTextProp9Atom styleTextProp9Atom)
Numbered List info
|
void |
setText(java.lang.String s)
Changes the text.
|
void |
supplySlideShow(SlideShow ss)
Supply the SlideShow we belong to.
|
protected TextHeaderAtom _headerAtom
protected TextBytesAtom _byteAtom
protected TextCharsAtom _charAtom
protected StyleTextPropAtom _styleAtom
protected TextRulerAtom _ruler
protected boolean _isUnicode
protected RichTextRun[] _rtRuns
protected Record[] _records
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 stylingspublic void buildRichTextRuns(java.util.LinkedList pStyles, java.util.LinkedList cStyles, java.lang.String runRawText)
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 textpublic TextRulerAtom getTextRuler()
public TextRulerAtom createTextRuler()
public java.lang.String normalize(java.lang.String s)
public Record[] getRecords()
public void setStyleTextProp9Atom(StyleTextProp9Atom styleTextProp9Atom)
public StyleTextProp9Atom getStyleTextProp9Atom()
public StyleTextPropAtom getStyleTextPropAtom()
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.