com.powerml.structures.text
Class Text

java.lang.Object
  extended bycom.powerml.structures.text.Text
All Implemented Interfaces:
java.io.Serializable

public class Text
extends java.lang.Object
implements java.io.Serializable

This class is used to represent text, e.g. contained in a shape or a placeholder.

See Also:
Serialized Form

Field Summary
static byte TYPE_BODY
          Body text type
static byte TYPE_HALF_BODY
          Half body text type
static byte TYPE_HEADER
          Header text type
static byte TYPE_NOTES
          Notes text type
static byte TYPE_QUARTER_BODY
          Quarter body text type
static byte TYPE_SHAPE
          Shape text type
static byte TYPE_TITLE_BODY
          Body on title slide text type
static byte TYPE_TITLE_HEADER
          Header on title slide text type
static byte TYPE_UNKNOWN
          Unknown text type
 
Method Summary
 void addXml(org.dom4j.Element parent, boolean purgeStrings)
          Transforms current instance to XML and adds it to a parent element.
 java.util.ArrayList getHyperlinks()
          Returns a list of hyperlinks contained in the text.
 int getLength()
          Returns the length of the text in characters.
 java.util.ArrayList getParagraphs()
          Returns a list with all paragraphs contained in the text.
 Ruler getRuler()
          Returns the ruler assigned to the text.
 java.lang.String getString()
          Returns the text contained in the paragraph as a string obtained by concatenating the paragraphs of this text which are also obtained by concatenation.
 byte getType()
          Returns the text type (see TYPE_...
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_BODY

public static final byte TYPE_BODY
Body text type

See Also:
Constant Field Values

TYPE_HALF_BODY

public static final byte TYPE_HALF_BODY
Half body text type

See Also:
Constant Field Values

TYPE_HEADER

public static final byte TYPE_HEADER
Header text type

See Also:
Constant Field Values

TYPE_NOTES

public static final byte TYPE_NOTES
Notes text type

See Also:
Constant Field Values

TYPE_QUARTER_BODY

public static final byte TYPE_QUARTER_BODY
Quarter body text type

See Also:
Constant Field Values

TYPE_SHAPE

public static final byte TYPE_SHAPE
Shape text type

See Also:
Constant Field Values

TYPE_TITLE_BODY

public static final byte TYPE_TITLE_BODY
Body on title slide text type

See Also:
Constant Field Values

TYPE_TITLE_HEADER

public static final byte TYPE_TITLE_HEADER
Header on title slide text type

See Also:
Constant Field Values

TYPE_UNKNOWN

public static final byte TYPE_UNKNOWN
Unknown text type

See Also:
Constant Field Values
Method Detail

addXml

public void addXml(org.dom4j.Element parent,
                   boolean purgeStrings)
Transforms current instance to XML and adds it to a parent element.

Parameters:
parent - parent element
purgeStrings - clean strings of control characters

getHyperlinks

public java.util.ArrayList getHyperlinks()
Returns a list of hyperlinks contained in the text.

Returns:
list of Hyperlink instances

getLength

public int getLength()
Returns the length of the text in characters. Please note that contained metatokens (e.g. DateToken) have a length of 1 character.

Returns:
text length

getParagraphs

public java.util.ArrayList getParagraphs()
Returns a list with all paragraphs contained in the text.

Returns:
ArrayList containing Paragraph instances

getRuler

public Ruler getRuler()
Returns the ruler assigned to the text.

Returns:
assigned ruler

getString

public java.lang.String getString()
Returns the text contained in the paragraph as a string obtained by concatenating the paragraphs of this text which are also obtained by concatenation. Please note that the string representation of metatokens (e.g. DateToken) is "#".

Returns:
string representation

getType

public byte getType()
Returns the text type (see TYPE_....

Returns:
text type


© 2004-2005 Ralf Terdic. All rights reserved.
www.powerml.com