You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-dev@jakarta.apache.org by rd...@apache.org on 2001/09/22 17:25:34 UTC

cvs commit: jakarta-ecs2/generation/xhtml-gen/templates/static/org/apache/ecs/xhtml XhtmlElement.java

rdonkin     01/09/22 08:25:34

  Added:       generation/xhtml-gen/templates/static/org/apache/ecs/xhtml
                        XhtmlElement.java
  Log:
  Generation tools initial commit
  
  Revision  Changes    Path
  1.1                  jakarta-ecs2/generation/xhtml-gen/templates/static/org/apache/ecs/xhtml/XhtmlElement.java
  
  Index: XhtmlElement.java
  ===================================================================
  /*
   * Copyright (c) 1999 The Java Apache Project.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Java Apache
   *    Project. <http://java.apache.org/>"
   *
   * 4. The names "Java Apache Element Construction Set", "Java Apache ECS" and
   *    "Java Apache Project" must not be used to endorse or promote products
   *    derived from this software without prior written permission.
   *
   * 5. Products derived from this software may not be called
   *    "Java Apache Element Construction Set" nor "Java Apache ECS" appear
   *    in their names without prior written permission of the
   *    Java Apache Project.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Java Apache
   *    Project. <http://java.apache.org/>"
   *
   * THIS SOFTWARE IS PROVIDED BY THE JAVA APACHE PROJECT "AS IS" AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JAVA APACHE PROJECT OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Java Apache Project. For more information
   * on the Java Apache Project please see <http://java.apache.org/>.
   *
   */
  package org.apache.ecs.xhtml;
  
  import org.apache.ecs.ElementImpl;
  import org.apache.ecs.Element;
  
  public class XhtmlElement extends ElementImpl
  {
     public pElement element = new pElement();
  
     // ---------------------------------------
     //          INITIALIZER
     // ---------------------------------------
     {
        // Start of the ElementConfig.
        org.apache.ecs.ElementConfig start = new org.apache.ecs.ElementConfigImpl();
        start.setStartChar('<');
        start.setEndChar('>');
  
        // End of ElementConfig.
        org.apache.ecs.ElementConfig end = new org.apache.ecs.ElementConfigImpl();
        end.setStartChar('>');
        end.setStartModifier('/');
        end.setEndChar('>');
  
        // Add the configs to the element.
        setStartConfig(start);
        setEndConfig(end);
     }
  
     public XhtmlElement()
     {
        super();
     }
  
     public XhtmlElement(String name)
     {
        super(name);
     }
  
     public void setID(String id)
     {
        setAttribute("id",id);
     }
  
     public String getID()
     {
        return getAttribute("id");
     }
  
     public void setClass(String element_class)
     {
        setAttribute("class",element_class);
     }
  
     public String getClass(String element_class)
     {
        return getAttribute("class");
     }
  
     public void setLang(String lang)
     {
        setAttribute("lang",lang);
     }
  
     public String getLang()
     {
        return getAttribute("lang");
     }
  
     public void setStyle(String style)
     {
        setAttribute("style",style);
     }
  
     public String getStyle()
     {
        return getAttribute("style");
     }
  
     public void setDir(String dir)
     {
        setAttribute("dir",dir);
     }
  
     public String getDir()
     {
        return getAttribute("dir");
     }
  
     private XhtmlElement getInstance()
     {
        return this;
     }
  
     public class pElement {
        public XhtmlElement add(Element e)
        {
           addElement(e);
           return getInstance();
        }
  
        public XhtmlElement setClass(String clazz)
        {
           getInstance().setClass(clazz);
           return getInstance();
        }
  
        public XhtmlElement setLang(String lang)
        {
           getInstance().setLang(lang);
           return getInstance();
        }
  
        public XhtmlElement setStyle(String style)
        {
           getInstance().setStyle(style);
           return getInstance();
        }
  
        public XhtmlElement setDir(String dir)
        {
           getInstance().setDir(dir);
           return getInstance();
        }
  
        public XhtmlElement setID(String id)
        {
           getInstance().setID(id);
           return getInstance();
        }
     }
  }
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ecs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ecs-dev-help@jakarta.apache.org