| Modifier and Type | Field and Description |
|---|---|
static int |
STYLE_BOLD
Bold style.
|
static int |
STYLE_ITALIC
Italic style.
|
static int |
STYLE_NORMAL
Normal style.
|
static int |
STYLE_UNDERLINED
Underlined style.
|
static int |
SUBSCRIPT
Subscript style.
|
static int |
SUPERSCRIPT
Superscript style.
|
| Constructor and Description |
|---|
TextNode()
Constructs empty node.
|
TextNode(String text)
Constructs new text node.
|
TextNode(String text,
int style)
Constructs new text node.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFont()
Provides font.
|
String |
getText()
Provides unformatted text content.
|
int |
getType()
Provides Node's type.
|
boolean |
hasEqualStyles(TextNode node)
Tests styles of two text nodes for equality.
|
boolean |
isBold() |
boolean |
isItalic() |
boolean |
isSubscript() |
boolean |
isSuperscript() |
boolean |
isUnderlined() |
void |
postProcess(DocumentReader reader)
Post processing structure of node.
|
void |
setBold(boolean bold)
Sets text style bold.
|
void |
setFont(String font)
Sets font.
|
void |
setItalic(boolean italic)
Sets text style italic.
|
void |
setSubscript(boolean subscript)
Sets subscript.
|
void |
setSuperscript(boolean superscript)
Sets superscript.
|
void |
setText(String text)
Sets node text.
|
void |
setUnderlined(boolean underlined)
Sets text style underlined.
|
String |
toString() |
public static final int STYLE_NORMAL
public static final int STYLE_BOLD
public static final int STYLE_ITALIC
public static final int STYLE_UNDERLINED
public static final int SUPERSCRIPT
public static final int SUBSCRIPT
public TextNode()
public TextNode(String text)
text - node textpublic TextNode(String text, int style)
text - node textstyle - node stylepublic int getType()
getType in interface NodeNode.TEXT_NODEpublic String getText()
public void postProcess(DocumentReader reader) throws DocumentException
postProcess in interface Nodereader - document readerDocumentException - if some error occurspublic void setText(String text)
text - text to setpublic boolean isBold()
public void setBold(boolean bold)
bold - boldpublic boolean isItalic()
public void setItalic(boolean italic)
italic - italicpublic boolean isUnderlined()
public void setUnderlined(boolean underlined)
underlined - underlinedpublic boolean isSuperscript()
public void setSuperscript(boolean superscript)
superscript - is superscriptpublic boolean isSubscript()
public void setSubscript(boolean subscript)
subscript - is subscriptpublic String getFont()
public void setFont(String font)
font - fontpublic boolean hasEqualStyles(TextNode node)
node - text nodeCopyright © 2013 TFI branch of Engels Instutute of Technology. All Rights Reserved.