001    /*
002     * This file is part of the Echo Point Project.  This project is a
003     * collection of Components that have extended the Echo Web Application
004     * Framework Version 3.
005     *
006     * Version: MPL 1.1
007     *
008     * The contents of this file are subject to the Mozilla Public License Version
009     * 1.1 (the "License"); you may not use this file except in compliance with
010     * the License. You may obtain a copy of the License at
011     * http://www.mozilla.org/MPL/
012     *
013     * Software distributed under the License is distributed on an "AS IS" basis,
014     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015     * for the specific language governing rights and limitations under the
016     * License.
017     */
018    
019    package echopoint;
020    
021    import echopoint.internal.AbstractHtmlComponent;
022    
023    /**
024     * HtmlLabel is a very lightweight component that will insert HTML text
025     * directly onto the client.  The inserted text is contained within a parent
026     * <code>&lt;span&gt;</code> element.
027     *
028     * <p><b>Note:</b> Be careful of your use of id attributes in the HTML
029     * text as they may clash with Echo3 generated ones.  Also note that this
030     * component does not support child components.</p>
031     *
032     * <p>The following shows sample use of this component:</p>
033     * <pre>
034     *   import nextapp.echo.app.Column;
035     *   import echopoint.HtmlLabel;
036     *
037     *     ...
038     *     final Column column = new Column();
039     *     final String text = "&lt;b&gt;My&lt;/b&gt; &lt;i&gt;new&lt;/i&gt; &lt;code&gt;label&lt;/code&gt; &lt;sup&gt;*&lt;/sup&gt;" +
040     *     final HtmlLabel html = new HtmlLabel( text );
041     *     html.setStyleName( "Default.HtmlLabel" );
042     *     column.add( html );
043     * </pre>
044     *
045     * @author Rakesh 2008-03-22
046     * @version $Id: HtmlLabel.java 5 2008-07-10 01:49:16Z sptrakesh $
047     */
048    public class HtmlLabel extends AbstractHtmlComponent
049    {
050      private static final long serialVersionUID = 1l;
051    
052      /** Default constructor.  Create a new instance with empty text. */
053      public HtmlLabel() {}
054    
055      /**
056       * Create a new instance enclosing the specified HTML text.
057       *
058       * @param text The HTML text that is to be displayed in this component.
059       */
060      public HtmlLabel( final String text )
061      {
062        super( text );
063      }
064    }