org.opentox.toxotis.core.html.impl
Class HTMLTextImpl

java.lang.Object
  extended by org.opentox.toxotis.core.html.impl.HTMLExpandableComponentImpl
      extended by org.opentox.toxotis.core.html.impl.HTMLTextImpl
All Implemented Interfaces:
HTMLComponent, HTMLExpandableComponent, HTMLText

public class HTMLTextImpl
extends HTMLExpandableComponentImpl
implements HTMLText

Author:
Pantelis Sopasakis, Charalampos Chomenides

Constructor Summary
HTMLTextImpl()
           
HTMLTextImpl(String text)
           
 
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 text)
          Set a comment instead of a text.
 HTMLText setText(String text)
          Set the content of the text element.
 String toString()
           
 
Methods inherited from class org.opentox.toxotis.core.html.impl.HTMLExpandableComponentImpl
addComponent, getComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HTMLTextImpl

public HTMLTextImpl()

HTMLTextImpl

public HTMLTextImpl(String text)
Method Detail

getText

public String getText()
Description copied from interface: HTMLText
Returns the text that was set to the current HTMLText object.

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

setText

public HTMLText setText(String text)
Description copied from interface: HTMLText
Set the content of the text element. This is the text that will be displayed on the HTML page.

Specified by:
setText in interface HTMLText
Parameters:
text - The text
Returns:
The current modifiable updated HTMLText object

setComment

public HTMLText setComment(String text)
Description copied from interface: HTMLText
Set a comment instead of a text. This is done using the HTML comment annotation <!-- comment -->

Specified by:
setComment in interface HTMLText
Parameters:
text - The comment
Returns:
The current modifiable updated HTMLText object

toString

public String toString()
Overrides:
toString in class Object

formatBold

public HTMLText formatBold(boolean isBold)
Description copied from interface: HTMLText
Format the text as bold using the HTML tag <b>

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

formatItalics

public HTMLText formatItalics(boolean isItalics)
Description copied from interface: HTMLText
Format the text as italics using the HTML tag <em>

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

formatUnderlined

public HTMLText formatUnderlined(boolean isUnderlined)
Description copied from interface: HTMLText
Undeline the text using the HTML tag <u>

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

formatTrueType

public HTMLText formatTrueType(boolean isTrueType)
Description copied from interface: HTMLText
Format the text as true-type using the HTML tag <tt>

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

formatPRE

public HTMLText formatPRE(boolean isPRE)
Description copied from interface: HTMLText
Encapsulates the formatted text in a pre block using the tag <pre;gt;

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


Copyright © 2011-2012 OpenTox. All Rights Reserved.