001 package net.sf.jolene.dom; 002 003 /** 004 * This represents arbitrary text to be rendered in an html document. 005 * These objects are created when the Parser detects a LABEL tag containing other HTML elements. 006 * 007 * @author Dan Howard 008 * @since Feb 11, 2006 8:21:44 AM 009 */ 010 public final class Text extends HTMLElement { 011 /** 012 * Returns a clone of the text object. 013 * 014 * @return Text object. 015 */ 016 @Override 017 public Text clone() { 018 return (Text) super.clone(); 019 } 020 021 /** 022 * Sets the text on the text object. Same as setText. 023 * @param value text to set. 024 */ 025 @Override 026 public void setValue(String value) { 027 super.setValue(value); 028 setContent(value); 029 } 030 031 /** 032 * Renders the text. 033 * 034 * @return The text as a html string. 035 */ 036 @Override 037 public String toString() { 038 return getContent(); 039 } 040 }