org.apache.poi.hslf.model
Class TextRun

java.lang.Object
  extended byorg.apache.poi.hslf.model.TextRun

public class TextRun
extends java.lang.Object

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

Author:
Nick Burch

Constructor Summary
TextRun(TextHeaderAtom tha, TextBytesAtom tba)
          Constructs a Text Run from a Ascii text block
TextRun(TextHeaderAtom tha, TextCharsAtom tca)
          Constructs a Text Run from a Unicode text block
 
Method Summary
 java.lang.String getRawText()
          Returns the raw text content of the run.
 int getRunType()
          Returns the type of the text, from the TextHeaderAtom.
 java.lang.String getText()
          Returns the text content of the run, which has been made safe for printing and other use.
 void setRunType(int type)
          Changes the type of the text.
 void setText(java.lang.String s)
          Changes the text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextRun

public TextRun(TextHeaderAtom tha,
               TextCharsAtom tca)
Constructs a Text Run from a Unicode text block

Parameters:
tha - the TextHeaderAtom that defines what's what
tca - the TextCharsAtom containing the text

TextRun

public TextRun(TextHeaderAtom tha,
               TextBytesAtom tba)
Constructs a Text Run from a Ascii text block

Parameters:
tha - the TextHeaderAtom that defines what's what
tba - the TextBytesAtom containing the text
Method Detail

getText

public java.lang.String getText()
Returns the text content of the run, which has been made safe for printing and other use.


getRawText

public java.lang.String getRawText()
Returns the raw text content of the run. This hasn't had any changes applied to it, and so is probably unlikely to print out nicely.


setText

public void setText(java.lang.String s)
Changes the text. Chance are, this won't work just yet, because we also need to update some other bits of the powerpoint file to match the change in the Text Atom, especially byte offsets


getRunType

public int getRunType()
Returns the type of the text, from the TextHeaderAtom. Possible values can be seen from TextHeaderAtom

See Also:
TextHeaderAtom

setRunType

public void setRunType(int type)
Changes the type of the text. Values should be taken from TextHeaderAtom. No checking is done to ensure you set this to a valid value!

See Also:
TextHeaderAtom


Copyright 2005 The Apache Software Foundation or its licensors, as applicable.