org.opentox.toxotis.core.html
Interface HTMLText

All Superinterfaces:
HTMLComponent
All Known Implementing Classes:
HTMLTextImpl

public interface HTMLText
extends HTMLComponent

Formatted text in an HTML document.

Author:
Pantelis Sopasakis, Charalampos Chomenides

Method Summary
 HTMLText formatBold(boolean isBold)
          Format the text as bold using the HTML tag <b>
 HTMLText formatItalics(boolean isItalics)
          Format the text as italics using the HTML tag <em>
 HTMLText formatPRE(boolean isPRE)
          Encapsulates the formatted text in a pre block using the tag <pre;gt;
 HTMLText formatTrueType(boolean isTrueType)
          Format the text as true-type using the HTML tag <tt>
 HTMLText formatUnderlined(boolean isUnderlined)
          Undeline the text using the HTML tag <u>
 String getText()
          Returns the text that was set to the current HTMLText object.
 HTMLText setComment(String comment)
          Set a comment instead of a text.
 HTMLText setText(String text)
          Set the content of the text element.
 

Method Detail

setText

HTMLText setText(String text)
Set the content of the text element. This is the text that will be displayed on the HTML page.

Parameters:
text - The text
Returns:
The current modifiable updated HTMLText object

setComment

HTMLText setComment(String comment)
Set a comment instead of a text. This is done using the HTML comment annotation <!-- comment -->

Parameters:
comment - The comment
Returns:
The current modifiable updated HTMLText object

getText

String getText()
Returns the text that was set to the current HTMLText object.

Returns:
The text that was set to the current HTMLText object using the setter method setText(java.lang.String) or alternatively setComment(java.lang.String) or null if no text was provided.

formatBold

HTMLText formatBold(boolean isBold)
Format the text as bold using the HTML tag <b>

Parameters:
isBold - Whehter the text should be formatted as bold.
Returns:
The current modifiable updated HTMLText object

formatItalics

HTMLText formatItalics(boolean isItalics)
Format the text as italics using the HTML tag <em>

Parameters:
isItalics - Whehter the text should be formatted as italics.
Returns:
The current modifiable updated HTMLText object

formatUnderlined

HTMLText formatUnderlined(boolean isUnderlined)
Undeline the text using the HTML tag <u>

Parameters:
isUnderlined - Whehter the text should be formatted as underlined.
Returns:
The current modifiable updated HTMLText object

formatTrueType

HTMLText formatTrueType(boolean isTrueType)
Format the text as true-type using the HTML tag <tt>

Parameters:
isTrueType - Whehter the text should be formatted as true-type.
Returns:
The current modifiable updated HTMLText object

formatPRE

HTMLText formatPRE(boolean isPRE)
Encapsulates the formatted text in a pre block using the tag <pre;gt;

Parameters:
isPRE - Whehter the text should be formatted as bold.
Returns:
The current modifiable updated HTMLText object


Copyright © 2011-2012 OpenTox. All Rights Reserved.