001package com.hfg.html;
002
003
004import com.hfg.xml.XMLNode;
005
006//------------------------------------------------------------------------------
007/**
008 * Represents an unordered list (<ul>) tag.
009 *
010 * @author J. Alex Taylor, hairyfatguy.com
011 */
012//------------------------------------------------------------------------------
013// com.hfg XML/HTML Coding Library
014//
015// This library is free software; you can redistribute it and/or
016// modify it under the terms of the GNU Lesser General Public
017// License as published by the Free Software Foundation; either
018// version 2.1 of the License, or (at your option) any later version.
019//
020// This library is distributed in the hope that it will be useful,
021// but WITHOUT ANY WARRANTY; without even the implied warranty of
022// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
023// Lesser General Public License for more details.
024//
025// You should have received a copy of the GNU Lesser General Public
026// License along with this library; if not, write to the Free Software
027// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
028//
029// J. Alex Taylor, President, Founder, CEO, COO, CFO, OOPS hairyfatguy.com
030// jataylor@hairyfatguy.com
031//------------------------------------------------------------------------------
032
033public class Ul extends HTMLTag
034{
035
036   //##########################################################################
037   // PRIVATE FIELDS
038   //##########################################################################
039
040
041   //##########################################################################
042   // CONSTRUCTORS
043   //##########################################################################
044
045   //--------------------------------------------------------------------------
046   public Ul()
047   {
048      super(HTML.UL);
049   }
050
051   //--------------------------------------------------------------------------
052   public Ul(XMLNode inXMLNode)
053   {
054      this();
055      initFromXMLNode(inXMLNode);
056   }
057
058   //##########################################################################
059   // PUBLIC METHODS
060   //##########################################################################
061
062   //--------------------------------------------------------------------------
063   public Li addListItem()
064   {
065      Li li = new Li();
066      addSubtag(li);
067      return li;
068   }
069
070   //--------------------------------------------------------------------------
071   public Li addListItem(String inContent)
072   {
073      Li li = new Li(inContent);
074      addSubtag(li);
075      return li;
076   }
077
078   //--------------------------------------------------------------------------
079   public Li addListItem(HTMLTag inContent)
080   {
081      Li li = new Li(inContent);
082      addSubtag(li);
083      return li;
084   }
085
086   //--------------------------------------------------------------------------
087   public Ul setClass(String inValue)
088   {
089      setAttribute(HTML.CLASS, inValue);
090
091      return this;
092   }
093
094   //--------------------------------------------------------------------------
095   public Ul setId(String inValue)
096   {
097      setAttribute(HTML.ID, inValue);
098      return this;
099   }
100
101   //--------------------------------------------------------------------------
102   public Ul setStyle(String inValue)
103   {
104      setAttribute(HTML.STYLE, inValue);
105
106      return this;
107   }
108
109   //--------------------------------------------------------------------------
110   @Override
111   public Ul addStyle(String inValue)
112   {
113      return (Ul) super.addStyle(inValue);
114   }
115
116}