jakarta-ecs-1.4.2/0000755000175000017500000000000011126403127013226 5ustar killerkillerjakarta-ecs-1.4.2/LICENSE.txt0000644000175000017500000000532007703353447015070 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ jakarta-ecs-1.4.2/INSTALL0000644000175000017500000000065207703353450014273 0ustar killerkillerElement Construction Set (ECS) ------------------------------ +--------------+ | Installation | +--------------+ Installation of the default distribution of ECS is simple. All one needs to do is copy the ecs.jar file into the CLASSPATH's where it is used. +----------+ | Building | +----------+ To build ECS from source code, we depend on the Ant build system. This is documented in build/README. thanks -the ECS teamjakarta-ecs-1.4.2/README0000644000175000017500000000115607703353450014122 0ustar killerkiller The Jakarta Project Element Construction Set To use ECS out of the box, simply add the ecs.jar file located in src/java to your classpath. Please note that ECS is not a serlvet, it is simply a library of code for you to use within your servlet, applet or other Java applications. If you would like to recompile ECS, please read the document INSTALL as well as the build/README document. Javadoc documentation for ECS is in the docs/apidocs directory. Latest versions of ECS can be obtained from the Jakarta Project website at jakarta-ecs-1.4.2/build/0000755000175000017500000000000011126250721014325 5ustar killerkillerjakarta-ecs-1.4.2/build/build-ecs.sh0000644000175000017500000000230311126250721016526 0ustar killerkiller#!/bin/sh #-------------------------------------------- # No need to edit anything past here #-------------------------------------------- if test -z "${JAVA_HOME}" ; then echo "ERROR: JAVA_HOME not found in your environment." echo "Please, set the JAVA_HOME variable in your environment to match the" echo "location of the Java Virtual Machine you want to use." exit fi if test -f ${JAVA_HOME}/lib/tools.jar ; then CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar fi # convert the existing path to unix if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi # Add in your .jar files first for i in ./*.jar do CLASSPATH=$CLASSPATH:"$i" done for i in ../lib/*.jar do CLASSPATH=$CLASSPATH:"$i" done # Add in the jakarta-site2 library files for i in ../../jakarta-site2/lib/*.jar do CLASSPATH=$CLASSPATH:"$i" done # convert the unix path to windows if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then CLASSPATH=`cygpath --path --windows "$CLASSPATH"` fi BUILDFILE=build-ecs.xml ${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \ -buildfile ${BUILDFILE} "$@" jakarta-ecs-1.4.2/build/testcases.xml0000644000175000017500000000562611126250721017056 0ustar killerkiller jakarta-ecs-1.4.2/build/build-ecs.xml0000644000175000017500000003242211126250721016721 0ustar killerkiller AnakiaTask is not present! Please check to make sure that velocity.jar is in your classpath. jakarta-ecs-1.4.2/build/build-ecs.bat0000644000175000017500000000161111126250721016663 0ustar killerkiller@echo off REM -------------------------------------------- REM No need to edit anything past here REM -------------------------------------------- set _BUILDFILE=%BUILDFILE% set BUILDFILE=build-ecs.xml :final set _CLASSPATH=%CLASSPATH% if "%JAVA_HOME%" == "" goto javahomeerror if exist %JAVA_HOME%\lib\tools.jar set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar set CLASSPATH=%CLASSPATH%;.\ant-1.2.jar set CLASSPATH=%CLASSPATH%;..\lib\xerces-1.2.2.jar %JAVA_HOME%\bin\java.exe org.apache.tools.ant.Main -buildfile %BUILDFILE% %1 %2 %3 %4 %5 %6 %7 %8 %9 goto end REM -----------ERROR------------- :javahomeerror echo "ERROR: JAVA_HOME not found in your environment." echo "Please, set the JAVA_HOME variable in your environment to match the" echo "location of the Java Virtual Machine you want to use." :end set BUILDFILE=%_BUILDFILE% set _BUILDFILE= set CLASSPATH=%_CLASSPATH% set _CLASSPATH= jakarta-ecs-1.4.2/build/build.properties.sample0000644000175000017500000000072511126250721021026 0ustar killerkiller# # The following jars are needed to build the site documentation. # If you have velocity checked out from cvs then it might work anyway # #velocity.jar = ../../jakarta-velocity/bin/velocity-1.3-dev.jar #commons-collections.jar = ../../jakarta-velocity/build/lib/commons-collections.jar #jdom.jar = ../../jakarta-velocity/build/lib/jdom-b7.jar #log4j.jar = ../../jakarta-velocity/build/lib/log4j-1.1.3.jar #xerces.jar = ../../jakarta-velocity/build/lib/xerces-1.3.0.jarjakarta-ecs-1.4.2/src/0000755000175000017500000000000011126246123014016 5ustar killerkillerjakarta-ecs-1.4.2/src/java/0000755000175000017500000000000011126246123014737 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/0000755000175000017500000000000011126246123015526 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/0000755000175000017500000000000011126246123016747 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/0000755000175000017500000000000011126246123017521 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/0000755000175000017500000000000011126246123021006 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/StringFilter.java0000644000175000017500000001431007703353440024273 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.filter; import org.apache.ecs.Filter; import java.text.StringCharacterIterator; import java.text.CharacterIterator; /** Stupid implementation of Filter interface to demonstrate how easy
it is to create your own filters. This should NOT be used in/for
anything real. Anyone want to implement a regex filter? @version $Id: StringFilter.java,v 1.5 2003/04/27 09:28:56 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class StringFilter extends java.util.Hashtable implements Filter { public StringFilter() { super(4); } /** Returns the name of the filter */ public String getInfo() { return "StringFilter"; } /** this method actually performs the filtering. */ public String process(String to_process) { System.out.println("\nString to Process in StringFilter = "+to_process); String[] value = split(to_process); StringBuffer new_value = new StringBuffer(); for(int x = 0; x < value.length; x++) { if(hasAttribute(value[x])) new_value.append((String)get(value[x])); else new_value.append(value[x]); if(x != value.length - 1) new_value.append(" "); } return(new_value.toString()); } /** Put a filter somewhere we can get to it. */ public Filter addAttribute(String attribute,Object entity) { put(attribute,entity); return(this); } /** Get rid of a current filter. */ public Filter removeAttribute(String attribute) { try { remove(attribute); } catch(NullPointerException exc) { // don't really care if this throws a null pointer exception } return(this); } /** Does the filter filter this? */ public boolean hasAttribute(String attribute) { return(containsKey(attribute)); } /** Need a way to parse the stream so we can do string comparisons instead of character comparisons. */ private String[] split(String to_split) { if ( to_split == null || to_split.length() == 0 ) { String[] array = new String[0]; return array; } StringBuffer sb = new StringBuffer(to_split.length()+50); StringCharacterIterator sci = new StringCharacterIterator(to_split); int length = 0; for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next()) { if(String.valueOf(c).equals(" ")) length++; else if(sci.getEndIndex()-1 == sci.getIndex()) length++; } String[] array = new String[length]; length = 0; String tmp = new String(); for (char c = sci.first(); c!= CharacterIterator.DONE; c = sci.next()) { if(String.valueOf(c).equals(" ")) { array[length] = tmp; tmp = new String(); length++; } else if(sci.getEndIndex()-1 == sci.getIndex()) { tmp = tmp+String.valueOf(sci.last()); array[length] = tmp; tmp = new String(); length++; } else tmp += String.valueOf(c); } return(array); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/NullFilter.java0000644000175000017500000000641207703353441023744 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.filter; import org.apache.ecs.*; /** A filter for ECS that doesn't do anything. */ public class NullFilter implements Filter { public Filter addAttribute(String name, Object attribute) { return this; } public Filter removeAttribute(String name) { return this; } public boolean hasAttribute(String name) { return false; } public String process(String to_process) { return to_process; } public String getInfo() { return "info"; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/package.html0000644000175000017500000000001707703353440023274 0ustar killerkiller jakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/WordFilter.java0000644000175000017500000001236407703353440023747 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.filter; import org.apache.ecs.Filter; import java.text.StringCharacterIterator; import java.text.CharacterIterator; import java.util.StringTokenizer; /** This filter uses StringTokenizer to create "words" and allow you to replace on those "words". A word is defined as anything between two spaces. This filter should be relatively fast and shows how easy it is to implement your own filters.

    Filter filter = new WordFilter();
    filter.addAttribute("there","where");
    filter.addAttribute("it","is");
    filter.addAttribute("goes","it");
    P p = new P();
    p.setFilter(filter);
    p.addElement("there it goes");
    System.out.println(p.toString());
Produces: <p>where is it @version $Id: WordFilter.java,v 1.5 2003/04/27 09:28:56 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class WordFilter extends java.util.Hashtable implements Filter { public WordFilter() { super(4); } /** Returns the name of the filter */ public String getInfo() { return "WordFilter"; } /** this method actually performs the filtering. */ public String process(String to_process) { if ( to_process == null || to_process.length() == 0 ) return ""; String tmp = ""; // the true at the end is the key to making it work StringTokenizer st = new StringTokenizer(to_process, " ", true); StringBuffer newValue = new StringBuffer(to_process.length() + 50); while ( st.hasMoreTokens() ) { tmp = st.nextToken(); if (hasAttribute(tmp)) newValue.append((String)get(tmp)); else newValue.append(tmp); } return newValue.toString(); } /** Put a filter somewhere we can get to it. */ public Filter addAttribute(String attribute,Object entity) { put(attribute,entity); return(this); } /** Get rid of a current filter. */ public Filter removeAttribute(String attribute) { try { remove(attribute); } catch(NullPointerException exc) { // don't really care if this throws a null pointer exception } return(this); } /** Does the filter filter this? */ public boolean hasAttribute(String attribute) { return(containsKey(attribute)); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/CharacterFilter.java0000644000175000017500000001247007703353440024726 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.filter; import org.apache.ecs.Filter; import org.apache.ecs.Entities; import java.text.StringCharacterIterator; import java.text.CharacterIterator; /** This class creates a Filter object. The default characters filtered are:
" ' & < >

For example:


    Filter filter = new CharacterFilter();
    filter.addAttribute("$","dollar");
    filter.addAttribute("#",Entities.POUND);

    P p = new P();
    p.setFilter(filter);

    Document doc = new Document();
    doc.getBody().addElement(p);
    
The filter is applied when the addElement() method is called. @version $Id: CharacterFilter.java,v 1.7 2003/04/27 09:28:56 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class CharacterFilter extends java.util.Hashtable implements Filter { /** Private initializer. " ' & < > are the default filters. */ { addAttribute("\"",Entities.QUOT); addAttribute("'",Entities.LSQUO); addAttribute("&",Entities.AMP); addAttribute("<",Entities.LT); addAttribute(">",Entities.GT); } public CharacterFilter() { super(4); } /** Returns the name of the filter */ public String getInfo() { return "CharacterFilter"; } /** Register things to be filtered. */ public Filter addAttribute(String name,Object attribute) { this.put(name,attribute); return this; } /** Remove things to be filtered. */ public Filter removeAttribute(String name) { try { this.remove(name); } catch ( Exception e ) { } return this; } /** Check to see if something is going to be filtered. */ public boolean hasAttribute(String key) { return(this.containsKey(key)); } /** Perform the filtering operation. */ public String process(String to_process) { if ( to_process == null || to_process.length() == 0 ) return ""; StringBuffer bs = new StringBuffer(to_process.length() + 50); StringCharacterIterator sci = new StringCharacterIterator(to_process); String tmp = null; for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next()) { tmp = String.valueOf(c); if (hasAttribute(tmp)) tmp = (String) this.get(tmp); bs.append(tmp); } return(bs.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/filter/RegexpFilter.java0000644000175000017500000001344507703353440024267 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.filter; import org.apache.ecs.Filter; import org.apache.regexp.RE; import org.apache.regexp.RESyntaxException; import java.util.Hashtable; import java.util.Enumeration; /** * This filter uses regexp to create expressions and allows * you do a replace on them. * * It works like the Perl function called subst. Given a regular * expression of "a*b", and a String to substituteIn of * "aaaabfooaaabgarplyaaabwackyb" and the substitution String "-", the * resulting String returned by subst would be "-foo-garply-wacky-". * *

 *    Filter filter = new RegexpFilter();
 *    filter.addAttribute("a*b","-");
 *    String text = "aaaabfooaaabgarplyaaabwackyb";
 *    String result = filter.process(text);
 *    System.out.println(result);
 * 
* * Produces: -foo-garply-wacky- * * Note: "a*" means 0 or more occurences of 'a', therefore the last match * is absolutely correct. * * For more information about the regular expression package please do * visit Jakarta Regexp" * * @version $Id: RegexpFilter.java,v 1.2 2003/04/27 09:28:56 rdonkin Exp $ * @author K. Zelazowski */ public class RegexpFilter extends Hashtable implements Filter { public RegexpFilter() { super(4); } /** Returns the name of the filter */ public String getInfo() { return "RegexpFilter"; } /** * This method actually performs the filtering. */ public String process(String to_process) { if ( to_process == null || to_process.length() == 0 ) { return ""; } String substituteIn = to_process; Enumeration enum = keys(); while (enum.hasMoreElements()) { RE r = (RE)enum.nextElement(); String substitution = (String)get(r); substituteIn = r.subst(substituteIn, substitution); } return substituteIn; } /** * Add regular expression - substitution pair. * * @return itself or null if the was an error in the syntax of the * expression. */ public Filter addAttribute(String expression,Object substitution) { try { RE r = new RE(expression); put(r, substitution); } catch (RESyntaxException e) { return null; } return(this); } /** * Get rid of the specified expression filter. */ public Filter removeAttribute(String expression) { try { RE r = new RE(expression); remove(r); } catch(Exception e) { } return(this); } /** * Returns true if this filter contains an expression specified * as an argument. */ public boolean hasAttribute(String expression) { try { RE r = new RE(expression); return containsKey(r); } catch (Exception e) { } return false; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/XhtmlDocument.java0000644000175000017500000002373407703353440023177 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Serializable; import org.apache.ecs.xhtml.html; import org.apache.ecs.xhtml.body; import org.apache.ecs.xhtml.title; import org.apache.ecs.xhtml.head; import org.apache.ecs.Doctype; /** This class creates an XhtmlDocument container, for convience. @version $Id: XhtmlDocument.java,v 1.3 2003/04/27 09:42:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class XhtmlDocument implements Serializable,Cloneable { /** @serial html html */ private html html; // this is the actual container for head and body /** @serial head head */ private head head; /** @serial body body */ private body body; /** @serial title title */ private title title; /** @serial codeset codeset */ private String codeset = null; /** @serial doctype doctype */ private Doctype doctype = null; { html = new html(); head = new head(); title = new title(); body = new body(); head.addElement("title",title); html.addElement("head",head); html.addElement("body",body); } /** Basic constructor. */ public XhtmlDocument() { } /** Basic constructor. Sets the codeset for the page output. */ public XhtmlDocument(String codeset) { setCodeset(codeset); } /** Get the doctype element for this XhtmlDocument container. */ public Doctype getDoctype() { return(doctype); } /** Set the doctype element for this XhtmlDocument container. */ public XhtmlDocument setDoctype(Doctype set_doctype) { this.doctype = set_doctype; return(this); } /** Get the html element for this XhtmlDocument container. */ public html getHtml() { return(html); } /** Set the html element for this XhtmlDocument container. */ public XhtmlDocument setHtml(html set_html) { this.html = set_html; return(this); } /** Get the head element for this XhtmlDocument container. */ public head getHead() { return(head); } /** Set the head element for this XhtmlDocument container. */ public XhtmlDocument setHead(head set_head) { html.addElement("head",set_head); return(this); } /** Append to the head element for this XhtmlDocument container. @param value adds to the value between the head tags */ public XhtmlDocument appendHead(Element value) { head.addElement(value); return(this); } /** Append to the head element for this XhtmlDocument container. @param value adds to the value between the head tags */ public XhtmlDocument appendHead(String value) { head.addElement(value); return(this); } /** Get the body element for this XhtmlDocument container. */ public body getBody() { return(body); } /** Set the body element for this XhtmlDocument container. */ public XhtmlDocument setBody(body set_body) { html.addElement("body",set_body); return(this); } /** Append to the body element for this XhtmlDocument container. @param value adds to the value between the body tags */ public XhtmlDocument appendBody(Element value) { body.addElement(value); return(this); } /** Append to the body element for this XhtmlDocument container. @param value adds to the value between the body tags */ public XhtmlDocument appendBody(String value) { body.addElement(value); return(this); } /** Get the title element for this XhtmlDocument container. */ public title getTitle() { return(title); } /** Set the title element for this XhtmlDocument container. */ public XhtmlDocument setTitle(title set_title) { head.addElement("title",set_title); return(this); } /** Append to the title element for this XhtmlDocument container. @param value adds to the value between the title tags */ public XhtmlDocument appendTitle(Element value) { title.addElement(value); return(this); } /** Append to the title element for this XhtmlDocument container. @param value adds to the value between the title tags */ public XhtmlDocument appendTitle(String value) { title.addElement(value); return(this); } /** * Sets the codeset for this XhtmlDocument */ public void setCodeset ( String codeset ) { this.codeset = codeset; } /** * Gets the codeset for this XhtmlDocument * * @return the codeset */ public String getCodeset() { return this.codeset; } /** Write the container to the OutputStream */ public void output(OutputStream out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // XhtmlDocument is just a convient wrapper for html call html.output html.output(out); } /** Write the container to the PrintWriter */ public void output(PrintWriter out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // XhtmlDocument is just a convient wrapper for html call html.output html.output(out); } /** Override the toString() method so that it prints something meaningful. */ public final String toString() { StringBuffer sb = new StringBuffer(); if ( getCodeset() != null ) { if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return (sb.toString()); } else { if (doctype != null) sb.append (doctype.toString()); sb.append (html.toString()); return(sb.toString()); } } /** Override the toString() method so that it prints something meaningful. */ public final String toString(String codeset) { StringBuffer sb = new StringBuffer(); if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return(sb.toString()); } /** Allows the document to be cloned. Doesn't return an instance of document returns instance of html. NOTE: If you have a doctype set, then it will be lost. Feel free to submit a patch to fix this. It isn't trivial. */ public Object clone() { return(html.clone()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/XhtmlFrameSetDocument.java0000644000175000017500000002665307703353440024631 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Serializable; import org.apache.ecs.xhtml.html; import org.apache.ecs.xhtml.body; import org.apache.ecs.xhtml.title; import org.apache.ecs.xhtml.head; import org.apache.ecs.xhtml.frameset; import org.apache.ecs.xhtml.noframes; /** This class creates a XhtmlFrameSetDocument container, for convience. Make sure that you add elements from org.apache.ecs.xhtml and not from org.apache.ecs.html! @version $Id: XhtmlFrameSetDocument.java,v 1.3 2003/04/27 09:42:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class XhtmlFrameSetDocument implements Serializable,Cloneable { /** @serial html html */ private html html; // this is the actual container for head and body /** @serial head head */ private head head; /** @serial body body */ private body body; /** @serial title title */ private title title; /** @serial frameset frameset */ private frameset frameset; /** @serial noframes frameset */ private noframes noframes; /** @serial codeset codeset */ private String codeset = null; /** @serial doctype doctype */ private Doctype doctype = null; { html = new html(); head = new head(); title = new title(); frameset = new frameset(); noframes = new noframes(); body = new body(); head.addElement(title); html.addElement(head); html.addElement(frameset); html.addElement(noframes); noframes.addElement(body); } /** Basic constructor. */ public XhtmlFrameSetDocument() { } /** Basic constructor. Sets the codeset for the page output. */ public XhtmlFrameSetDocument(String codeset) { setCodeset(codeset); } /** Get the html element for this document container. */ public html getHtml() { return(html); } /** Set the html element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setHtml(html set_html) { this.html = set_html; return(this); } /** Get the head element for this XhtmlFrameSetDocument container. */ public head getHead() { return(head); } /** Set the head element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setHead(head set_head) { this.head = set_head; return(this); } /** Append to the head element for this XhtmlFrameSetDocument container. @param value adds to the value between the head tags */ public XhtmlFrameSetDocument appendHead(Element value) { head.addElement(value); return(this); } /** Append to the head element for this XhtmlFrameSetDocument container. @param value adds to the value between the head tags */ public XhtmlFrameSetDocument appendHead(String value) { head.addElement(value); return(this); } /** Get the frameset element for this XhtmlFrameSetDocument container. */ public frameset getFrameSet() { return(frameset); } /** Set the frameset element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setHead(frameset set_frameset) { this.frameset = set_frameset; return(this); } /** Append to the head element for this XhtmlFrameSetDocument container. @param value adds to the value between the head tags */ public XhtmlFrameSetDocument appendFrameSet(Element value) { frameset.addElement(value); return(this); } /** Append to the head element for this XhtmlFrameSetDocument container. @param value adds to the value between the head tags */ public XhtmlFrameSetDocument appendFrameSet(String value) { frameset.addElement(value); return(this); } /** Get the body element for this XhtmlFrameSetDocument container. */ public body getBody() { return(body); } /** Set the body element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setBody(body set_body) { this.body = set_body; return(this); } /** Append to the body element for this XhtmlFrameSetDocument container. @param value adds to the value between the body tags */ public XhtmlFrameSetDocument appendBody(Element value) { body.addElement(value); return(this); } /** Append to the body element for this XhtmlFrameSetDocument container. @param value adds to the value between the body tags */ public XhtmlFrameSetDocument appendBody(String value) { body.addElement(value); return(this); } /** Get the title element for this XhtmlFrameSetDocument container. */ public title getTitle() { return(title); } /** Set the title element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setTitle(title set_title) { this.title = set_title; return(this); } /** Append to the title element for this XhtmlFrameSetDocument container. @param value adds to the value between the title tags */ public XhtmlFrameSetDocument appendTitle(Element value) { title.addElement(value); return(this); } /** Append to the title element for this XhtmlFrameSetDocument container. @param value adds to the value between the title tags */ public XhtmlFrameSetDocument appendTitle(String value) { title.addElement(value); return(this); } /** * Sets the codeset for this XhtmlFrameSetDocument */ public void setCodeset ( String codeset ) { this.codeset = codeset; } /** * Gets the codeset for this XhtmlFrameSetDocument * * @return the codeset */ public String getCodeset() { return this.codeset; } /** Write the container to the OutputStream */ public void output(OutputStream out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // XhtmlFrameSetDocument is just a convient wrapper for html call html.output html.output(out); } /** Write the container to the PrintWriter */ public void output(PrintWriter out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // XhtmlFrameSetDocument is just a convient wrapper for html call html.output html.output(out); } /** Override the toString() method so that it prints something meaningful. */ public final String toString() { StringBuffer sb = new StringBuffer(); if ( getCodeset() != null ) { if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return (sb.toString()); } else { if (doctype != null) sb.append (doctype.toString()); sb.append (html.toString()); return(sb.toString()); } } /** Override the toString() method so that it prints something meaningful. */ public final String toString(String codeset) { StringBuffer sb = new StringBuffer(); if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return(sb.toString()); } /** Allows the XhtmlFrameSetDocument to be cloned. Doesn't return an instanceof XhtmlFrameSetDocument returns instance of html. */ public Object clone() { return(html.clone()); } /** Get the doctype element for this XhtmlFrameSetDocument container. */ public Doctype getDoctype() { return(doctype); } /** Set the doctype element for this XhtmlFrameSetDocument container. */ public XhtmlFrameSetDocument setDoctype(Doctype set_doctype) { this.doctype = set_doctype; return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/package.html0000644000175000017500000000001707703353440022007 0ustar killerkiller jakarta-ecs-1.4.2/src/java/org/apache/ecs/Printable.java0000644000175000017500000000553107703353440022317 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** Empty interface for determining if an element can be pretty printed. */ public interface Printable { } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Document.java0000644000175000017500000002347707703353440022166 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Serializable; import org.apache.ecs.html.Html; import org.apache.ecs.html.Body; import org.apache.ecs.html.Title; import org.apache.ecs.html.Head; import org.apache.ecs.Doctype; /** This class creates a Document container, for convience. @version $Id: Document.java,v 1.10 2003/04/27 09:43:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Document implements Serializable,Cloneable { /** @serial html html */ private Html html; // this is the actual container for head and body /** @serial head head */ private Head head; /** @serial body body */ private Body body; /** @serial title title */ private Title title; /** @serial codeset codeset */ private String codeset = null; /** @serial doctype doctype */ private Doctype doctype = null; { html = new Html(); head = new Head(); title = new Title(); body = new Body(); head.addElement("title",title); html.addElement("head",head); html.addElement("body",body); } /** Basic constructor. */ public Document() { } /** Basic constructor. Sets the codeset for the page output. */ public Document(String codeset) { setCodeset(codeset); } /** Get the doctype element for this document container. */ public Doctype getDoctype() { return(doctype); } /** Set the doctype element for this document container. */ public Document setDoctype(Doctype set_doctype) { this.doctype = set_doctype; return(this); } /** Get the html element for this document container. */ public Html getHtml() { return(html); } /** Set the html element for this document container. */ public Document setHtml(Html set_html) { this.html = set_html; return(this); } /** Get the head element for this document container. */ public Head getHead() { return(head); } /** Set the head element for this document container. */ public Document setHead(Head set_head) { html.addElement("head",set_head); this.head = set_head; return(this); } /** Append to the head element for this document container. @param value adds to the value between the head tags */ public Document appendHead(Element value) { head.addElement(value); return(this); } /** Append to the head element for this document container. @param value adds to the value between the head tags */ public Document appendHead(String value) { head.addElement(value); return(this); } /** Get the body element for this document container. */ public Body getBody() { return(body); } /** Set the Body element for this document container. */ public Document setBody(Body set_body) { html.addElement("body",set_body); this.body = set_body; return(this); } /** Append to the body element for this document container. @param value adds to the value between the body tags */ public Document appendBody(Element value) { body.addElement(value); return(this); } /** Append to the body element for this document container. @param value adds to the value between the body tags */ public Document appendBody(String value) { body.addElement(value); return(this); } /** Get the title element for this document container. */ public Title getTitle() { return(title); } /** Set the Title element for this document container. */ public Document setTitle(Title set_title) { head.addElement("title",set_title); this.title = set_title; return(this); } /** Append to the title element for this document container. @param value adds to the value between the title tags */ public Document appendTitle(Element value) { title.addElement(value); return(this); } /** Append to the title element for this document container. @param value adds to the value between the title tags */ public Document appendTitle(String value) { title.addElement(value); return(this); } /** * Sets the codeset for this Document */ public void setCodeset ( String codeset ) { this.codeset = codeset; } /** * Gets the codeset for this Document * * @return the codeset */ public String getCodeset() { return this.codeset; } /** Write the container to the OutputStream */ public void output(OutputStream out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // Document is just a convient wrapper for Html call Html.output html.output(out); } /** Write the container to the PrintWriter */ public void output(PrintWriter out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // Document is just a convient wrapper for Html call Html.output html.output(out); } /** Override the toString() method so that it prints something meaningful. */ public final String toString() { StringBuffer sb = new StringBuffer(); if ( getCodeset() != null ) { if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return (sb.toString()); } else { if (doctype != null) sb.append (doctype.toString()); sb.append (html.toString()); return(sb.toString()); } } /** Override the toString() method so that it prints something meaningful. */ public final String toString(String codeset) { StringBuffer sb = new StringBuffer(); if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return(sb.toString()); } /** Allows the document to be cloned. Doesn't return an instance of document returns instance of Html. NOTE: If you have a doctype set, then it will be lost. Feel free to submit a patch to fix this. It isn't trivial. */ public Object clone() { return(html.clone()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/MouseEvents.java0000644000175000017500000001210107703353440022643 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require javascript mouse event attributes. @version $Id: MouseEvents.java,v 1.4 2003/04/27 09:42:53 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface MouseEvents { /** make sure implementing classes have a setOnClick method. The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. */ public abstract void setOnClick(String script); /** make sure implementing classes have a setOnDblClick method. The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. */ public abstract void setOnDblClick(String script); /** make sure implementing classes have a setOnMouseDown method. The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. */ public abstract void setOnMouseDown(String script); /** make sure implementing classes have a setOnMouseUp method. The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. */ public abstract void setOnMouseUp(String script); /** make sure implementing classes have a setOnMouseOver method. The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. */ public abstract void setOnMouseOver(String script); /** make sure implementing classes have a setOnMouseMove method. The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. */ public abstract void setOnMouseMove(String script); /** make sure implementing classes have a setOnMouseOut method. The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. */ public abstract void setOnMouseOut(String script); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/examples/0000755000175000017500000000000011126246123021337 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/examples/HtmlTree.java0000644000175000017500000006577707703353440023763 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.examples; import java.io.*; import java.util.*; import javax.swing.tree.*; import org.apache.ecs.xml.*; import org.apache.ecs.html.*; /** * This JavaBean returns the hierarchical structure described in a * javax.swing.tree.DefaultMutableTreeNode as valid XHTML. This class * is a very simple counterpart of the javax.swing.JTree with the * exception that the external Controller is integrated into this View. * If you want your tree elements (nodes and leafs) to be marked with an * anchor, you'll have to make sure that the name of your node contains * such an anchor. * *

A specific node in a tree can be identified by a path, described as * colon separated integer values (e.g. "0:1"). Unlike Swing's * JTree component, this JavaBean expands only the requested node, leaving * all its parent nodes collapsed. An expanded node is one displays * its children. A collapsed node is one which hides them.

* *

You can use this class in a JavaServerPage like this:

* *

*

...template text...

*

* <%-- Get the bean from the request scope or * create a new one if none exists --%>
* <jsp:useBean id="tree" scope="request" * class="org.apache.ecs.examples.HtmlTree"> *

*

<%-- Read the path from the request --%>
* <jsp:setProperty name="tree" * property="path" param="path" />

*

<%-- Set UI properties --%>
* <jsp:setProperty name="tree" * property="rootVisible" value="true" />
* <jsp:setProperty name="tree" * property="indentation" value="2" />
* <jsp:setProperty name="tree" * property="openIcon" value="open.gif" />
* <jsp:setProperty name="tree" * property="closedIcon" value="closed.gif" />
* <jsp:setProperty name="tree" * property="leafIcon" value="leaf.gif" />

*

<%-- Workaround for Netscape * and Opera browsers --%>
* <jsp:setProperty name="tree" * property="action" value="tree.jsp" />

*
* </jsp:useBean> *

*

...template text...

*

* <%-- Get the XHTML output from the bean --%>
* <jsp:getProperty name="tree" property="html" /> *

*

* * Although this class is just an example of using parts of the Element * Construction Set, you can use it quite well in real web applications. * * @version 1.1, 2001/12/30, added ability to use a DefaultTreeModel as the * data model, added some useful methods including * one for basic HTML encoding, improved javadoc * comments and fixed minor bugs * @version 1.0, 2001/10/30, initial release * @author Christian Brensing */ public class HtmlTree implements Serializable { /** * Number of blank spaces around each hierarchical level * will be indented in relation to its parent node. * Default is 2. */ protected int indentation = 2; /** * Path to the requested node to be displayed, * described as colon separated integer values. * Default is an empty String. */ protected String path = ""; /** * Parameter name used to build the query string for the * anchor that acts as the Controller for opening and * closing nodes. Default is "path". */ protected String parameterName = "path"; /** * Array that stores the index of each node * read from the path property. */ private int[] pathArray = new int[0]; /** * Icon for displaying leafs. * Default is an empty String. */ protected String leafIcon = ""; /** * Icon for displaying open nodes. * Default is an empty String. */ protected String openIcon = ""; /** * Icon for displaying closed nodes. * Default is an empty String. */ protected String closedIcon = ""; /** * Context path of a web resource for the workaround * of a strange behaviour of Netscape and Opera * browsers. Default is an empty String. */ protected String action = "?"; /** * True if the root node is displayed, false if * its children are the highest visible nodes. * Default is true. */ protected boolean rootVisible = true; /** * The node that defines the tree displayed by this object. * Default is a sample model. */ protected DefaultMutableTreeNode root = getDefaultTreeModel(); /** * Stores the requested node to be displayed. * Default is the root node. */ protected DefaultMutableTreeNode displayNode = root; /** * Returns a HtmlTree with a sample model. */ public HtmlTree() { // do nothing } /** * Returns a HtmlTree with the specified DefaultMutableTreeNode * as its root. If the DefaultMutableTreeNode is null, * a sample model is set automatically. * * @param root a DefaultMutableTreeNode object */ public HtmlTree(DefaultMutableTreeNode root) { setRoot(root); } /** * Returns a HtmlTree with the specified DefaultTreeModel as * its model. If the specified DefaultTreeModel is null, * a sample model is set automatically. * * @param model a DefaultTreeModel object */ public HtmlTree(DefaultTreeModel model) { setModel(model); } /** * Sets the root node that will provide the data. If the * specified DefaultMutableTreeNode is null, * a sample model is set automatically. * * @param root a DefaultMutableTreeNode object */ public void setRoot(DefaultMutableTreeNode root) { // Check property if (root == null) { root = getDefaultTreeModel(); } // Set property this.root = root; } /** * Returns the node that defines the tree displayed * by this object. * * @return the root node that provides the data */ public DefaultMutableTreeNode getRoot() { return root; } /** * Sets the tree model that will provide the data. If the * specified DefaultTreeModel is null, a sample * model is set automatically. * * @param model a DefaultTreeModel object */ public void setModel(DefaultTreeModel model) { if (model != null) { setRoot((DefaultMutableTreeNode) model.getRoot()); } else { setRoot(null); } } /** * Returns the model that defines the tree displayed * by this object. * * @return the model that provides the data */ public DefaultTreeModel getModel() { return new DefaultTreeModel(root); } /** * Sets the path - described as colon separated integer values - * to the requested node to be displayed. * * @param path the path to the requested node to be displayed */ public void setPath(String path) { try { // Tokenize the path pathArray = getPathResolved(path); // Set path property this.path = path; } catch (NumberFormatException nfe) { // Reset path property this.path = ""; } } /** * Returns the path to the requested node. * * @return the path to the requested node */ public String getPath() { return path; } /** * Returns a path constructed from the path array for the * specified level. * * @param level the distance from the node to the root node. * @return the path for the specified level */ public String getPath(int level) { // Check property if (level > pathArray.length) { level = pathArray.length; } // New StringBuffer for the path generation StringBuffer autoPath = new StringBuffer(); // For each node for (int i = 0; i < level; i++) { // Add node index (read from the path array) autoPath.append(pathArray[i]); // Add path separator (colon) if (i < (level - 1)) { autoPath.append(":"); } } // Return generated path return autoPath.toString(); } /** * Returns an array that stores the index of each * node read from the specified path. * * @return an array of node indices * @throws java.lang.NumberFormatException if the specified * path does not consist of colon separated integer values */ public static int[] getPathResolved(String path) throws NumberFormatException { try { // Initialize the token array int[] returnArray = new int[0]; // Tokenize the path StringTokenizer st = new StringTokenizer(path,":"); // Reset the array with the number of tokens returnArray = new int[st.countTokens()]; // Save value of each token in the array if (st.countTokens() > 0) { for (int i = 0; i < returnArray.length; i++) { returnArray[i] = Integer.parseInt (st.nextToken().trim()); } } // Return path array return returnArray; } catch (Exception e) { // Wrap the exception in a NumberFormatException throw new NumberFormatException(e.getMessage()); } } /** * Sets the name of the parameter used to build the query * string for the anchor that acts as the Controller for * opening and closing nodes. You only have to set this * name if the default name "path" is already * used by your web application. * * @param parameterName the name of the parameter used * to build the query string */ public void setParameterName(String parameterName) { // Check property if (parameterName == null || parameterName.equals("")) { parameterName = "path"; } // Set property this.parameterName = parameterName; } /** * Returns the name of the parameter used to build the * query string for the anchor that acts as the Controller * for opening and closing nodes. * * @return the name of the parameter */ public String getParameterName() { return parameterName; } /** * Determines whether or not the root node is visible. * * @param rootVisible true if the root node of the tree * is to be displayed */ public void setRootVisible(boolean rootVisible) { this.rootVisible = rootVisible; } /** * Returns true if the root node of the tree is displayed. * * @return true if the root node of the tree is displayed */ public boolean isRootVisible() { return rootVisible; } /** * Sets the number of blank spaces around each hierarchical * level will be indented in relation to its parent node. * * @param indentation the number of blank spaces */ public void setIndentation(int indentation) { this.indentation = indentation; } /** * Returns the number of blank spaces around each * hierarchical level is indented in relation to * its parent node. * * @return the number of blank spaces */ public int getIndentation() { return indentation; } /** * Returns the name of the currently expanded node. * * @return the name of the node */ public String getNodeName() { return displayNode.toString(); } /** * Returns the number of rows that are currently * being displayed. * * @return the number of rows */ public int getRowCount() { // Get level of the node to be displayed int rowCount = displayNode.getLevel(); // Add number of children rowCount = rowCount + displayNode.getChildCount(); // Increment by 1 if the root node is being displayed if (rootVisible) { rowCount++; } // Return number of rows return rowCount; } /** * Sets the icon for displaying open nodes. * * @param openIcon the URI of an image file */ public void setOpenIcon(String openIcon) { this.openIcon = openIcon; } /** * Sets the icon for displaying closed nodes. * * @param closedIcon the URI of an image file */ public void setClosedIcon(String closedIcon) { this.closedIcon = closedIcon; } /** * Sets the icon for displaying leafs. * * @param leafIcon the URI of an image file */ public void setLeafIcon(String leafIcon) { this.leafIcon = leafIcon; } /** * Workaround of a strange behaviour of Netscape and Opera browsers. * In these browsers the relative URL containg only the query string * with the path information (e.g. "?path=0:1") are not * translated correctly into an absoulte URL. By setting a context * path, on which to append the query string, this behaviour should * be fixed. * * @param action the context path of a web resource (e.g. a JSP-File) */ public void setAction(String action) { // Check property if (action == null) { action = ""; } // If the specified context path already contains // a query string, append an ampersand character // for further parameter concatenation if (action.indexOf("=") != -1) { action = action + "&"; } else { action = action + "?"; } // Set property this.action = action; } /** * Constructs a valid XHTML <img>-tag from the specified icon. * Although this method uses the xml-package to generate a valid tag, * the xhtml-package would provide the same functionality. * * @param icon the URI of an image file * @return a valid XHTML <img>-tag */ public String getImg(String icon) { // New XML img = new XML("img",false); // Check specified icon property if (icon == null) { icon = ""; } // Set src attribute img.addAttribute("src",icon); // return return img.toString(); } /** * Expands the tree by following the specified path * and returns the requested node to be displayed. * * @return the requested node to be displayed */ public DefaultMutableTreeNode getRequestedNode() { // Reset node to be displayed displayNode = root; // Iterate trough the path array for (int i = 0; i < pathArray.length; i++) { if (displayNode.getDepth() > 1) { displayNode = (DefaultMutableTreeNode) displayNode.getChildAt(pathArray[i]); } } // Return node to be displayed return displayNode; } /** * Returns the hierarchical structure described in the specified root * node as valid XHTML. For perfomance reasons all parent nodes of the * requested node are collapsed. The source code does not contain any * formatting tags or attributes. I recommend that you use Cascading * Style Sheets instead. For this purpose, the tree elements are marked * with the class attribute values "tree", "parent" * and "child". * *

A sample Style Sheet would look like this:

* *

* * a { color: black; text-decoration: none; }
* a:hover { color: black; text-decoration: underline; }
* img { margin-right: 5px; vertical-align: middle; border: none; }
* table { font: normal 8pt Arial,Helvetica,sans-serif; }
* td.parent { font-weight: bold; }
*
*

* * @return the hierarchical structure within a <table>-tag */ public String getHtml() { // Expand the tree displayNode = getRequestedNode(); // New Table table = new Table(); table.setClass("tree"); // Reset auto indentation int autoIndentation = 0; // Initialize ancestor node with the first child of // the node to be displayed (for parent recursion) TreeNode ancestor = displayNode.getFirstChild(); // Read all ancestors into an array ArrayList list = new ArrayList(); while ((ancestor = ancestor.getParent()) != null) { list.add(ancestor); } // For each ancestor (ordered desc beginning at the root) for (int i = list.size(); i > 0; i--) { // Get current ancestor DefaultMutableTreeNode parent = (DefaultMutableTreeNode)list.get(i-1); // Displays the ancestor if it's not the root // or the rootVisible property is set to true if (!parent.isRoot() || rootVisible) { // New to
TD td = new TD(); td.setClass("parent"); // Generate href for this ancestor (the // level is decreased by one to provide // an anchor to its parent node) String href = action + parameterName + "=" + getPath(parent.getLevel()-1); // Add indentation to for (int j = 0; j < autoIndentation; j++) { td.addElement(" "); } // Add icon with to td.addElement(new A(href,getImg(openIcon))); // Add ancestor with to td.addElement(new NOBR(parent.toString())); // Add to
table.addElement(new TR(td)); // Increment auto indentation autoIndentation = autoIndentation + indentation; } } // For each child for (int i = 0; i < displayNode.getChildCount(); i++) { // New to
TD td = new TD(); td.setClass("child"); // Get current child DefaultMutableTreeNode child = (DefaultMutableTreeNode)displayNode .getChildAt(i); // Generate path == path + child index String autoPath = getPath(child .getLevel()-1) + ":" + i; // Trim leading colon if (autoPath.startsWith(":")) { autoPath = autoPath.substring(1); } // Generate href for this child String href = action + parameterName + "=" + autoPath; // Add indentation to for (int j = 0; j < autoIndentation; j++) { td.addElement(" "); } // New with default leaf icon String img = getImg(leafIcon); // Set closed node icon, if child is not a leaf if (!child.isLeaf()) { img = getImg(closedIcon); } // Add icon with (not for leafs) to if (!child.isLeaf()) { td.addElement(new A(href,img)); } // Add icon without (leafs only) to if (child.isLeaf()) { td.addElement(img); } // Add child with to td.addElement(new NOBR(child.toString())); // Add to
table.addElement(new TR(td)); } // Return
return table.toString(); } /** * Overrides toString() to print something meaningful. * Returns the hierarchical structure described in the specified * root node as valid XHTML. * * @see #getHtml */ public String toString() { return getHtml(); } /** * Creates and returns a sample tree model. Used primarily * during the design of the JavaServerPage to show something * interesting. * * @return a DefaultMutableTreeNode with a sample tree model */ protected static DefaultMutableTreeNode getDefaultTreeModel() { // New root node DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root"); // First level for (int i = 1; i <= 5; i++) { // New node DefaultMutableTreeNode folder = new DefaultMutableTreeNode("Folder-" + i); // Add node to root root.add(folder); // Second level for (int j = 1; j <= 3; j++) { // New node DefaultMutableTreeNode subfolder = new DefaultMutableTreeNode("Subfolder-" + j); // Add node to parent node folder.add(subfolder); // Third level for (int k = 1; k <= 3; k++) { // New anchor A a = new A("http://jakarta.apache.org"); a.setTarget("target").addElement("Document-" + k); // New node (leaf) DefaultMutableTreeNode document = new DefaultMutableTreeNode(a.toString()); // Add node to parent node subfolder.add(document); } } } // Return root node return root; } /** * Returns the specified string encoded into a format suitable for * HTML. All single-quote, double-quote, greater-than, less-than * and ampersand characters are replaced with their corresponding * HTML Character Entity codes. You can use this method to encode * the designated node names before appending this node to your * tree model. Please don't encode node names that already include * a valid tag, because they are equally converted and thus won't * be displayed by the browser. * * @param in the String to encode * @return the encoded String */ public static String encodeToHtml(String in) { // New StringBuffer for output concatenation StringBuffer out = new StringBuffer(); // For each character in the input string for (int i = 0; in != null && i < in.length(); i++) { // Get the current character char c = in.charAt(i); // Encode this character if (c == '\'') { out.append("'"); } else if (c == '\"') { out.append("""); } else if (c == '<') { out.append("<"); } else if (c == '>') { out.append(">"); } else if (c == '&') { out.append("&"); } else { out.append(c); } } // Return encoded string return out.toString(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/FocusEvents.java0000644000175000017500000000740407703353440022644 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require javascript page event attributes. @version $Id: FocusEvents.java,v 1.4 2003/04/27 09:43:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface FocusEvents { /** make sure implementing classes have a setOnFocus method. The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. */ public abstract void setOnFocus(String script); /** make sure implementing classes have a setOnBlur method. The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. */ public abstract void setOnBlur(String script); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/PageEvents.java0000644000175000017500000000730207703353440022436 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require javascript page event attributes. @version $Id: PageEvents.java,v 1.5 2003/04/27 09:42:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface PageEvents { /** make sure implementing classes have a setOnLoad method. The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. */ public abstract void setOnLoad(String script); /** make sure implementing classes have a setOnUnload method. The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. */ public abstract void setOnUnload(String script); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/0000755000175000017500000000000011126246123020315 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbconnect.java0000644000175000017500000001054707703353440024033 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:dbconnect element @author Written by Carol Jones */ public class tsx_dbconnect extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_dbconnect() { super("tsx:dbconnect"); } /** This constructor creates a <tsx:dbconnect> tag. @param id the id="" attribute @param url the url="" attribute @param driver the driver="" attribute @param userid the userid="" attribute @param passwd the passwd="" attribute */ public tsx_dbconnect(String id, String url, String driver, String userid, String passwd) { this(); setId(id); setUrl(url); setDriver(driver); setUserid(userid); setPasswd(passwd); } /** Sets the id="" attribute @param id the id="" attribute */ public tsx_dbconnect setId(String id) { addAttribute("id", id); return this; } /** Sets the url="" attribute @param url the url="" attribute */ public tsx_dbconnect setUrl(String url) { addAttribute("url", url); return this; } /** Sets the driver="" attribute @param driver the driver="" attribute */ public tsx_dbconnect setDriver(String driver) { addAttribute("driver", driver); return this; } /** Sets the userid="" attribute @param userid the userid="" attribute */ public tsx_dbconnect setUserid(String userid) { addAttribute("userid", userid); return this; } /** Sets the passwd="" attribute @param passwd the passwd="" attribute */ public tsx_dbconnect setPasswd(String passwd) { addAttribute("passwd", passwd); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_element.java0000644000175000017500000000647307703353440023506 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; import org.apache.ecs.xml.XML; /** This class creates a generic <> tag. @author Carol Jones */ public class jsp_element extends XML { /** Default constructor */ public jsp_element() { super("", true); } /** Construct a new XML element with this name. @param element_type The name of this element. */ public jsp_element(String element_type) { super(element_type, true); } public boolean getNeedClosingTag() { return elements().hasMoreElements(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_useBean.java0000644000175000017500000001026507703353440023431 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:useBean element @author Written by Carol Jones */ public class jsp_useBean extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_useBean() { super("jsp:useBean"); } /** This constructor creates a <jsp:useBean> tag. @param id the id="" attribute @param scope the scope="" attribute @param class the class="" attribute */ public jsp_useBean(String id, String scope, String c) { this(); setId(id); setScope(scope); set_Class(c); } /** Sets the id="" attribute @param id the id="" attribute */ public jsp_useBean setId(String id) { addAttribute("id", id); return this; } /** Sets the scope="" attribute @param scope the scope="" attribute */ public jsp_useBean setScope(String scope) { addAttribute("scope", scope); return this; } /** Sets the class="" attribute @param class the class="" attribute */ public jsp_useBean set_Class(String c) { addAttribute("class", c); return this; } /** Sets the type="" attribute @param t the type="" attribute */ public jsp_useBean set_Type(String t) { addAttribute("type", t); return this; } /** Sets the beanName="" attribute @param beanName the beanName="" attribute */ public jsp_useBean setBeanName(String beanName) { addAttribute("beanName", beanName); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_include.java0000644000175000017500000000720507703353440023472 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:include element @author Written by Carol Jones */ public class jsp_include extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_include() { super("jsp:include"); } /** This constructor creates a <jsp:include> tag. @param name the page="" attribute */ public jsp_include(String page) { this(); setPage(page); setFlush("true"); } /** Sets the page="" attribute @param page the page="" attribute */ public jsp_include setPage(String page) { addAttribute("page", page); return this; } /** Sets the flush="" attribute @param flush the flush="" attribute */ public jsp_include setFlush(String flush) { addAttribute("flush", flush); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_expression.java0000644000175000017500000000667307703353440024256 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the JSP expression element @author Written by Carol Jones */ public class jsp_expression extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_expression() { super("="); setBeginStartModifier('%'); } /** This constructor creates a <expression> tag. @param scriptlet the code of the scriplet */ public jsp_expression(String scriptlet) { this(); addAttribute(scriptlet, NO_ATTRIBUTE_VALUE); } public boolean getNeedClosingTag() { return false; } public char getBeginEndModifier() { return '%'; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbquery.java0000644000175000017500000001026407703353440023543 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:dbquery element @author Written by Carol Jones */ public class tsx_dbquery extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_dbquery() { super("tsx:dbquery"); } /** This constructor creates a <tsx:dbquery> tag. @param id the id="" attribute @param connection the connection="" attribute @param limit the limit="" attribute */ public tsx_dbquery(String id, String connection, String limit) { this(); setId(id); setConnection(connection); setLimit(limit); } /** This constructor creates a <tsx:dbquery> tag. @param id the id="" attribute @param connection the connection="" attribute */ public tsx_dbquery(String id, String connection) { this(); setId(id); setConnection(connection); } /** Sets the id="" attribute @param id the id="" attribute */ public tsx_dbquery setId(String id) { addAttribute("id", id); return this; } /** Sets the connection="" attribute @param connection the connection="" attribute */ public tsx_dbquery setConnection(String connection) { addAttribute("connection", connection); return this; } /** Sets the limit="" attribute @param limit the limit="" attribute */ public tsx_dbquery setLimit(String limit) { addAttribute("limit", limit); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_forward.java0000644000175000017500000000667207703353440023522 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:forward element @author Written by Carol Jones */ public class jsp_forward extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_forward() { super("jsp:forward"); } /** This constructor creates a <jsp:forward> tag. @param name the page="" attribute */ public jsp_forward(String page) { this(); setPage(page); } /** Sets the page="" attribute @param page the page="" attribute */ public jsp_forward setPage(String page) { addAttribute("page", page); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_setProperty.java0000644000175000017500000000772307703353440024436 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:setProperty element @author Written by Carol Jones */ public class tsx_setProperty extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_setProperty() { super("tsx:setProperty"); } /** This constructor creates a <tsx:setProperty> tag. @param name the name="" attribute @param property the property="" attribute */ public tsx_setProperty(String name, String property, String value) { this(); setName(name); setProperty(property); setValue(value); } /** Sets the name="" attribute @param name the name="" attribute */ public tsx_setProperty setName(String name) { addAttribute("name", name); return this; } /** Sets the property="" attribute @param property the property="" attribute */ public tsx_setProperty setProperty(String property) { addAttribute("property", property); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public tsx_setProperty setValue(String value) { addAttribute("value", value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_setProperty.java0000644000175000017500000000772207703353440024413 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:setProperty element @author Written by Carol Jones */ public class jsp_setProperty extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_setProperty() { super("jsp:setProperty"); } /** This constructor creates a <jsp:setProperty> tag. @param name the name="" attribute @param property the property="" attribute */ public jsp_setProperty(String name, String property, String value) { this(); setName(name); setProperty(property); setValue(value); } /** Sets the name="" attribute @param name the name="" attribute */ public jsp_setProperty setName(String name) { addAttribute("name", name); return this; } /** Sets the property="" attribute @param property the property="" attribute */ public jsp_setProperty setProperty(String property) { addAttribute("property", property); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public jsp_setProperty setValue(String value) { addAttribute("value", value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_repeat.java0000644000175000017500000001011307703353440023341 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:repeat element @author Written by Carol Jones */ public class tsx_repeat extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_repeat() { super("tsx:repeat"); } /** This constructor creates a <tsx:repeat> tag. @param index the index="" attribute @param start the start="" attribute @param end the end="" attribute */ public tsx_repeat(String index, String start, String end) { this(); setIndex(index); setStart(start); setEnd(end); } /** This constructor creates a <tsx:repeat> tag. @param index the index="" attribute */ public tsx_repeat(String index) { this(); setIndex(index); } /** Sets the index="" attribute @param index the index="" attribute */ public tsx_repeat setIndex(String index) { addAttribute("index", index); return this; } /** Sets the start="" attribute @param start the start="" attribute */ public tsx_repeat setStart(String start) { addAttribute("start", start); return this; } /** Sets the end="" attribute @param end the end="" attribute */ public tsx_repeat setEnd(String end) { addAttribute("end", end); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_getProperty.java0000644000175000017500000000736407703353440024423 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:getProperty element @author Written by Carol Jones */ public class tsx_getProperty extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_getProperty() { super("tsx:getProperty"); } /** This constructor creates a <tsx:getProperty> tag. @param name the name="" attribute @param property the property="" attribute */ public tsx_getProperty(String name, String property) { this(); setName(name); setProperty(property); } /** Sets the name="" attribute @param name the name="" attribute */ public tsx_getProperty setName(String name) { addAttribute("name", name); return this; } /** Sets the property="" attribute @param property the property="" attribute */ public tsx_getProperty setProperty(String property) { addAttribute("property", property); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/tsx_dbmodify.java0000644000175000017500000000732007703353440023664 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the tsx:dbmodify element @author Written by Carol Jones */ public class tsx_dbmodify extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public tsx_dbmodify() { super("tsx:dbmodify"); } /** This constructor creates a <tsx:dbmodify> tag. @param id the id="" attribute @param connection the connection="" attribute */ public tsx_dbmodify(String id, String connection) { this(); setId(id); setConnection(connection); } /** Sets the id="" attribute @param id the id="" attribute */ public tsx_dbmodify setId(String id) { addAttribute("id", id); return this; } /** Sets the connection="" attribute @param connection the connection="" attribute */ public tsx_dbmodify setConnection(String connection) { addAttribute("connection", connection); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_scriptlet.java0000644000175000017500000000673207703353440024064 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the JSP scriptlet element @author Written by Carol Jones */ public class jsp_scriptlet extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_scriptlet() { super(" "); setBeginStartModifier('%'); setBeginEndModifier('%'); } /** This constructor creates a <scriptlet> tag. @param scriptlet the code of the scriplet */ public jsp_scriptlet(String scriptlet) { this(); addAttribute(scriptlet, NO_ATTRIBUTE_VALUE); } public boolean getNeedClosingTag() { return false; } public char getBeginEndModifier() { return '%'; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_page.java0000644000175000017500000001260207703353440022760 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:page element @author Written by Carol Jones */ public class jsp_page extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_page() { super("jsp:page"); } /** This constructor creates a <jsp:page> tag. @param language the language="" attribute @param session the session="" attribute @param buffer the buffer="" attribute @param autoFlush the autoFlush="" attribute @param isThreadSafe the isThreadSafe="" attribute @param isErrorPage the isErrorPage="" attribute @param contentType the contentType="" attribute @param charset the charset="" attribute */ public jsp_page(String language, String session, String buffer, String autoFlush, String isThreadSafe, String isErrorPage, String contentType, String charset) { this(); setLanguage(language); setSession(session); setBuffer(buffer); setAutoFlush(autoFlush); setIsThreadSafe(isThreadSafe); setIsErrorPage(isErrorPage); setContentType(contentType); setCharset(charset); } /** Sets the language="" attribute @param language the language="" attribute */ public jsp_page setLanguage(String language) { addAttribute("language", language); return this; } /** Sets the session="" attribute @param session the session="" attribute */ public jsp_page setSession(String session) { addAttribute("session", session); return this; } /** Sets the buffer="" attribute @param buffer the buffer="" attribute */ public jsp_page setBuffer(String buffer) { addAttribute("buffer", buffer); return this; } /** Sets the autoFlush="" attribute @param autoFlush the autoFlush="" attribute */ public jsp_page setAutoFlush(String autoFlush) { addAttribute("autoFlush", autoFlush); return this; } /** Sets the isThreadSafe="" attribute @param isThreadSafe the isThreadSafe="" attribute */ public jsp_page setIsThreadSafe(String isThreadSafe) { addAttribute("isThreadSafe", isThreadSafe); return this; } /** Sets the isErrorPage="" attribute @param isErrorPage the isErrorPage="" attribute */ public jsp_page setIsErrorPage(String isErrorPage) { addAttribute("isErrorPage", isErrorPage); return this; } /** Sets the contentType="" attribute @param contentType the contentType="" attribute */ public jsp_page setContentType(String contentType) { addAttribute("contentType", contentType); return this; } /** Sets the charset="" attribute @param charset the charset="" attribute */ public jsp_page setCharset(String charset) { addAttribute("charset", charset); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/jsp/jsp_getProperty.java0000644000175000017500000000736307703353440024400 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.jsp; /** This class implements the jsp:getProperty element @author Written by Carol Jones */ public class jsp_getProperty extends jsp_element { /** Basic constructor. You need to set the attributes using the set* methods. */ public jsp_getProperty() { super("jsp:getProperty"); } /** This constructor creates a <jsp:getProperty> tag. @param name the name="" attribute @param property the property="" attribute */ public jsp_getProperty(String name, String property) { this(); setName(name); setProperty(property); } /** Sets the name="" attribute @param name the name="" attribute */ public jsp_getProperty setName(String name) { addAttribute("name", name); return this; } /** Sets the property="" attribute @param property the property="" attribute */ public jsp_getProperty setProperty(String property) { addAttribute("property", property); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ECSDefaults.java0000644000175000017500000002511407703353440022500 0ustar killerkillerpackage org.apache.ecs; /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ import java.util.ResourceBundle; /** This class is responsible for loading the ecs.properties file and getting the default settings for ECS. This allows you to edit a simple text file instead of having to edit the .java files and recompile. The property file can be specified via the 'ecs.properties' system property. For example, java -Decs.properties="my.ecs.properties". If ecs.properties is null then the standard ecs.properties resource in the ECS jar is used. If the property file cannot be loaded, a message is printed to standard error and hard-coded defaults are used instead. @version $Id: ECSDefaults.java,v 1.5 2003/04/27 09:43:24 rdonkin Exp $ */ public final class ECSDefaults { /** This singleton allows the properties to gracefully default in the case of an error. */ private static ECSDefaults defaults = new ECSDefaults(); // now follows the private methods called by the private ResourceBundle resource; // assign original default values in case the props can't be loaded. private boolean filter_state =false; private boolean filter_attribute_state = false; private char attribute_equality_sign = '='; private char begin_start_modifier = ' '; private char end_start_modifier = ' '; private char begin_end_modifier = ' '; private char end_end_modifier = ' '; private char attribute_quote_char = '\"'; private boolean attribute_quote = true; private boolean end_element = true; private String codeset = "UTF-8"; private int position = 4; private int case_type = 3; private char start_tag = '<'; private char end_tag = '>'; private boolean pretty_print = false; /** Should we filter the value of <>VALUE</> */ public static boolean getDefaultFilterState() { return defaults.filter_state; } /** Should we filter the value of the element attributes */ public static boolean getDefaultFilterAttributeState() { return defaults.filter_attribute_state; } /** What is the equality character for an attribute. */ public static char getDefaultAttributeEqualitySign() { return defaults.attribute_equality_sign; } /** What the start modifier should be */ public static char getDefaultBeginStartModifier() { return defaults.begin_start_modifier; } /** What the start modifier should be */ public static char getDefaultEndStartModifier() { return defaults.end_start_modifier; } /** What the end modifier should be */ public static char getDefaultBeginEndModifier() { return defaults.begin_end_modifier; } /** What the end modifier should be */ public static char getDefaultEndEndModifier() { return defaults.end_end_modifier; } /* What character should we use for quoting attributes. */ public static char getDefaultAttributeQuoteChar() { return defaults.attribute_quote_char; } /* Should we wrap quotes around an attribute? */ public static boolean getDefaultAttributeQuote() { return defaults.attribute_quote; } /** Does this element need a closing tag? */ public static boolean getDefaultEndElement() { return defaults.end_element; } /** What codeset are we going to use the default is UTF-8. */ public static String getDefaultCodeset() { return defaults.codeset; } /** Position of tag relative to start and end. */ public static int getDefaultPosition() { return defaults.position; } /** Default value to set case type */ public static int getDefaultCaseType() { return defaults.case_type; } /** Default start-of-tag character. */ public static char getDefaultStartTag() { return defaults.start_tag; } /** Default end-of-tag character. */ public static char getDefaultEndTag() { return defaults.end_tag; } /** Should we print html in a more readable format? */ public static boolean getDefaultPrettyPrint() { return defaults.pretty_print; } /** This private constructor is used to create the singleton used in the public static methods. */ private ECSDefaults () { try { // if the ecs.properties system property is set, use that String props=System.getProperty("ecs.properties"); if (props==null) { resource = ResourceBundle.getBundle("org.apache.ecs.ecs"); } else { resource = new java.util.PropertyResourceBundle(new java.io.FileInputStream(props)); } // set up variables filter_state = new Boolean(resource.getString("filter_state")).booleanValue(); filter_attribute_state = new Boolean(resource.getString("filter_attribute_state")).booleanValue(); attribute_equality_sign = resource.getString("attribute_equality_sign").charAt(1); begin_start_modifier = resource.getString("begin_start_modifier").charAt(1); end_start_modifier = resource.getString("end_start_modifier").charAt(1); begin_end_modifier = resource.getString("begin_end_modifier").charAt(1); end_end_modifier = resource.getString("end_end_modifier").charAt(1); attribute_quote_char = resource.getString("attribute_quote_char").charAt(0); attribute_quote = new Boolean(resource.getString("attribute_quote")).booleanValue(); end_element = new Boolean(resource.getString("end_element")).booleanValue(); codeset = resource.getString("codeset"); position = Integer.parseInt(resource.getString("position")); case_type = Integer.parseInt(resource.getString("case_type")); start_tag = resource.getString("start_tag").charAt(0); end_tag = resource.getString("end_tag").charAt(0); pretty_print = new Boolean(resource.getString("pretty_print")).booleanValue(); } catch(Exception e) { System.err.println("The following error preventing " + "ecs.properties being loaded:"); System.err.println(e.toString()); } } /** This method returns a string showing the current values. */ public static String debugString() { return "ECSDefaults:" + '\n' + '\t' + "DefaultFilterState=" + getDefaultFilterState() +'\n' + '\t' + "DefaultFilterAttributeState=" + getDefaultFilterAttributeState() +'\n' + '\t' + "DefaultAttributeEqualitySign='" + getDefaultAttributeEqualitySign() +"'\n" + '\t' + "DefaultBeginStartModifier='" + getDefaultBeginStartModifier() + "'\n" + '\t' + "DefaultEndStartModifier='" + getDefaultEndStartModifier() + "'\n" + '\t' + "DefaultBeginEndModifier='" + getDefaultBeginEndModifier() + "'\n" + '\t' + "DefaultEndEndModifier='" + getDefaultEndEndModifier() + "'\n" + '\t' + "DefaultAttributeQuoteChar=" + getDefaultAttributeQuoteChar() + '\n' + '\t' + "DefaultAttributeQuote=" + getDefaultAttributeQuote() +'\n' + '\t' + "DefaultEndElement=" + getDefaultEndElement() +'\n' + '\t' + "DefaultCodeset='" + getDefaultCodeset() + "'\n" + '\t' + "DefaultPosition=" + getDefaultPosition() +'\n' + '\t' + "DefaultCaseType=" + getDefaultCaseType() +'\n' + '\t' + "DefaultStartTag='" + getDefaultStartTag() + "'\n" + '\t' + "DefaultEndTag='" + getDefaultEndTag() + "'\n" + '\t' + "DefaultPrettyPrint=" + getDefaultPrettyPrint(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ecs.properties0000644000175000017500000000046307703353440022423 0ustar killerkillerfilter_state=false filter_attribute_state=false attribute_equality_sign="=" begin_start_modifier=" " end_start_modifier=" " begin_end_modifier=" " end_end_modifier=" " attribute_quote_char=" attribute_quote=true end_element=true codeset=UTF-8 position=4 case_type=3 start_tag=< end_tag=> pretty_print=false jakarta-ecs-1.4.2/src/java/org/apache/ecs/ElementAttributes.java0000644000175000017500000003644007703353440024042 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.util.Enumeration; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.ByteArrayOutputStream; import java.io.BufferedOutputStream; /** This class provides a common set of attributes set* methods for all classes. It is abstract to prevent direct instantiation. @version $Id: ElementAttributes.java,v 1.15 2003/05/02 09:53:58 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public abstract class ElementAttributes extends GenericElement implements Attributes { /** Basic Constructor. */ public ElementAttributes() { } /** Filter to use to escape attribute input @serial attribute_filter attribute_filter */ private Filter attribute_filter = getFilter(); // By default the attribute filter and the element filter are the same. /** Should we filter the value of the element attributes @serial filter_attribute_state filter_attribute_state */ private boolean filter_attribute_state = ECSDefaults.getDefaultFilterAttributeState(); /** What is the equality character for an attribute. @serial attribute_equality_sign attribute_equality_sign */ private char attribute_equality_sign = ECSDefaults.getDefaultAttributeEqualitySign(); /** What character should we use for quoting attributes. @serial attribute_quote_char attribute_quote_char */ private char attribute_quote_char = ECSDefaults.getDefaultAttributeQuoteChar(); /** Should we wrap quotes around an attribute? @serial attribute_quote attribute_quote */ private boolean attribute_quote = ECSDefaults.getDefaultAttributeQuote(); /** Set the character used to quote attributes. @param quote_char character used to quote attributes */ public Element setAttributeQuoteChar(char quote_char) { attribute_quote_char = quote_char; return(this); } /** Get the character used to quote attributes. */ public char getAttributeQuoteChar() { return(attribute_quote_char); } /** Set the equality sign for an attribute. @param equality_sign The equality sign used for attributes. */ public Element setAttributeEqualitySign(char equality_sign) { attribute_equality_sign = equality_sign; return(this); } /** Get the equality sign for an attribute. */ public char getAttributeEqualitySign() { return(attribute_equality_sign); } /* Do we surround attributes with qoutes? */ public boolean getAttributeQuote() { return(attribute_quote); } /** Set wether or not we surround the attributes with quotes. */ public Element setAttributeQuote(boolean attribute_quote) { this.attribute_quote = attribute_quote; return(this); } /** Set the element id for Cascading Style Sheets. */ public Element setID(String id) { addAttribute("id",id); return(this); } /** Set the element class for Cascading Style Sheets. */ public Element setClass(String element_class) { addAttribute("class",element_class); return(this); } /** Sets the LANG="" attribute @param lang the LANG="" attribute */ public Element setLang(String lang) { addAttribute("lang",lang); return(this); } /** Sets the STYLE="" attribute @param style the STYLE="" attribute */ public Element setStyle(String style) { addAttribute("style",style); return(this); } /** Sets the DIR="" attribute @param dir the DIR="" attribute */ public Element setDir(String dir) { addAttribute("dir",dir); return(this); } /** Sets the TITLE="" attribute @param title the TITLE="" attribute */ public Element setTitle(String title) { addAttribute("title",title); return(this); } /** Find out if we want to filter the elements attributes or not. */ public boolean getAttributeFilterState() { return(filter_attribute_state); } /** Tell the element if we want to filter its attriubtes. @param filter_attribute_state do we want to filter the attributes of this element? */ public Element setAttributeFilterState(boolean filter_attribute_state) { this.filter_attribute_state = filter_attribute_state; return(this); } /** Set up a new filter for all element attributes. @param Filter the filter we want to use for element attributes. By
default it is the same as is used for the value of the tag. It is assumed
that if you create a new filter you must want to use it. */ public Element setAttributeFilter(Filter attribute_filter) { filter_attribute_state = true; // If your setting up a filter you must want to filter. this.attribute_filter = attribute_filter; return(this); } /** Get the filter for all element attributes. @param Filter the filter we want to use for element attributes. By
default it is the same as is used for the value of the tag. It is assumed
that if you create a new filter you must want to use it. */ public Filter getAttributeFilter() { return(this.attribute_filter); } /** Add an attribute to the element. */ public Element addAttribute(String attribute_name, Object attribute_value) { getElementHashEntry().put(attribute_name, attribute_value); return(this); } /** Add an attribute to the element. */ public Element addAttribute(String attribute_name, int attribute_value) { getElementHashEntry().put(attribute_name, new Integer(attribute_value)); return(this); } /** Add an attribute to the element. */ public Element addAttribute(String attribute_name, String attribute_value) { getElementHashEntry().put(attribute_name, attribute_value); return(this); } /** Add an attribute to the element. */ public Element addAttribute(String attribute_name, Integer attribute_value) { getElementHashEntry().put(attribute_name, attribute_value); return(this); } /** remove an attribute from the element */ public Element removeAttribute(String attribute_name) { try { getElementHashEntry().remove(attribute_name); } catch ( Exception e ) { } return(this); } /** does the element have a particular attribute? */ public boolean hasAttribute(String attribute) { return(getElementHashEntry().containsKey(attribute)); } /** Return a list of the attributes associated with this element. */ public Enumeration attributes() { return getElementHashEntry().keys(); } /** * Return the specified attribute. * @param attribute The name of the attribute to fetch */ public String getAttribute(String attribute) { return (String)getElementHashEntry().get(attribute); } /** This method overrides createStartTag() in Generic Element. It provides a way to print out the attributes of an element. */ public String createStartTag() { StringBuffer out = new StringBuffer(); out.append(getStartTagChar()); if(getBeginStartModifierDefined()) { out.append(getBeginStartModifier()); } out.append(getElementType()); Enumeration enum = getElementHashEntry().keys(); String value = null; // avoid creating a new string object on each pass through the loop while (enum.hasMoreElements()) { String attr = (String) enum.nextElement(); if(getAttributeFilterState()) { value = getAttributeFilter().process(getElementHashEntry().get(attr).toString()); } else { Object valueObj = getElementHashEntry().get(attr); if (valueObj == null) { return null; } value = valueObj.toString(); } out.append(' '); out.append(alterCase(attr)); int iStartPos = out.length(); if ( !value.equalsIgnoreCase(NO_ATTRIBUTE_VALUE) ) { // we have a value // we might still enclose in quotes boolean quoteThisAttribute = attribute_quote; int singleQuoteFound = 0; int doubleQuoteFound = 0; if ( value.length() == 0 ) { // quote a null string quoteThisAttribute = true; } for ( int ii = 0; ii < value.length(); ii++ ) { char c = value.charAt( ii ); if ( 'a' <= c && c <= 'z' ) { continue; } if ( 'A' <= c && c <= 'Z' ) { continue; } if ( '0' <= c && c <= '9' ) { continue; } if ( c == ':' || c == '-' || c == '_' || c == '.' ) { continue; } if ( c == '\'' ) { singleQuoteFound++; } if ( c == '"' ) { doubleQuoteFound++; } quoteThisAttribute = true; } out.append( getAttributeEqualitySign() ); if ( !quoteThisAttribute ) { // no need to append quotes out.append( value ); } else { // use single quotes if possible if ( singleQuoteFound == 0 ) { // no single quotes, safe to use them to quote out.append( '\'' ); out.append( value ); out.append( '\'' ); } else if ( doubleQuoteFound == 0 ) { // no double quotes, safe to use them to quote out.append( '"' ); out.append( value ); out.append( '"' ); } else if ( singleQuoteFound <= doubleQuoteFound ) { // use single quotes, convert embedded single quotes out.append( '\'' ); int startPos = out.length(); out.append( value ); for ( int ii = startPos; ii < out.length(); ii++ ) { // note out.length() may change during processing if ( out.charAt( ii ) == '\'' ) { out.setCharAt( ii, '&'); out.insert( ii+1, "#39;" ); ii++; } } out.append( '\'' ); } else { // use double quotes, convert embedded double quotes out.append( '"' ); int startPos = out.length(); out.append( value ); for ( int ii = startPos; ii < out.length(); ii++ ) { // note out.length() may change during processing if ( out.charAt( ii ) == '"' ) { out.setCharAt( ii, '&'); out.insert( ii+1, "#34;" ); ii++; } } out.append( '"' ); } } } } if(getBeginEndModifierDefined()) { out.append(getBeginEndModifier()); } out.append(getEndTagChar()); return(out.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/0000755000175000017500000000000011126246123020321 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/package.html0000644000175000017500000000001707703353440022607 0ustar killerkiller jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/XMLDocument.java0000644000175000017500000003062007703353440023333 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xml; import java.io.Serializable; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.*; import org.apache.ecs.MultiPartElement; import org.apache.ecs.ConcreteElement; import org.apache.ecs.xml.XML; import org.apache.ecs.xml.PI; /** * XMLDocument * * This is the container for XML elements that can be used similar to * org.apache.ecs.Document. However, it correctly handles XML elements * and doesn't have any notion of a head, body, etc., that is associated * with HTML documents. * * @author Brett McLaughlin */ public class XMLDocument implements Serializable, Cloneable { /** Default Version */ private static final float DEFAULT_XML_VERSION = 1.0f; /** Version Declaration - FIXME!! */ private String versionDecl; /** Prolog */ private Vector prolog; /** "Body" of document */ private XML content; /** @serial codeset codeset */ private String codeset = null; /** * This sets the document up. Since an XML document can be * pretty much anything you want, all it does is create an * XML Instruction for the default version and sets the * document to be standalone. */ public XMLDocument() { this(DEFAULT_XML_VERSION, true); } /** * This sets the document up. Since an XML document can * be pretty much anything, all this does is create the * XML Instruction for the version specified and set the * document to be standalone. * * @param version - version of XML this document is */ public XMLDocument(double version) { this(version, true); } /** * This sets the document up. Since an XML document can be * pretty much anything, all this does is create the * XML Instruction with the version specified, and * identifies the document as standalone if set * * @param version - version of XML document is * @param standalone - boolean: true if standalone, else false */ public XMLDocument(double version, boolean standalone) { prolog = new Vector(2); StringBuffer versionStr = new StringBuffer(); versionStr.append(""); else versionStr.append("no\"?>\n"); this.versionDecl = versionStr.toString(); /** * FIXME: ECS currently does not do any ordering of attributes. * Although about 99% of the time, this has no problems, * in the initial XML declaration, it can be a problem in * certain frameworks (e.g. Cocoon/Xerces/Xalan). So instead * of adding an element here, we have to store this first command * in a String and add it to the output at output time. */ /** PI versionDecl = new PI().setTarget("xml"); if (standalone) versionDecl.addInstruction("standalone", "yes"); else versionDecl.addInstruction("standalone", "no"); versionDecl.setVersion(version); prolog.addElement(versionDecl); */ } /** * This sets the document up. Since an XML document can be * pretty much anything, all this does is create the * XML Instruction with the version specified, and * identifies the document as standalone if set. This also * allows the codeset to be set as well. * * @param version - version of XML document is * @param standalone - boolean: truetext/xsl type. * * @param href = String reference to stylesheet */ public XMLDocument addStylesheet(String href) { return addStylesheet(href, "text/xsl"); } /** * This adds the specified element to the prolog of the document * * @param element - Element to add */ public XMLDocument addToProlog(ConcreteElement element) { prolog.addElement(element); return(this); } /** * This adds an element to the XML document. If the * document is empty, it sets the passed in element * as the root element. * * @param element - XML Element to add * @return XMLDocument - modified document */ public XMLDocument addElement(XML element) { if (content == null) content = element; else content.addElement(element); return(this); } /** * Write the document to the OutputStream * * @param out - OutputStream to write to */ public void output(OutputStream out) { /** * FIXME: The other part of the version hack! * Add the version declaration to the beginning of the document. */ try { out.write(versionDecl.getBytes()); } catch (Exception e) { } for (int i=0; i. * */ package org.apache.ecs.xml; import org.apache.ecs.ConcreteElement; import org.apache.ecs.Element; import org.apache.ecs.Printable; public class PI extends ConcreteElement implements Printable { // Private initializer { setBeginStartModifier('?'); setBeginEndModifier('?'); setNeedClosingTag(false); setElementType("xml"); } public PI() { } /** Set the version of this document. @param version the version of this document. */ public PI setVersion(String version) { addAttribute("version",version); return(this); } /** Set the version of this document. @param version the version of this document. */ public PI setVersion(float version) { setVersion(Float.toString(version)); return(this); } /** Set the version of this document. @param version the version of this document. */ public PI setVersion(double version) { setVersion(Double.toString(version)); return(this); } /** Sets the target of this document. It is used to identigy the application to which the instruction is directed. @param target The target application. */ public PI setTarget(String target) { setElementType(target); return(this); } /** * Add an additional instruction (which works like an XML * attribute) to the PI * * @param name - Name of instruction (e.g. standalone) * @param value - value of instruction (e.g. "no") */ public PI addInstruction(String name, String value) { addAttribute(name, value); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public PI addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public PI addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public PI addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public PI addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public PI removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xml/XML.java0000644000175000017500000001656607703353440021651 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */package org.apache.ecs.xml; import org.apache.ecs.*; /** This class creates a generic <> tag. @version $Id: XML.java,v 1.4 2003/04/27 09:28:14 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class XML extends MultiPartElement implements Printable { /** Default constructor use set* Methods. With this name. @param element_type The name of this element. */ public XML(String element_type) { setElementType(element_type); } /** Construct a new XML element with this name,
and specify if it needs the element tag closed. @param element_type The name of this element. @param close Should it have a closing tag */ public XML(String element_type,boolean close) { setElementType(element_type); setNeedClosingTag(close); } /** Construct a new XML element with this name, and specify a filter for it. @param element_type The name of this element. @param filter a new Filter for this element override the default. */ public XML(String element_type,Filter filter) { setElementType(element_type); setFilter(filter); } /** Construct a new XML element with this name, and specify a filter for it. @param element_type The name of this element. @param close Should it have a closing tag @param filter Should this element be filtered? */ public XML(String element_type,boolean close,boolean filter) { setElementType(element_type); setNeedClosingTag(close); setFilterState(filter); } /** Construct a new XML element with this name, and specify a filter for it. @param element_type The name of this element. @param close Should it have a closing tag @param filter a new Filter for this element override the default. */ public XML(String element_type,boolean close,Filter filter) { setElementType(element_type); setNeedClosingTag(close); setFilter(filter); } /** Add a new attribute to this XML tag. @param attribute the attribute name @param attribute_value the value of the attribute set this to
"ECS_NO_ATTRIBUTE_VALUE" if this attribute
doesn't take a value. */ public XML addXMLAttribute(String attribute, String attribute_value) { addAttribute(attribute,attribute_value); return(this); } /** Add an element to the valuie of <>VALUE</> @param element the value of <>VALUE</> */ public XML addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public XML addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public XML addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the valuie of <>VALUE</> @param element the value of <>VALUE</> */ public XML addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public XML removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } public boolean getNeedLineBreak() { boolean linebreak = true; java.util.Enumeration enum = elements(); // if this tag has one child, and it's a String, then don't // do any linebreaks to preserve whitespace while (enum.hasMoreElements()) { Object obj = enum.nextElement(); if (obj instanceof StringElement) { linebreak = false; break; } } return linebreak; } public boolean getBeginEndModifierDefined() { boolean answer = false; if (! this.getNeedClosingTag()) answer = true; return answer; } public char getBeginEndModifier() { return '/'; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/0000755000175000017500000000000011126246123020655 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/noscript.java0000644000175000017500000002033107703353440023367 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <noscript> tag. @version $Id: noscript.java,v 1.2 2003/04/27 09:37:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class noscript extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("noscript"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public noscript() { } /** Basic constructor. @param element Adds an Element to the element. */ public noscript(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public noscript(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public noscript addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public noscript addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public noscript addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public noscript addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public noscript removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/link.java0000644000175000017500000002237407703353440022474 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <link> tag. @version $Id: link.java,v 1.2 2003/04/27 09:39:11 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class link extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("link"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. You need to set the attributes using the set* methods. */ public link() { } public link setHref(String href) { addAttribute("href",href); return this; } /** Sets the target="" attribute @param target the target="" attribute */ public link setTarget(String target) { addAttribute("target",target); return this; } /** Sets the rel="" attribute @param rel the rel="" attribute */ public link setRel(String rel) { addAttribute("rel",rel); return this; } /** Sets the rev="" attribute @param rev the rev="" attribute */ public link setRev(String rev) { addAttribute("rev",rev); return this; } /** Sets the charset="" attribute @param charset the charset="" attribute */ public link setCharset(String charset) { addAttribute("charset",charset); return this; } /** Sets the type="" attribute @param type set the mime type of this link */ public link setType(String type) { addAttribute("type",type); return this; } /** Sets the media="" attribute @param media the media="" attribute */ public link setMedia(String media) { addAttribute("media",media); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public link addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public link addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public link addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public link addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public link removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/i.java0000644000175000017500000002020507703353440021756 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <i> tag. @version $Id: i.java,v 1.2 2003/04/27 09:39:23 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class i extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("i"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public i() { } /** Basic constructor. @param element Adds an Element to the element. */ public i(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public i(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public i addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public i addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public i addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public i addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public i removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/img.java0000644000175000017500000003002707703353441022306 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <img> tag. @version $Id: img.java,v 1.2 2003/04/27 09:39:23 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class img extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("img"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. Use the set* methods to set the attibutes. */ public img() { } /** Creates an img tag @param src the src="" attribute */ public img(String src) { setSrc(src); } /** Creates an img tag @param src the src="" attribute @param border the border="" attribute */ public img(String src, int border) { setSrc(src); setBorder(border); } /** Creates an img tag @param src the src="" attribute @param name the name="" attribute */ public img(String src, String name) { setSrc(src); setName(name); } /** Creates an img tag @param src the src="" attribute @param name the name="" attribute @param border the border="" attribute */ public img(String src, String name, int border) { setSrc(src); setName(name); setBorder(border); } /** Sets the src="" attribute @param src the src="" attribute */ public img setSrc(String src) { addAttribute("src",src); return this; } /** Sets the border="" attribute @param border the border="" attribute */ public img setBorder(int border) { addAttribute("border",Integer.toString(border)); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public img setName(String name) { addAttribute("name",name); return this; } /** Sets the height="" attribute @param height the height="" attribute */ public img setHeight(String height) { addAttribute("height",height); return this; } /** Sets the height="" attribute @param height the height="" attribute */ public img setHeight(int height) { addAttribute("height",Integer.toString(height)); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public img setWidth(String width) { addAttribute("width",width); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public img setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the alt="" attribute @param alt the alt="" attribute */ public img setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the ismap attribute @param ismap the ismap attribute */ public img setIsMap(boolean ismap) { if(ismap == true) addAttribute("ismap","ismap"); else removeAttribute("ismap"); return this; } /** Sets the usmap="" attribute @param usemap the usmap="" attribute */ public img setUseMap(String usemap) { addAttribute("usemap",usemap); return this; } /** Sets the align="" attribute @param align the align="" attribute */ public img setAlign(String align) { addAttribute("align",align); return this; } /** Sets the hspace="" attribute @param hspace the hspace="" attribute */ public img setHspace(String hspace) { addAttribute("hspace",hspace); return this; } /** Sets the hspace="" attribute @param hspace the hspace="" attribute */ public img setHspace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return this; } /** Sets the vspace="" attribute @param vspace the vspace="" attribute */ public img setVspace(String vspace) { addAttribute("vspace",vspace); return this; } /** Sets the vspace="" attribute @param vspace the vspace="" attribute */ public img setVspace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public img addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public img addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public img addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public img addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public img removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/ul.java0000644000175000017500000002132507703353441022153 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <ul> tag. @version $Id: ul.java,v 1.2 2003/04/27 09:36:37 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class ul extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("ul"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor, use the set* methods. */ public ul() { } /** Basic constructor, use the set* methods. @param list an array of li elements. */ public ul(li[] list) { addElement(list); } /** Basic constructor, use the set* methods. @param list an array of string elements to be converted to li. */ public ul(String[] list) { addElement(list); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Add a list to the ul @param list a list of li objects. */ public ul addElement(li[] list) { for(int x = 0; x < list.length; x++) { addElement(list[x]); } return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ul addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ul addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ul addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ul addElement(String element) { addElementToRegistry(element); return(this); } /** Add a list to the ul @param list a list of Strings to be converted to li objects. */ public ul addElement(String[] element) { li[] li = new li().addElement(element); addElement(li); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ul removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/div.java0000644000175000017500000002052207703353440022312 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <div> tag. @version $Id: div.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class div extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("div"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public div() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <div>value</div> */ public div(String value) { addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <div>value</div> */ public div(span element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public div addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public div addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public div addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public div addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public div removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/caption.java0000644000175000017500000002014207703353440023163 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <caption> tag. @version $Id: caption.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class caption extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("caption"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic construtor use set* methods. */ public caption() { } /** Set the align="" attribute. @param align set the align="" attribute */ public caption setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public caption addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public caption addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public caption addElement(String element) { addElementToRegistry(Integer.toString(element.hashCode()),element); return(this); } /** Add an element to the element @param element an element to add */ public caption addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public caption removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/area.java0000644000175000017500000003036107703353440022442 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <area> tag. @version $Id: area.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class area extends SinglePartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { public static final String DEFAULT = "default"; public static final String rect = "rect"; public static final String circle = "circle"; public static final String poly = "poly"; /** Private initialization routine. */ { setElementType("area"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); setNoHref(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public area() { } /** Use the set* methods to set the values of the attributes. @param shape the shape="" attribute */ public area(String shape) { setShape(shape); } /** Use the set* methods to set the values of the attributes. @param shape the shape="" attribute @param coords the coords="" attribute */ public area(String shape, String coords) { setShape(shape); setCoords(coords); } /** Use the set* methods to set the values of the attributes. @param shape the shape="" attribute @param coords the coords="" attribute */ public area(String shape, int[] coords) { setShape(shape); setCoords(coords); } /** Use the set* methods to set the values of the attributes. @param shape the shape="" attribute @param coords the coords="" attribute @param href the href="" attribute */ public area(String shape, String coords, String href) { setShape(shape); setCoords(coords); setHref(href); } /** Use the set* methods to set the values of the attributes. @param shape the shape="" attribute @param coords the coords="" attribute @param href the href="" attribute */ public area(String shape, int[] coords, String href) { setShape(shape); setCoords(coords); setHref(href); } /** Sets the shape="" attribute @param shape the shape="" attribute */ public area setShape(String shape) { addAttribute("shape",shape); return this; } /** Sets the coords="" attribute @param coords the coords="" attribute */ public area setCoords(String coords) { addAttribute("coords",coords); return this; } /** Sets the coords="" attribute @param coords the coords="" attribute */ public area setCoords(int[] coords) { addAttribute("coords", coords[0] + "," + coords[1] + "," + coords[2] + "," + coords[3]); return this; } /** Sets the href="" attribute @param href the href="" attribute */ public area setHref(String href) { addAttribute("href",href); setNoHref(false); return this; } /** Sets the alt="" attribute @param alt the alt="" attribute */ public area setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public area setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public area setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the nohref @param href true or false */ public area setNoHref(boolean href) { if ( href == true ) addAttribute("nohref", "nohref"); else removeAttribute("nohref"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public area addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public area addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public area addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public area addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public area removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/comment.java0000644000175000017500000001525407703353441023201 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.ByteArrayOutputStream; import java.io.BufferedOutputStream; import java.util.Enumeration; import java.util.Vector; import org.apache.ecs.storage.Hash; /** This class defines a comment <-- value --> Element. @version $Id: comment.java,v 1.3 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class comment extends MultiPartElement implements Printable { /** private initializer. */ { setElementType("--"); setCase(LOWERCASE); setAttributeQuote(true); setBeginStartModifier('!'); } /** Default constructor use set* methods. */ public comment() { } /** Create a comment object containg this element. */ public comment(String element) { addElement(element); } /** Create a comment object containg this element. */ public comment(Element element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public comment addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public comment addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public comment addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public comment addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public comment removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } public String createStartTag() { setEndTagChar(' '); StringBuffer out = new StringBuffer(); out.append(getStartTagChar()); if(getBeginStartModifierDefined()) { out.append(getBeginStartModifier()); } out.append(getElementType()); if(getBeginEndModifierDefined()) { out.append(getBeginEndModifier()); } out.append(getEndTagChar()); setEndTagChar('>'); // put back the end tag character. return(out.toString()); } public String createEndTag() { StringBuffer out = new StringBuffer(); setStartTagChar(' '); setEndStartModifier(' '); out.append(getStartTagChar()); if(getEndStartModifierDefined()) { out.append(getEndStartModifier()); } out.append(getElementType()); if(getEndEndModifierDefined()) { out.append(getEndEndModifier()); } out.append(getEndTagChar()); setStartTagChar('<'); // put back the tag start character return(out.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/dd.java0000644000175000017500000002003107703353440022112 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <dd> tag. @version $Id: dd.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class dd extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dd"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use setValue() if needed. */ public dd() { } /** Sets the value after the <dd> tag @param value the value after the <dd> tag */ public dd(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dd addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dd addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dd addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dd addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public dd removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/p.java0000644000175000017500000002137007703353440021771 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <p> tag.

The HTML <P> tag defaults to not having a closing </P> because it is optional in the spec. In XHTML this is not allowed, so ending </p> is enforced. @version $Id: p.java,v 1.2 2003/04/27 09:38:05 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class p extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("p"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public p() { } /** Use the set* methods to set the values of the attributes. @param align set the value of align="" */ public p(String align) { setAlign(align); } /** Use the set* methods to set the values of the attributes. @param align set the value of align="" @param value set the text after the <P> tag */ public p(String value, String align) { setAlign(align); addElement(value); } /** Sets the align="" attribute @param align the align="" attribute */ public p setAlign(String align) { addAttribute("align",align); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public p addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public p addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public p addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public p addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public p removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/thead.java0000644000175000017500000002423207703353440022617 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <thead> object. @version $Id: thead.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class thead extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("thead"); setCase(LOWERCASE); setAttributeQuote(true); } public thead() { } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public thead setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public thead setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public thead setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public thead setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public thead setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public thead setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public thead setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off when present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public thead setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public thead setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public thead addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public thead addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public thead addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public thead addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public thead removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/iframe.java0000644000175000017500000002366207703353440023003 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <iframe> tag. @version $Id: iframe.java,v 1.2 2003/04/27 09:39:23 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class iframe extends MultiPartElement implements Printable { public final static String yes = "yes"; public final static String no = "no"; public final static String auto = "auto"; /** Private initialization routine. */ { setElementType("iframe"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public iframe() { } /** Basic constructor. @param element Adds an Element to the element. */ public iframe(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public iframe(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute */ public iframe(Element element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute */ public iframe(String element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute @param src the src="" attribute */ public iframe(Element element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute @param src the src="" attribute */ public iframe(String element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Sets the longdesc="" attribute @param longdesc the longdesc="" attribute */ public iframe setLongDesc(String longdesc) { addAttribute("longdesc",longdesc); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public iframe setName(String name) { addAttribute("name",name); return this; } /** Sets the src="" attribute @param src the src="" attribute */ public iframe setSrc(String src) { addAttribute("src",src); return this; } /** Sets the frameborder="" attribute @param frameborder the frameborder="" attribute */ public iframe setFrameBorder(boolean frameborder) { if (frameborder) addAttribute("frameborder",Integer.toString(1)); else addAttribute("frameborder",Integer.toString(0)); return this; } /** Sets the marginwidth="" attribute @param marginwidth the marginwidth="" attribute */ public iframe setMarginWidth(int marginwidth) { setMarginWidth(Integer.toString(marginwidth)); return this; } /** Sets the marginwidth="" attribute @param marginwidth the marginwidth="" attribute */ public iframe setMarginWidth(String marginwidth) { addAttribute("marginwidth",marginwidth); return this; } /** Sets the height="" attribute @param height the height="" attribute */ public iframe setHeight(String height) { addAttribute("height",height); return this; } /** Sets the height="" attribute @param height the height="" attribute */ public iframe setHeight(int height) { addAttribute("height",Integer.toString(height)); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public iframe setWidth(String width) { addAttribute("width",width); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public iframe setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the marginheight="" attribute @param marginheight the marginheight="" attribute */ public iframe setMarginHeight(int marginheight) { setMarginHeight(Integer.toString(marginheight)); return this; } /** Sets the marginheight="" attribute @param marginheight the marginheight="" attribute */ public iframe setMarginHeight(String marginheight) { addAttribute("marginheight",marginheight); return this; } /** Sets the scrolling="" attribute @param scrolling the scrolling="" attribute */ public iframe setScrolling(String scrolling) { addAttribute("scrolling",scrolling); return this; } /** Sets the align="" attribute. @param align sets the align="" attribute. You can use the AlignType.* variables for convience. */ public iframe setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public iframe addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public iframe addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public iframe addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public iframe addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public iframe removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h4.java0000644000175000017500000002050607703353440022045 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h4> tag. @version $Id: h4.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h4 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h4"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h4() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <h4>value</h4> */ public h4(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h4>value</h4> */ public h4(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h4 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h4 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h4 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h4 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h4 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/textarea.java0000644000175000017500000003246707703353440023360 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <textarea></textarea> tag. @version $Id: textarea.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class textarea extends MultiPartElement implements PageEvents, FormEvents, MouseEvents, KeyEvents { public final static String off = "off"; public final static String physical = "physical"; public final static String virtual = "virtual"; /** Private initializer. */ { setElementType("textarea"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic Constructor use set* methods. */ public textarea() { } /** Basic Constructor use set* methods. @param rows the rows="" attribute @param cols the cols="" attribute */ public textarea(int rows, int cols) { setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param rows the rows="" attribute @param cols the cols="" attribute */ public textarea(String rows, String cols) { setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param name the name="" attribute @param rows the rows="" attribute @param cols the cols="" attribute */ public textarea(String name, int rows, int cols) { setName(name); setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param name the name="" attribute @param rows the rows="" attribute @param cols the cols="" attribute */ public textarea(String name, String rows, String cols) { setName(name); setRows(rows); setCols(cols); } /** Sets the rows="" attribute @param rows Sets the rows="" attribute */ public textarea setRows(int rows) { setRows(Integer.toString(rows)); return(this); } /** Sets the rows="" attribute @param rows Sets the rows="" attribute */ public textarea setRows(String rows) { addAttribute("rows",rows); return(this); } /** Sets the wrap="" attribute @param wrap Sets the wrap="" attribute */ public textarea setWrap(String wrap) { addAttribute("wrap",wrap); return(this); } /** Sets the cols="" attribute @param cols Sets the cols="" attribute */ public textarea setCols(int cols) { setCols(Integer.toString(cols)); return(this); } /** Sets the cols="" attribute @param cols Sets the cols="" attribute */ public textarea setCols(String cols) { addAttribute("cols",cols); return(this); } /** Sets the name="" attribute @param name Sets the name="" attribute */ public textarea setName(String name) { addAttribute("name",name); return(this); } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public textarea setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public textarea setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the readonly value @param readonly true or false */ public textarea setReadOnly(boolean readonly) { if ( readonly == true ) addAttribute("readonly", "readonly"); else removeAttribute("readonly"); return(this); } /** Sets the disabled value @param disabled true or false */ public textarea setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", "disabled"); else removeAttribute("disabled"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public textarea addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public textarea addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public textarea addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public textarea addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public textarea removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a frameset. This attribute may be used with body and frameset elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with body and frameset elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the form element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the input and textarea elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: input, select, and textarea. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/col.java0000644000175000017500000001637207703353441022316 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <col> object. @version $Id: col.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class col extends SinglePartElement implements Printable { /** private initializer. */ { setElementType("col"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } public col() { } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public col setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public col setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public col setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public col setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public col setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public col setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public col setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public col setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public col setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public col addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public col addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public col addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public col addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public col removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/b.java0000644000175000017500000002020407703353440021746 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <b> tag. @version $Id: b.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class b extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("b"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public b() { } /** Basic constructor. @param element Adds an Element to the element. */ public b(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public b(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public b addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public b addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public b addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public b addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public b removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/td.java0000644000175000017500000003241107703353440022137 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <td> object. @version $Id: td.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class td extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("td"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic Constructor use set* methods. */ public td() { } /** Basic Constructor use set* methods. */ public td(Element element) { addElement(element); } /** Basic Constructor use set* methods. */ public td(String element) { addElement(element); } /* Basic Constructor use set* methods. @param close. Print the closing tag or not. * public td(boolean close) { setNeedClosingTag(close); }*/ /** Sets the abbr="" attribute. @param cdata sets the abbr="" attribute. */ public td setAbbr(String cdata) { addAttribute("abbr",cdata); return(this); } /** Sets the axis="" attribute @param cdata sets the axis="" attribute */ public td setAxis(String cdata) { addAttribute("axis",cdata); return(this); } /** Sets the axes="" attribute @param id_refs list of id's for header cells */ public td setAxes(String id_refs) { addAttribute("axes",id_refs); return(this); } /** Sets the rowspan="" attribute @param rowspan number of rows spaned by cell */ public td setRowSpan(int rowspan) { addAttribute("rowspan",Integer.toString(rowspan)); return(this); } /** Sets the rowspan="" attribute @param rowspan number of rows spaned by cell */ public td setRowSpan(String rowspan) { addAttribute("rowspan",rowspan); return(this); } /** Sets the colspan="" attribute @param colspan number of columns spanned by cell */ public td setColSpan(int colspan) { addAttribute("colspan",Integer.toString(colspan)); return(this); } /** Sets the colspan="" attribute @param colspan number of columns spanned by cell */ public td setColSpan(String colspan) { addAttribute("colspan",colspan); return(this); } /** Sets word wrap on or off. @param wrap turn word wrap on or off. */ public td setNoWrap(boolean wrap) { if ( wrap == true ) addAttribute("nowrap", "nowrap"); else removeAttribute("nowrap"); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public td setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public td setWidth(String width) { addAttribute("width",width); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public td setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public td setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public td setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public td setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public td setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public td setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public td setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the bgcolor="" attribute @param color sets the background color of the cell. */ public td setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public td addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public td addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public td addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public td addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public td removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak() { java.util.Enumeration enum = elements(); int i=0; int j=0; while(enum.hasMoreElements()) { j++; Object obj = enum.nextElement(); if( obj instanceof img || obj instanceof a ) i++; } if ( i==j) return false; return true; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/noframes.java0000644000175000017500000002033107703353440023340 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <noframes> tag. @version $Id: noframes.java,v 1.2 2003/04/27 09:37:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class noframes extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("noframes"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public noframes() { } /** Basic constructor. @param element Adds an Element to the element. */ public noframes(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public noframes(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public noframes addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public noframes addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public noframes addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public noframes addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public noframes removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/cite.java0000644000175000017500000002025007703353440022452 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <cite> tag. @version $Id: cite.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class cite extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("cite"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public cite() { } /** Basic constructor. @param element Adds an Element to the element. */ public cite(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public cite(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public cite addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public cite addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public cite addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public cite addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public cite removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/script.java0000644000175000017500000002034007703353440023032 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <script> tag.

Note that XHTML script tag doesn't hide the script text withing comments like its HTML counterpart does. This difference is caused by the fact that XHTML is XML and XML parsers can throw the comments out. Use this tag with browsers that support scripting language(s). @version $Id: script.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class script extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("script"); setCase(LOWERCASE); setAttributeQuote(true); setLanguage("Javascript"); } /** Basic constructor. */ public script() { } /** Basic constructor. @param element Adds an Element to the element. */ public script(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute */ public script(Element element, String src) { addElement(element); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute @param type sets the type="" attribute */ public script(Element element, String src, String type) { addElement(element); setSrc(src); setType(type); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute @param type sets the type="" attribute @param lang sets the language="" attribute */ public script(Element element, String src, String type, String lang) { addElement(element); setSrc(src); setType(type); setLanguage(lang); } /** Basic constructor. @param element Adds an Element to the element. */ public script(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute */ public script(String element, String src) { addElement(element); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute @param type sets the type="" attribute */ public script(String element, String src, String type) { addElement(element); setSrc(src); setType(type); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the src="" attribute @param type sets the type="" attribute @param lang sets the language="" attribute */ public script(String element, String src, String type, String lang) { addElement(element); setSrc(src); setType(type); setLanguage(lang); } /** Sets the src="" attribute @param src the src="" attribute */ public script setSrc(String src) { addAttribute("src",src); return this; } /** Sets the type="" attribute @param type the type="" attribute */ public script setType(String type) { addAttribute("type", type); return this; } /** Sets the language="" attribute @param language the language="" attribute */ public script setLanguage(String language) { addAttribute("language", language); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public script addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public script addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public script addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public script addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public script removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/code.java0000644000175000017500000002025007703353440022440 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <code> tag. @version $Id: code.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class code extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("code"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public code() { } /** Basic constructor. @param element Adds an Element to the element. */ public code(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public code(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public code addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public code addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public code addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public code addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public code removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h1.java0000644000175000017500000002050507703353440022041 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h1> tag. @version $Id: h1.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h1 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h1"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h1() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <h1>value</h1> */ public h1(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h1>value</h1> */ public h1(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h1 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h1 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h1 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h1 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h1 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/th.java0000644000175000017500000003136307703353441022151 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <th> object. @version $Id: th.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class th extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("th"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use set* methods. */ public th() { } /** Basic Constructor use set* methods. */ public th(Element element) { addElement(element); } /** Basic Constructor use set* methods. */ public th(String element) { addElement(element); } /* Basic Constructor use set* methods. @param close. Print the closing tag or not. * public th(boolean close) { setNeedClosingTag(close); }*/ /** Sets the abbr="" attribute. @param cdata sets the abbr="" attribute. */ public th setAbbr(String cdata) { addAttribute("abbr",cdata); return(this); } /** Sets the axis="" attribute @param cdata sets the axis="" attribute */ public th setAxis(String cdata) { addAttribute("axis",cdata); return(this); } /** Sets the axes="" attribute @param id_refs list of id's for header cells */ public th setAxes(String id_refs) { addAttribute("axes",id_refs); return(this); } /** Sets the rowspan="" attribute @param span number of rows spaned by cell */ public th setRowSpan(int span) { addAttribute("rowspan",Integer.toString(span)); return(this); } /** Sets the rowspan="" attribute @param span number of rows spaned by cell */ public th setRowSpan(String span) { addAttribute("rowspan",span); return(this); } /** Sets the colspan="" attribute @param span number of columns spanned by cell */ public th setColSpan(int span) { addAttribute("colspan",Integer.toString(span)); return(this); } /** Sets the colspan="" attribute @param span number of columns spanned by cell */ public th setColSpan(String span) { addAttribute("colspan",span); return(this); } /** Sets word wrap on or off. @param wrap turn word wrap on or off. */ public th setNoWrap(boolean wrap) { if ( wrap == true ) addAttribute("nowrap", "nowrap"); else removeAttribute("nowrap"); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public th setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public th setWidth(String width) { addAttribute("width",width); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public th setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public th setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public th setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public th setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public th setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public th setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public th setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the bgcolor="" attribute @param color sets the background color of the cell. */ public th setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public th addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public th addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public th addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public th addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public th removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/input.java0000644000175000017500000004076007703353440022675 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <input> tag. @version $Id: input.java,v 1.2 2003/04/27 09:39:23 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class input extends SinglePartElement implements Printable, FormEvents, PageEvents, FocusEvents, MouseEvents, KeyEvents { public static final String text = "text"; public static final String password = "password"; public static final String checkbox = "checkbox"; public static final String radio = "radio"; public static final String file = "file"; public static final String button = "button"; public static final String image = "image"; public static final String hidden = "hidden"; public static final String submit = "submit"; public static final String reset = "reset"; /** Private initialization routine. */ { setElementType("input"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public input() { } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public input(String type, String name, String value) { setType(type); setName(name); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public input(String type, String name, int value) { setType(type); setName(name); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public input(String type, String name, Integer value) { setType(type); setName(name); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public input(String type, String name, double value) { setType(type); setName(name); setValue(value); } /** Sets the type="" attribute @param type the type="" attribute */ public input setType(String type) { addAttribute("type",type); return this; } /** Sets the src="" attribute @param src the src="" attribute */ public input setSrc(String src) { addAttribute("src",src); return this; } /** Sets the border="" attribute @param border the border="" attribute */ public input setBorder(int border) { addAttribute("border", Integer.toString(border)); return this; } /** Sets the alt="" attribute @param alt the alt="" attribute */ public input setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public input setName(String name) { addAttribute("name",name); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public input setValue(String value) { addAttribute("value",value); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public input setValue(int value) { addAttribute("value",Integer.toString(value)); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public input setValue(Integer value) { addAttribute("value",value.toString()); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public input setValue(double value) { addAttribute("value",Double.toString(value)); return this; } /** Sets the accept="" attribute @param accept the accept="" attribute */ public input setAccept(String accept) { addAttribute("accept",accept); return this; } /** Sets the size="" attribute @param size the size="" attribute */ public input setSize(String size) { addAttribute("size",size); return this; } /** Sets the size="" attribute @param size the size="" attribute */ public input setSize(int size) { setSize(Integer.toString(size)); return this; } /** Sets the maxlength="" attribute @param maxlength the maxlength="" attribute */ public input setMaxlength(String maxlength) { addAttribute("maxlength",maxlength); return this; } /** Sets the maxlength="" attribute @param maxlength the maxlength="" attribute */ public input setMaxlength(int maxlength) { setMaxlength(Integer.toString(maxlength)); return this; } /** Sets the usemap="" attribute @param usemap the usemap="" attribute */ public input setUsemap(String usemap) { addAttribute("usemap",usemap); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public input setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public input setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the checked value @param checked true or false */ public input setChecked(boolean checked) { if ( checked == true ) addAttribute("checked", "checked"); else removeAttribute("checked"); return(this); } /** Sets the readonly value @param readonly true or false */ public input setReadOnly(boolean readonly) { if ( readonly == true ) addAttribute("readonly", "readonly"); else removeAttribute("readonly"); return(this); } /** Sets the disabled value @param disabled true or false */ public input setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", "disabled"); else removeAttribute("disabled"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public input addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public input addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public input addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public input addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public input removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/ins.java0000644000175000017500000002051707703353440022325 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <ins> tag. @version $Id: ins.java,v 1.2 2003/04/27 09:39:23 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class ins extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("ins"); setCase(LOWERCASE); setAttributeQuote(true); } /** Default constructor use set* methods. */ public ins() { } /** Set the url that designates a source doument or message. @param url set the url that designates a source document or message. */ public ins setCite(String url) { addAttribute("cite",url); return(this); } /** Sets the date and time the change was made. @param datetime the date and time the change was made. */ public ins setDateTime(String datetime) { addAttribute("datetime",datetime); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ins addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ins addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ins addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ins addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ins removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h2.java0000644000175000017500000002051307703353440022041 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h2> tag. @version $Id: h2.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h2 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h2"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h2() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <h2>value</h2> */ public h2(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h1>value</h1> */ public h2(String value) { addElement(value); } /** Adds an Element to the element. @param element Adds an Element to the element. */ /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h2 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h2 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } public h2 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h2 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h2 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/big.java0000644000175000017500000002023507703353440022272 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <big> tag. @version $Id: big.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class big extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("big"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public big() { } /** Basic constructor. @param element Adds an Element to the element. */ public big(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public big(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public big addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public big addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public big addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public big addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public big removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/q.java0000644000175000017500000002304607703353440021774 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <q> tag. @version $Id: q.java,v 1.2 2003/04/27 09:41:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class q extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("q"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public q() { } /** Basic constructor. @param element Adds an Element to the element. */ public q(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public q(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public q(Element element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public q(String element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public q(Element element, Element cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public q(String element, Element cite) { addElement(element); setCite(cite); } /** Sets the cite="" attribute. @param cite sets the cite="" attribute. */ public q setCite(String cite) { addAttribute("cite",cite); return(this); } /** Sets the cite="" attribute. @param cite sets the cite="" attribute. */ public q setCite(Element cite) { addAttribute("cite",cite); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public q addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public q addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public q addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public q addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public q removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/center.java0000644000175000017500000002030007703353440023002 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <center> tag. @version $Id: center.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class center extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("center"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public center() { } /** Basic constructor. @param element Adds an Element to the element. */ public center(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public center(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public center addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public center addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public center addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public center addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public center removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/optgroup.java0000644000175000017500000002617707703353440023423 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <optgroup> tag. @version $Id: optgroup.java,v 1.2 2003/04/27 09:37:58 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class optgroup extends MultiPartElement implements Printable, FocusEvents, FormEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("optgroup"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public optgroup() { } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute label="" */ public optgroup(String label) { setLabel(label); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute label="" @param disabled sets the attribute disabled= */ public optgroup(String label, boolean disabled) { setLabel(label); setDisabled(disabled); } /** sets the label="" attribute @param label the label="" attribute */ public optgroup setLabel(String label) { addAttribute("label",label); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public optgroup setValue(String value) { addAttribute("value",value); return this; } /** Sets the disabled value @param disabled true or false */ public optgroup setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", "disabled"); else removeAttribute("disabled"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public optgroup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public optgroup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public optgroup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public optgroup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public optgroup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: label, input, select, textarea, and button. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the input and textarea elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: input, select, and textarea. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/meta.java0000644000175000017500000001371707703353440022466 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <meta> tag. @version $Id: meta.java,v 1.2 2003/04/27 09:41:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class meta extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("meta"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** This method creates a <meta> tag. */ public meta() { } /** Sets the content="" attribute. @param content the value that should go into the content attribute */ public meta setContent(String content) { addAttribute("content",content); return this; } /** Sets the name="" attribute. @param content the value that should go into the name attribute */ public meta setName(String name) { addAttribute("name",name); return this; } /** Sets the scheme="" attribute. @param content the value that should go into the scheme attribute */ public meta setScheme(String scheme) { addAttribute("scheme",scheme); return this; } /** Sets the http-equiv="" attribute. @param content the value that should go into the http-equiv attribute */ public meta setHttpEquiv(String http_equiv) { addAttribute("http-equiv",http_equiv); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public meta addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public meta addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public meta addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public meta addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public meta removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/samp.java0000644000175000017500000002025107703353440022467 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <samp> tag. @version $Id: samp.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class samp extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("samp"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public samp() { } /** Basic constructor. @param element Adds an Element to the element. */ public samp(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public samp(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public samp addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public samp addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public samp addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public samp addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public samp removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/legend.java0000644000175000017500000002175607703353441023001 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <legend> tag. @version $Id: legend.java,v 1.2 2003/04/27 09:39:11 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class legend extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("legend"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use set* methods. */ public legend() { } /** Basic Constructor use set* methods. @param element sets the value */ public legend(String value) { addElement(value); } /** Basic Constructor use set* methods. @param element sets the value */ public legend(Element value) { addElement(value); } /** Basic Constructor use set* methods. @param element sets the value @param accesskey sets the accesskey="" attribute. */ public legend(String value, String accesskey) { addElement(value); setAccessKey(accesskey); } /** Basic Constructor use set* methods. @param element sets the value @param accesskey sets the accesskey="" attribute. */ public legend(Element value, String accesskey) { addElement(value); setAccessKey(accesskey); } /** Sets the accesskey="" attribute. @param accesskey sets the accesskey="" attribute. */ public legend setAccessKey(String accesskey) { addAttribute("accesskey",accesskey); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public legend addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public legend addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public legend addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public legend addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public legend removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/head.java0000644000175000017500000001331307703353440022431 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <head></head> tag. @version $Id: head.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class head extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("head"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods to set the attibutes. */ public head() { } /** This method creates a <head> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public head(String value) { addElement(value); } /** This method creates a <head> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public head(Element value) { addElement(value); } /** Sets the PROFILE="" attribue @param profile the url to one or more meta data profiles seperated by whitespace */ public head setProfile(String profile) { addAttribute("profile",profile); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public head addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public head addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public head addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public head addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public head removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h3.java0000644000175000017500000002050507703353440022043 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h3> tag. @version $Id: h3.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h3 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h3"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h3() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <h3>value</h3> */ public h3(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h3>value</h3> */ public h3(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h3 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h3 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h3 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h3 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h3 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/frameset.java0000644000175000017500000001734407703353440023346 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <frameset> tag. @version $Id: frameset.java,v 1.2 2003/04/27 09:40:37 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class frameset extends MultiPartElement implements Printable, PageEvents { /** Private initialization routine. */ { setElementType("frameset"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public frameset() { } /** Basic constructor. @param element Adds an Element to the element. */ public frameset(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public frameset(String element) { addElement(element); } /** Basic constructor. @param rows Sets the rows="" attribute @param cols Sets the cols="" attribute */ public frameset(String rows, String cols) { setRows(rows); setCols(cols); } /** Basic constructor. @param rows Sets the rows="" attribute @param cols Sets the cols="" attribute @param element Adds an Element to the element. */ public frameset(String rows, String cols, Element element) { addElement(element); setRows(rows); setCols(cols); } /** Basic constructor. @param rows Sets the rows="" attribute @param cols Sets the cols="" attribute @param element Adds an Element to the element. */ public frameset(String rows, String cols, String element) { addElement(element); setRows(rows); setCols(cols); } /** Sets the rows="" attribute @param rows Sets the rows="" attribute */ public frameset setRows(int rows) { setRows(Integer.toString(rows)); return(this); } /** Sets the rows="" attribute @param rows Sets the rows="" attribute */ public frameset setRows(String rows) { addAttribute("rows",rows); return(this); } /** Sets the cols="" attribute @param cols Sets the cols="" attribute */ public frameset setCols(int cols) { setCols(Integer.toString(cols)); return(this); } /** Sets the cols="" attribute @param cols Sets the cols="" attribute */ public frameset setCols(String cols) { addAttribute("cols",cols); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public frameset addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public frameset addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public frameset addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public frameset addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public frameset removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a frameset. This attribute may be used with body and frameset elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with body and frameset elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/address.java0000644000175000017500000002062507703353440023161 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <address> tag. @version $Id: address.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class address extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("address"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public address() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <address>value</address> */ public address(String value) { addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <address>value</address> */ public address(span element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public address addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public address addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public address addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public address addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public address removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/button.java0000644000175000017500000002433407703353440023050 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <button> tag. @version $Id: button.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class button extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { // convience variables public final static String reset = "reset"; public final static String submit = "submit"; public final static String button = "button"; /** private initializaer. */ { setElementType("button"); setCase(LOWERCASE); setAttributeQuote(true); } public button() { } /** Set the name of this button. @param name set the name of this button. */ public button setName(String name) { addAttribute("name",name); return(this); } /** Set the value of this button. @param value set the value of this button. */ public button setValue(String value) { addAttribute("value",value); return(this); } /** Set the type of button this is. Convience variables are
button.submit
button.reset
button.button @param button type. */ public button setType(String type) { addAttribute("type",type); return(this); } /** Is this button disabled? disabled true|false */ public button setDisabled(boolean disabled) { if(disabled) addAttribute("disabled","disabled"); else removeAttribute("disabled"); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public button setTabIndex(int number) { addAttribute("tabindex",Integer.toString(number)); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public button setTabIndex(String number) { addAttribute("tabindex",number); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public button addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public button addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public button addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public button addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public button removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/del.java0000644000175000017500000002051607703353440022277 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <del> tag. @version $Id: del.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class del extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("del"); setCase(LOWERCASE); setAttributeQuote(true); } /** Default constructor use set* methods. */ public del() { } /** Set the url that designates a source doument or message. @param url set the url that designates a source document or message. */ public del setCite(String url) { addAttribute("cite",url); return(this); } /** Sets the date and time the change was made. @param datetime the date and time the change was made. */ public del setDateTime(String datetime) { addAttribute("datetime",datetime); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public del addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public del addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public del addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public del addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public del removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/blockquote.java0000644000175000017500000002331007703353440023676 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <blockquote> tag. @version $Id: blockquote.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class blockquote extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("blockquote"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public blockquote() { } /** Basic constructor. @param element Adds an Element to the element. */ public blockquote(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public blockquote(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public blockquote(Element element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public blockquote(String element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public blockquote(Element element, Element cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the cite="" attribute. */ public blockquote(String element, Element cite) { addElement(element); setCite(cite); } /** Sets the CITE="" attribute. @param cite sets the cite="" attribute. */ public blockquote setCite(String cite) { addAttribute("cite",cite); return(this); } /** Sets the CITE="" attribute. @param cite sets the cite="" attribute. */ public blockquote setCite(Element cite) { addAttribute("cite",cite); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public blockquote addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public blockquote addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public blockquote addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public blockquote addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public blockquote removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/fieldset.java0000644000175000017500000002034607703353440023333 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <fieldset> tag. @version $Id: fieldset.java,v 1.2 2003/04/27 09:40:36 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class fieldset extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("fieldset"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use set* methods. */ public fieldset() { } /** Basic Constructor use set* methods. @param element an element to add */ public fieldset(Element element) { addElement(element); } /** Basic Constructor use set* methods. @param element an element to add */ public fieldset(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public fieldset addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public fieldset addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public fieldset addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public fieldset addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public fieldset removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/param.java0000644000175000017500000001415207703353440022632 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an param Element @version $Id: param.java,v 1.2 2003/04/27 09:38:05 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class param extends SinglePartElement implements Printable { // Convience variables. public final static String ref = "ref"; public final static String data = "data"; public final static String object = "object"; /** private initializer. */ { setElementType("param"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Default constructor. use set* methods. */ public param() { } /** Sets the name of this parameter. @param name sets the name of this parameter. */ public param setName(String name) { addAttribute("name",name); return(this); } /** Sets the value of this attribute. @param value sets the value attribute. */ public param setValue(String value) { addAttribute("value",value); return(this); } /** Sets the valuetype of this parameter. @param valuetype sets the name of this parameter.
ref|data|object convience varaibles provided as param.ref,param.data,param.object */ public param setValueType(String valuetype) { addAttribute("value",valuetype); return(this); } /** Sets the mime type of this object @param the mime type of this object */ public param setType(String cdata) { addAttribute("type",cdata); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public param addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public param addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public param addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public param addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public param removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/var.java0000644000175000017500000002023507703353440022321 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <var> tag. @version $Id: var.java,v 1.2 2003/04/27 09:41:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class var extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("var"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public var() { } /** Basic constructor. @param element Adds an Element to the element. */ public var(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public var(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public var addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public var addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public var addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public var addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public var removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/acronym.java0000644000175000017500000002032407703353440023200 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <acronym> tag. @version $Id: acronym.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class acronym extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("acronym"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public acronym() { } /** Basic constructor. @param element Adds an Element to the element. */ public acronym(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public acronym(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public acronym addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public acronym addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public acronym addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public acronym addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public acronym removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/tbody.java0000644000175000017500000002422607703353440022656 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <tbody> object. @version $Id: tbody.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class tbody extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("tbody"); setCase(LOWERCASE); setAttributeQuote(true); } public tbody() { } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public tbody setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public tbody setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public tbody setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public tbody setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public tbody setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public tbody setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public tbody setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tbody setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off when present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tbody setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tbody addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tbody addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tbody addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tbody addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public tbody removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/base.java0000644000175000017500000001354007703353441022445 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <base> tag. @version $Id: base.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class base extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("base"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. */ public base() { } /** Basic constructor. @param href the URI that goes between double quotes */ public base(String href) { setHref(href); } /** Basic constructor. @param href the URI that goes between double quotes @param target the target that goes between double quotes */ public base(String href, String target) { setHref(target); setTarget(target); } /** Sets the href="" attribute @param href the URI that goes between double quotes */ public base setHref(String href) { addAttribute("href",href); return this; } /** Sets the target="" attribute @param target the URI that goes between double quotes */ public base setTarget(String target) { addAttribute("target",target); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public base addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public base addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public base addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public base addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public base removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/span.java0000644000175000017500000002017107703353440022471 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <span> tag. @version $Id: span.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class span extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("span"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public span() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <span>value</span> */ public span(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public span addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public span addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public span addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public span addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public span removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/style.java0000644000175000017500000001410107703353440022664 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <style> tag. @version $Id: style.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class style extends MultiPartElement implements Printable { /** type=text/css */ public static final String css = "text/css"; /** Private initialization routine. */ { setElementType("style"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public style() { } /** Basic constructor. @param type the type="" attribute */ public style(String type) { setType(type); } /** Basic constructor. @param type the type="" attribute @param element Adds an Element to the element. */ public style(String type, Element element) { setType(type); addElement(element); } /** Basic constructor. @param type the type="" attribute @param element Adds an Element to the element. */ public style(String type, String element) { setType(type); addElement(element); } /** Sets the type="" attribute @param type the type="" attribute */ public style setType(String type) { addAttribute("type",type); return this; } /** Sets the media="" attribute @param media the media="" attribute */ public style setMedia(String media) { addAttribute("media",media); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public style addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public style addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public style addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public style addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public style removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/pre.java0000644000175000017500000002333207703353440022320 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <pre> tag. @version $Id: pre.java,v 1.2 2003/04/27 09:38:05 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class pre extends MultiPartElement implements MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("pre"); setCase(LOWERCASE); setAttributeQuote(true); setPrettyPrint(false); } /** Basic constructor. You need to set the attributes using the set* methods. */ public pre() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <pre>value</pre> */ public pre(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <pre>value</pre> @param width set the value of width="" */ public pre(String value, int width) { setWidth(width); addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <pre>value</pre> @param width set the value of width="" */ public pre(Element element, int width) { setWidth(width); addElement(element); } /** Use the set* methods to set the values of the attributes. @param element set the value of <pre>value</pre> @param width set the value of width="" */ public pre(Element element, String width) { setWidth(width); addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <pre>value</pre> */ public pre(String value) { addElement(value); } /** Sets the width="" attribute @param width the width="" attribute */ public pre setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public pre setWidth(String width) { addAttribute("width",width); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public pre addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public pre addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public pre addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public pre addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public pre removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/dl.java0000644000175000017500000001747407703353440022143 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <dl> tag. @version $Id: dl.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class dl extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dl"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public dl() { } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dl addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dl addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dl addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dl addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public dl removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h5.java0000644000175000017500000002051407703353440022045 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h5> tag. @version $Id: h5.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h5 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h5"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h5() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <h5>value</h5> */ public h5(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h5>value</h5> */ public h5(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h5 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h5 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h5 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h5 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h5 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/nobr.java0000644000175000017500000001272507703353440022476 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <nobr> tag. @version $Id: nobr.java,v 1.2 2003/04/27 09:37:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class nobr extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("nobr"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public nobr() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <nobr>value</nobr> */ public nobr(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <nobr>value</nobr> */ public nobr(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public nobr addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public nobr addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public nobr addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public nobr addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public nobr removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/h6.java0000644000175000017500000002051207703353440022044 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <h6> tag. @version $Id: h6.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class h6 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h6"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public h6() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <h6>value</h6> */ public h6(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <h6>value</h6> */ public h6(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h6 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public h6 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h6 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public h6 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public h6 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/blink.java0000644000175000017500000001243407703353440022632 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <blink> tag. @version $Id: blink.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class blink extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("blink"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public blink() { } /** Basic constructor. @param element Adds an Element to the element. */ public blink(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public blink(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public blink addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public blink addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public blink addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public blink addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public blink removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/abbr.java0000644000175000017500000002063007703353440022436 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <abbr> tag.

Please refer to the TestBed.java file for example code usage. @version $Id: abbr.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class abbr extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("abbr"); setCase(LOWERCASE); // XHTML specific setAttributeQuote(true); // XHTML specific } /** Basic constructor. You need to set the attributes using the set* methods. */ public abbr() { } /** This constructor creates an <abbr> tag. @param element Adds an Element to the element. */ public abbr(Element element) { addElement(element); } /** This constructor creates an <abbr> tag. @param element Adds an Element to the element. */ public abbr(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public abbr addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public abbr addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public abbr addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public abbr addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public abbr removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onomousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/font.java0000644000175000017500000001656407703353440022511 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <font> object. @version $Id: font.java,v 1.2 2003/04/27 09:40:36 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class font extends MultiPartElement implements Printable { /** Private initializer. */ { setElementType("font"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic Constructor. use set* methods. */ public font() { } /** Basic constructor. @param face create new font object with this face. */ public font(String face) { setFace(face); } /** Basic constructor @param face @param color Create a new font object with the face abd color already set. Convience colors are defined in HtmlColor interface. */ public font(String face,String color) { setFace(face); setColor(color); } /** Basic constructor @param face @param color @param size Create a new font object with the face,color and size already set. Convience colors are defined in HtmlColor interface. */ public font(String face,String color,int size) { setFace(face); setColor(color); setSize(size); } /** Basic constructor @param size Create a new font object with the size already set. */ public font(int size) { setSize(size); } /** Basic constructor @param size @param face Create a new font object with the size and face already set. */ public font(int size,String face) { setSize(size); setFace(face); } /** Basic constructor @param color @param size Create a new font object with the size and color already set. */ public font(String color,int size) { setSize(size); setColor(color); } /** sets the face="" attribute. @param face sets the face="" attribute. */ public font setFace(String face) { addAttribute("face",face); return(this); } /** sets the color="" attribute. @param color sets the color="" attribute. Convience colors are defined in the HtmlColors interface. */ public font setColor(String color) { addAttribute("color",HtmlColor.convertColor(color)); return(this); } /** sets the size="" attribute. @param size sets the size="" attribute. */ public font setSize(int size) { addAttribute("size",Integer.toString(size)); return(this); } /** sets the size="" attribute. @param size sets the size="" attribute. */ public font setSize(String size) { addAttribute("size",size); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public font addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public font addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public font addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public font addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public font removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/dt.java0000644000175000017500000002002407703353440022134 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <dt> tag. @version $Id: dt.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class dt extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dt"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use setValue() if needed. */ public dt() { } /** Sets the value after the <dt> tag @param value the value after the <dt> tag */ public dt(String value) { addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dt addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dt addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dt addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dt addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public dt removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/strike.java0000644000175000017500000002030107703353440023024 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <strike> tag. @version $Id: strike.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class strike extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("strike"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public strike() { } /** Basic constructor. @param element Adds an Element to the element. */ public strike(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public strike(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public strike addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public strike addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public strike addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public strike addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public strike removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/tt.java0000644000175000017500000002022207703353440022154 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <tt> tag. @version $Id: tt.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class tt extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("tt"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public tt() { } /** Basic constructor. @param element Adds an Element to the element. */ public tt(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public tt(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tt addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tt addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tt addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tt addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public tt removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/table.java0000644000175000017500000003013007703353440022613 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <table> object. @version $Id: table.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class table extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private iniitialization routine */ { setElementType("table"); setCase(LOWERCASE); setAttributeQuote(true); } public table() { } /** Allows one to set the border size. @param border sets the border="" attribute. */ public table(int border) { setBorder(border); } /** Allows one to set the border size. @param border sets the border="" attribute. */ public table(String border) { setBorder(border); } /** Set the summary="" attribue. @param summary sets the summary="" attribute. */ public table setSummary(String summary) { addAttribute("summary",summary); return(this); } /** Sets the align="" attribute. @param align sets the align="" attribute. You can use the AlignType.* variables for convience. */ public table setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the width="" attribute. @param width sets the width="" attribute. */ public table setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the height="" attribute. @param width sets the height="" attribute. */ public table setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the width="" attribute. @param width sets the width="" attribute. */ public table setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Sets the height="" attribute. @param width sets the height="" attribute. */ public table setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Sets the cols="" attribute. @param width sets the cols="" attribute. */ public table setCols(int cols) { addAttribute("cols",Integer.toString(cols)); return(this); } /** Sets the cols="" attribute. @param width sets the cols="" attribute. */ public table setCols(String cols) { addAttribute("cols",cols); return(this); } /** Sets the cellpading="" attribute. @param cellpadding sets the cellpading="" attribute. */ public table setCellPadding(int cellpadding) { addAttribute("cellpadding",Integer.toString(cellpadding)); return(this); } /** Sets the cellspacing="" attribute. @param spacing sets the cellspacing="" attribute. */ public table setCellSpacing(int cellspacing) { addAttribute("cellspacing",Integer.toString(cellspacing)); return(this); } /** Sets the cellpading="" attribute. @param cellpadding sets the cellpading="" attribute. */ public table setCellPadding(String cellpadding) { addAttribute("cellpadding",cellpadding); return(this); } /** Sets the cellspacing="" attribute. @param spacing sets the cellspacing="" attribute. */ public table setCellSpacing(String cellspacing) { addAttribute("cellspacing",cellspacing); return(this); } /** Sets the border="" attribute. @param border sets the border="" attribute. */ public table setBorder(int border) { addAttribute("border",Integer.toString(border)); return(this); } /** Sets the border="" attribute. @param border sets the border="" attribute. */ public table setBorder(String border) { addAttribute("border",border); return(this); } /** Sets the frame="" attribute. @param frame sets the frame="" attribute. */ public table setFrame(String frame) { addAttribute("frame",frame); return(this); } /** Sets the rules="" attribute. @param rules sets the rules="" attribute. */ public table setRules(String rules) { addAttribute("rules",rules); return(this); } /** Sets the bgcolor="" attribute @param color the bgcolor="" attribute */ public table setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public table addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public table addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public table addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public table addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public table removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/br.java0000644000175000017500000001336707703353440022144 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <br> tag. @version $Id: br.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class br extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("br"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public br() { } /** Use the set* methods to set the values of the attributes. @param clear_type the clear="" attribute */ public br(String clear_type) { setClear(clear_type); } /** Use the set* methods to set the values of the attributes. @param clear_type the clear="" attribute @param title the title="" attribute */ public br(String clear_type, String title) { setClear(clear_type); setTitle(title); } /** Sets the clear="" attribute @param clear_type the clear="" attribute */ public br setClear(String clear_type) { addAttribute("clear",clear_type); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public br addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public br addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public br addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public br addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public br removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/form.java0000644000175000017500000003140207703353440022472 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <form> tag. @version $Id: form.java,v 1.2 2003/04/27 09:40:36 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class form extends MultiPartElement implements Printable, FormEvents, MouseEvents, KeyEvents { public static final String get = "get"; public static final String post = "post"; public static final String ENC_DEFAULT = "application/x-www-form-urlencoded"; public static final String ENC_UPLOAD = "multipart/form-data"; /** Private initialization routine. */ { setElementType("form"); setCase(LOWERCASE); setAttributeQuote(true); setEncType ( ENC_DEFAULT ); setAcceptCharset("UNKNOWN"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public form() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <form>value</form> */ public form(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param action set the value of action="" */ public form(String action) { setAction(action); } /** Use the set* methods to set the values of the attributes. @param element set the value of <form>value</form> @param action set the value of action="" */ public form(String action, Element element) { addElement(element); setAction(action); } /** Use the set* methods to set the values of the attributes. @param action set the value of action="" @param method set the value of method="" @param element set the value of <form>value</form> */ public form(String action, String method, Element element) { addElement(element); setAction(action); setMethod(method); } /** Use the set* methods to set the values of the attributes. @param action set the value of action="" @param method set the value of method="" */ public form(String action, String method) { setAction(action); setMethod(method); } /** Use the set* methods to set the values of the attributes. @param action set the value of action="" @param method set the value of method="" @param enctype set the value of enctype="" */ public form(String action, String method, String enctype) { setAction(action); setMethod(method); setEncType(enctype); } /** Sets the action="" attribute @param action the action="" attribute */ public form setAction(String action) { addAttribute("action",action); return this; } /** Sets the method="" attribute @param method the method="" attribute */ public form setMethod(String method) { addAttribute("method",method); return this; } /** Sets the enctype="" attribute @param enctype the enctype="" attribute */ public form setEncType(String enctype) { addAttribute("enctype",enctype); return this; } /** Sets the accept="" attribute @param accept the accept="" attribute */ public form setAccept(String accept) { addAttribute("accept",accept); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public form setName(String name) { addAttribute("name",name); return this; } /** Sets the target="" attribute @param target the target="" attribute */ public form setTarget(String target) { addAttribute("target",target); return this; } /** Sets the accept-charset="" attribute @param accept the accept-charset="" attribute */ public form setAcceptCharset(String acceptcharset) { addAttribute("accept-charset",acceptcharset); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public form addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public form addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public form addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public form addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public form removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the input and textarea elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: input, select, and textarea. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/basefont.java0000644000175000017500000001643407703353440023340 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <basefont> object. @version $Id: basefont.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class basefont extends SinglePartElement implements Printable { /** Private initializer. */ { setElementType("basefont"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic Constructor. use set* methods. */ public basefont() { } /** Basic constructor. @param face create new basefont object with this face. */ public basefont(String face) { setFace(face); } /** Basic constructor @param face @param color Create a new BaseFont object with the face abd color already set. Convience colors are defined in HtmlColor interface. */ public basefont(String face,String color) { setFace(face); setColor(color); } /** Basic constructor @param face @param color @param size Create a new basefont object with the face,color and size already set. Convience colors are defined in HtmlColor interface. */ public basefont(String face,String color,int size) { setFace(face); setColor(color); setSize(size); } /** Basic constructor @param size Create a new basefont object with the size already set. */ public basefont(int size,String face) { setSize(size); setFace(face); } /** Basic constructor @param color @param size Create a new BaseFont object with the size and color already set. */ public basefont(String color,int size) { setSize(size); setColor(color); } /** sets the face="" attribute. @param face sets the face="" attribute. */ public basefont setFace(String face) { addAttribute("face",face); return(this); } /** sets the color="" attribute. @param color sets the color="" attribute. Convience colors are defined in the HtmlColors interface. */ public basefont setColor(String color) { addAttribute("color",HtmlColor.convertColor(color)); return(this); } /** sets the size="" attribute. @param size sets the size="" attribute. */ public basefont setSize(int size) { addAttribute("size",Integer.toString(size)); return(this); } /** sets the size="" attribute. @param size sets the size="" attribute. */ public basefont setSize(String size) { addAttribute("size",size); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public basefont addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public basefont addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public basefont addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public basefont addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public basefont removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/u.java0000644000175000017500000002020507703353440021772 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <u> tag. @version $Id: u.java,v 1.2 2003/04/27 09:36:37 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class u extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("u"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public u() { } /** Basic constructor. @param element Adds an Element to the element. */ public u(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public u(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public u addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public u addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public u addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public u addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public u removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/dfn.java0000644000175000017500000002023407703353440022277 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <dfn> tag. @version $Id: dfn.java,v 1.2 2003/04/27 09:40:16 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class dfn extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dfn"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public dfn() { } /** Basic constructor. @param element Adds an Element to the element. */ public dfn(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public dfn(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dfn addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public dfn addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dfn addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public dfn addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public dfn removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/body.java0000644000175000017500000002413407703353440022470 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <body></body> tag. @version $Id: body.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class body extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("body"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public body() { } /** Use the set* methods to set the values of the attributes. @param color the bgcolor="" attribute */ public body(String color) { setBgColor(color); } /** Sets the bgcolor="" attribute @param color the bgcolor="" attribute */ public body setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return this; } /** Sets the background="" attribute @param url the background="" attribute */ public body setBackground(String url) { addAttribute("background",url); return this; } /** Sets the text="" attribute @param text the text="" attribute */ public body setText(String text) { addAttribute("text",text); return this; } /** Sets the link="" attribute @param color the link="" attribute */ public body setLink(String color) { addAttribute("link",HtmlColor.convertColor(color)); return this; } /** Sets the vlink="" attribute @param color the vlink="" attribute */ public body setVlink(String color) { addAttribute("vlink",HtmlColor.convertColor(color)); return this; } /** Sets the alink="" attribute @param color the alink="" attribute */ public body setAlink(String color) { addAttribute("alink",HtmlColor.convertColor(color)); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public body addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public body addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public body addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public body addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public body removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a frameset. This attribute may be used with body and frameset elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with body and frameset elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/em.java0000644000175000017500000002022207703353440022126 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <em> tag. @version $Id: em.java,v 1.2 2003/04/27 09:40:25 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class em extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("em"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public em() { } /** Basic constructor. @param element Adds an Element to the element. */ public em(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public em(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public em addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public em addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public em addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public em addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public em removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/li.java0000644000175000017500000002141307703353440022134 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <li> tag.

The li tag defaults to not having a closing </li> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: li.java,v 1.2 2003/04/27 09:39:11 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class li extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("li"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use setValue() if needed. */ public li() { } /** Sets the value after the <li> tag @param value the value after the <li> tag */ public li(String value) { addElement(value); } /** Sets the value after the <li> tag @param element the value after the <li> tag */ public li(Element element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public li addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public li addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Mechanism for taking a list of Strings and creating a list of li objects. @param element[] list of Strings that need to be li objects */ public li[] addElement(String[] element) { li[] li = new li[element.length]; for(int x = 0; x < element.length; x++) { li[x] = new li(element[x]); } return(li); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public li addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public li addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public li removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/label.java0000644000175000017500000002255607703353441022621 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <label> tag. @version $Id: label.java,v 1.2 2003/04/27 09:39:11 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class label extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("label"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use set* methods. */ public label() { } /** Basic Constructor use set* methods. @param for Sets the FOR="" attribute */ public label(String value) { setFor(value); } /** Basic Constructor use set* methods. @param for Sets the for="" attribute @param accesskey sets the accesskey="" attribute. */ public label(String value, String accesskey) { setFor(value); } /** Sets the for="" attribute. @param for sets the for="" attribute. */ public label setFor(String value) { addAttribute("for",value); return(this); } /** Sets the accesskey="" attribute. @param accesskey sets the accesskey="" attribute. */ public label setAccessKey(String accesskey) { addAttribute("accesskey",accesskey); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public label addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public label addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public label addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public label addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public label removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a frameset. This attribute may be used with body and frameset elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with body and frameset elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/bdo.java0000644000175000017500000001222607703353440022276 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <bdo></bdo> tag. @version $Id: bdo.java,v 1.2 2003/04/27 09:40:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class bdo extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("bdo"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic Constructor use set* methods. */ public bdo() { } /** Basic Constructor sets the direction for the element. @param dir the direction the element should flow LTR|RTL */ public bdo(String dir) { setDir(dir); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public bdo addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public bdo addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public bdo addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public bdo addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public bdo removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/html.java0000644000175000017500000001265707703353440022506 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <html></html> tag. @version $Id: html.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class html extends MultiPartElement implements Printable { public html() { setElementType("html"); setCase(LOWERCASE); setAttributeQuote(true); addAttribute("xmlns","http://www.w3.org/1999/xhtml"); } /** This method creates a <html> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public html(String value) { setElementType("html"); addElement(value); } /** This method creates a <html> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public html(Element value) { setElementType("html"); addElement(value); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public html addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public html addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public html addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public html addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public html removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/tr.java0000644000175000017500000002364207703353440022163 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <tr> object. @version $Id: tr.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class tr extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("tr"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic Constructor use set* methods. */ public tr() { } /** Basic Constructor use set* methods. */ public tr(Element element) { addElement(element); } /** Basic Constructor use set* methods. */ public tr(String element) { addElement(element); } /* Basic Constructor use set* methods. @param close. Print the closing tag or not. * public tr(boolean close) { setNeedClosingTag(close); }*/ /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public tr setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param align Sets the valign="" attribute */ public tr setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public tr setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tr setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tr setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the bgcolor="" attribute @param color sets the background color of the cell. */ public tr setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tr addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tr addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tr addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tr addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public tr removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/colgroup.java0000644000175000017500000001647207703353440023373 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <colgroup> object. @version $Id: colgroup.java,v 1.2 2003/04/27 09:40:47 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class colgroup extends MultiPartElement implements Printable { /** private initializer. */ { setElementType("colgroup"); setCase(LOWERCASE); setAttributeQuote(true); } public colgroup() { } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public colgroup setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public colgroup setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public colgroup setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public colgroup setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public colgroup setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public colgroup setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public colgroup setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public colgroup setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public colgroup setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public colgroup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public colgroup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public colgroup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public colgroup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public colgroup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/select.java0000644000175000017500000003231307703353440023010 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <select> tag. @version $Id: select.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class select extends MultiPartElement implements Printable, PageEvents, FormEvents, MouseEvents, KeyEvents { /** Private initializer */ { setElementType("select"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods. */ public select() { } /** Basic Constructor. @param name set the NAME="" attribute */ public select(String name) { setName(name); } /** Basic Constructor. @param name set the name="" attribute @param name set the size="" attribute */ public select(String name, String size) { setName(name); setSize(size); } /** Basic Constructor. @param name set the name="" attribute @param name set the size="" attribute */ public select(String name, int size) { setName(name); setSize(size); } /** Basic Constructor. @param name set the name="" attribute @param element provide a group of strings to be converted to options elements. */ public select(String name, String[] element) { setName(name); addElement(element); } /** Basic Constructor. @param name set the name="" attribute @param element provide a group of strings to be converted to options elements. */ public select(String name, option[] element) { setName(name); addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public select addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public select addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public select addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds a group of elements to the select element. @param element adds a group of elements to the select element. */ public select addElement(option[] element) { for(int x = 0 ; x < element.length; x++) { addElementToRegistry(element[x]); } return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public select addElement(String element) { addElementToRegistry(element); return(this); } /** Creates a group of option elements and adds them to this select. @param element adds a group of option elements to this select. */ public select addElement(String[] element) { option[] options = new option().addElement(element); addElement(options); return(this); } /** Sets the name="" attribute @param name the name="" attribute */ public select setName(String name) { addAttribute("name",name); return this; } /** Sets the size="" attribute @param size the size="" attribute */ public select setSize(String size) { addAttribute("size",size); return this; } /** Sets the size="" attribute @param size the size="" attribute */ public select setSize(int size) { setSize(Integer.toString(size)); return this; } /** Sets the multiple value @param multiple true or false */ public select setMultiple(boolean multiple) { if ( multiple == true ) addAttribute("multiple", "multiple"); else removeAttribute("multiple"); return(this); } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public select setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the tabindex="" attribute @param alt the tabindex="" attribute */ public select setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the disabled value @param disabled true or false */ public select setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", "disabled"); else removeAttribute("disabled"); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public select removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a frameset. This attribute may be used with body and frameset elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onload", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with body and frameset elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onunload", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the input and textarea elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: input, select, and textarea. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/kbd.java0000644000175000017500000002023507703353440022271 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <kbd> tag. @version $Id: kbd.java,v 1.2 2003/04/27 09:41:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class kbd extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("kbd"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public kbd() { } /** Basic constructor. @param element Adds an Element to the element. */ public kbd(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public kbd(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public kbd addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public kbd addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public kbd addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public kbd addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public kbd removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/frame.java0000644000175000017500000002211607703353440022623 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <frame> tag. @version $Id: frame.java,v 1.2 2003/04/27 09:40:36 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class frame extends MultiPartElement implements Printable { public final static String yes = "yes"; public final static String no = "no"; public final static String auto = "auto"; /** Private initialization routine. */ { setElementType("frame"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public frame() { } /** Basic constructor. @param element Adds an Element to the element. */ public frame(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public frame(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute */ public frame(Element element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute */ public frame(String element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the nama="" attribute @param src the src="" attribute */ public frame(Element element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param name the name="" attribute @param src the src="" attribute */ public frame(String element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Sets the longdesc="" attribute @param longdesc the longdesc="" attribute */ public frame setLongDesc(String longdesc) { addAttribute("longdesc",longdesc); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public frame setName(String name) { addAttribute("name",name); return this; } /** Sets the src="" attribute @param src the src="" attribute */ public frame setSrc(String src) { addAttribute("src",src); return this; } /** Sets the frameborder="" attribute @param frameborder the frameborder="" attribute */ public frame setFrameBorder(boolean frameborder) { if (frameborder) addAttribute("frameborder",Integer.toString(1)); else addAttribute("frameborder",Integer.toString(0)); return this; } /** Sets the marginwidth="" attribute @param marginwidth the marginwidth="" attribute */ public frame setMarginWidth(int marginwidth) { setMarginWidth(Integer.toString(marginwidth)); return this; } /** Sets the marginwidth="" attribute @param marginwidth the marginwidth="" attribute */ public frame setMarginWidth(String marginwidth) { addAttribute("marginwidth",marginwidth); return this; } /** Sets the marginheight="" attribute @param marginheight the marginheight="" attribute */ public frame setMarginHeight(int marginheight) { setMarginHeight(Integer.toString(marginheight)); return this; } /** Sets the marginheight="" attribute @param marginheight the marginheight="" attribute */ public frame setMarginHeight(String marginheight) { addAttribute("marginheight",marginheight); return this; } /** Sets the scrolling="" attribute @param scrolling the scrolling="" attribute */ public frame setScrolling(String scrolling) { addAttribute("scrolling",scrolling); return this; } /** Sets the noresize value @param noresize true or false */ public frame setNoResize(boolean noresize) { if ( noresize == true ) addAttribute("noresize", "noresize"); else removeAttribute("noresize"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public frame addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public frame addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public frame addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public frame addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public frame removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/title.java0000644000175000017500000001237507703353440022660 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <title></title> tag. @version $Id: title.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class title extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("title"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. You need to set the attributes using the set* methods. */ public title() { } /** This method creates a <title> tag and sets the Element value. @param value what goes between <start_tag> <end_tag> */ public title(String title) { addElement(title); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public title addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public title addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public title addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public title addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public title removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/sub.java0000644000175000017500000002023507703353440022322 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <sub> tag. @version $Id: sub.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class sub extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("sub"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public sub() { } /** Basic constructor. @param element Adds an Element to the element. */ public sub(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public sub(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public sub addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public sub addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public sub addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public sub addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public sub removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/map.java0000644000175000017500000002311107703353440022302 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <map> tag. @version $Id: map.java,v 1.2 2003/04/27 09:41:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class map extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("map"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public map() { } /** Basic constructor. @param element Adds an Element to the element. */ public map(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public map(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name sets the name="" attribute */ public map(Element element, String name) { addElement(element); setName ( name ); } /** Basic constructor. @param element Adds an Element to the element. @param name sets the name="" attribute */ public map(String element, String name) { addElement(element); setName ( name ); } /** Sets the name="" attribute @param name the name="" attribute */ public map setName(String name) { addAttribute("name",name); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public map addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public map addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public map addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public map addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public map removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/applet.java0000644000175000017500000002251607703353440023022 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <applet> tag. @version $Id: applet.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class applet extends MultiPartElement implements Printable { /** Private initializer. */ { setElementType("applet"); setCase(LOWERCASE); setAttributeQuote(true); } /** Default constructor. Creates the <applet/> Element.
use set* methods. */ public applet() { } /** Determines the base url for this applet. @param url base url for this applet. */ public applet setCodeBase(String url) { addAttribute("codebase",url); return(this); } /** Comma seperated archive list. @param url Comma seperate archive list. */ public applet setArchive(String url) { addAttribute("archive",url); return(this); } /** Applet class file. @param code applet class file. */ public applet setCode(String code) { addAttribute("code",code); return(this); } /** Suggested height of applet. @param height suggested link height. */ public applet setHeight(String height) { addAttribute("height",height); return(this); } /** Suggested height of applet. @param height suggested link height. */ public applet setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Suggested height of applet. @param height suggested link height. */ public applet setHeight(double height) { addAttribute("height",Double.toString(height)); return(this); } /** Suggested width of applet. @param height suggested link width. */ public applet setWidth(String width) { addAttribute("width",width); return(this); } /** Suggested width of applet. @param height suggested link width. */ public applet setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Suggested width of object. @param height suggested link width. */ public applet setWidth(double width) { addAttribute("width",Double.toString(width)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public applet setHSpace(String hspace) { addAttribute("hspace",hspace); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public applet setHSpace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public applet setHSpace(double hspace) { addAttribute("hspace",Double.toString(hspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public applet setVSpace(String vspace) { addAttribute("vspace",vspace); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public applet setVSpace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public applet setVSpace(double vspace) { addAttribute("vspace",Double.toString(vspace)); return(this); } /** Set the horizontal or vertical alignment of this applet.
Convience variables are in the AlignTypes interface. @param alignment Set the horizontal or vertical alignment of this applet.
Convience variables are in the AlignTypes interface. */ public applet setAlign(String alignment) { addAttribute("align",alignment); return(this); } /** Set the name of this applet. @param name set the name of this applet. */ public applet setName(String name) { addAttribute("name",name); return(this); } /** Serialized applet file. @param object Serialized applet file. */ // someone give me a better description of what this does. public applet setObject(String object) { addAttribute("object",object); return(this); } /** Breif description, alternate text for the applet. @param alt alternat text. */ public applet setAlt(String alt) { addAttribute("alt",alt); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public applet addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public applet addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public applet addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public applet addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public applet removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/a.java0000644000175000017500000003350507703353440021755 0ustar killerkiller /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <a> tag.

Please refer to the TestBed.java file for example code usage. @version $Id: a.java,v 1.2 2003/04/27 09:41:09 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class a extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("a"); setCase(LOWERCASE); // XHTML specific setAttributeQuote(true); // XHTML specific } /** Basic constructor. You need to set the attributes using the set* methods. */ public a() { } /** This constructor creates ah <a> tag. @param href the URI that goes between double quotes */ public a(String href) { setHref(href); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param value what goes between <start_tag> <end_tag> */ public a(String href, String value) { setHref(href); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param value what goes between <start_tag> <end_tag> */ public a(String href, Element value) { setHref(href); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param value what goes between <start_tag> <end_tag> */ public a(String href, String name, String value) { setHref(href); setName(name); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param value what goes between <start_tag> <end_tag> */ public a(String href, String name, Element value) { setHref(href); setName(name); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param target the target="" attribute @param value the value that goes between <start_tag> <end_tag> */ public a(String href, String name, String target, Element value) { setHref(href); setName(name); setTarget(target); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param target the target="" attribute @param value the value that goes between <start_tag> <end_tag> */ public a(String href, String name, String target, String value) { setHref(href); setName(name); setTarget(target); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param target the target="" attribute @param lang the lang="" and xml:lang="" attributes @param value the value that goes between <start_tag> <end_tag> */ public a(String href, String name, String target, String lang, String value) { setHref(href); setName(name); setTarget(target); setLang(lang); addElement(value); } /** This constructor creates an <a> tag. @param href the URI that goes between double quotes @param name the name="" attribute @param target the target="" attribute @param lang the lang="" and xml:lang="" attributes @param value the value that goes between <start_tag> <end_tag> */ public a(String href, String name, String target, String lang, Element value) { setHref(href); setName(name); setTarget(target); setLang(lang); addElement(value); } /** Sets the href="" attribute @param href the href="" attribute */ public a setHref(String href) { addAttribute("href",href); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public a setName(String name) { addAttribute("name",name); return this; } /** Sets the target="" attribute @param target the target="" attribute */ public a setTarget(String target) { addAttribute("target",target); return this; } /** Sets the rel="" attribute @param rel the rel="" attribute */ public a setRel(String rel) { addAttribute("rel",rel); return this; } /** Sets the rev="" attribute @param rev the rev="" attribute */ public a setRev(String rev) { addAttribute("rev",rev); return this; } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public a addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public a addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public a addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public a addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public a removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: label, input, select, textarea, and button. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onnlouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak() { java.util.Enumeration enum = elements(); int i=0; int j=0; while(enum.hasMoreElements()) { j++; Object obj = enum.nextElement(); if( obj instanceof img ) i++; } if ( i==j) return false; return true; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/strong.java0000644000175000017500000002047407703353440023052 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <strong> tag. @version $Id: strong.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class strong extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer */ { setElementType("strong"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods. */ public strong() { } /** Basic Constructor. Creats a strong object with its contents set. @param element set the content of the strong element */ public strong(String element) { addElement(element); } /** Basic Constructor. Creats a strong object with its contents set. @param element set the content of the strong element */ public strong(Element element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public strong addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public strong addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public strong addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public strong addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public strong removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/s.java0000644000175000017500000002020507703353440021770 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <s> tag. @version $Id: s.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class s extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("s"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public s() { } /** Basic constructor. @param element Adds an Element to the element. */ public s(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public s(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public s addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public s addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public s addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public s addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public s removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/tfoot.java0000644000175000017500000002423207703353440022665 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <tfoot> object. @version $Id: tfoot.java,v 1.2 2003/04/27 09:36:17 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class tfoot extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("tfoot"); setCase(LOWERCASE); setAttributeQuote(true); } public tfoot() { } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public tfoot setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the span="" attribute. @param span sets the span="" attribute. */ public tfoot setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public tfoot setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public tfoot setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the align="" attribute convience variables are provided in the AlignType interface @param align Sets the align="" attribute */ public tfoot setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the valign="" attribute convience variables are provided in the AlignType interface @param valign Sets the valign="" attribute */ public tfoot setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the char="" attribute. @param character the character to use for alignment. */ public tfoot setChar(String character) { addAttribute("char",character); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tfoot setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public tfoot setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tfoot addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public tfoot addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tfoot addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public tfoot addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public tfoot removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/object.java0000644000175000017500000003610707703353440023004 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates an <object> tag. @version $Id: object.java,v 1.2 2003/04/27 09:37:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class object extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("object"); setCase(LOWERCASE); setAttributeQuote(true); } /** Default constructor. Creates the <object/> element.
use set* methods. */ public object() { } /** Sets the declare attribute. (declare this object but don't instantiate it. @param declare declare on or off */ public object setDeclare(boolean declare) { if(declare) addAttribute("declare","declare"); else removeAttribute("declare"); return(this); } /** Identifies an implementation. @param url location of classid. */ public object setClassId(String url) { addAttribute("classid",url); return(this); } /** Sets the Internet content type for the code. @param codetype Sets the Internet content type for the code. */ public object setCodeType(String codetype) { addAttribute("codetype",codetype); return(this); } /** Determines the base path to resolve relative urls specified by classid. @param url base path to resolve relative urls specified by classid. */ public object setCodeBase(String url) { addAttribute("codebase",url); return(this); } /** This attribute specifies the location of the data to be rendered. @param url this attribute specifies the location of the data to be rendered. */ public object setData(String url) { addAttribute("data",url); return(this); } /** This attribute specifies the Internet Media Type for the data specified by data.
This should be a mime type. @param type a mime type for the data specifed by the data attribute. */ public object setType(String type) { addAttribute("type",type); return(this); } /** Space seperated archive list. @param url Space seperate archive list. */ // Anyone know what the hell this is? the spec is rather vague in its definition. public object setArchive(String url) { addAttribute("archive",url); return(this); } /** Message to show while the object is loading. @param cdata the message to show while the object is loading. */ public object setStandBy(String cdata) { addAttribute("standby",cdata); return(this); } /** Suggested link border width. @param border suggested link border width. */ public object setBorder(String border) { addAttribute("border",border); return(this); } /** Suggested link border width. @param border suggested link border width. */ public object setBorder(int border) { addAttribute("border",Integer.toString(border)); return(this); } /** Suggested link border width. @param border suggested link border width. */ public object setBorder(double border) { addAttribute("border",Double.toString(border)); return(this); } /** Suggested height of object. @param height suggested link height. */ public object setHeight(String height) { addAttribute("height",height); return(this); } /** Suggested height of object. @param height suggested link height. */ public object setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Suggested height of object. @param height suggested link height. */ public object setHeight(double height) { addAttribute("height",Double.toString(height)); return(this); } /** Suggested width of object. @param height suggested link width. */ public object setWidth(String width) { addAttribute("width",width); return(this); } /** Suggested width of object. @param height suggested link width. */ public object setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Suggested width of object. @param height suggested link width. */ public object setWidth(double width) { addAttribute("width",Double.toString(width)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public object setHSpace(String hspace) { addAttribute("hspace",hspace); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public object setHSpace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public object setHSpace(double hspace) { addAttribute("hspace",Double.toString(hspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public object setVSpace(String vspace) { addAttribute("vspace",vspace); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public object setVSpace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public object setVSpace(double vspace) { addAttribute("vspace",Double.toString(vspace)); return(this); } /** Set the horizontal or vertical alignment of this object.
Convience variables are in the AlignTypes interface. @param alignment Set the horizontal or vertical alignment of this object.
Convience variables are in the AlignTypes interface. */ public object setAlign(String alignment) { addAttribute("align",alignment); return(this); } /** Location of image map to use. @param url location of image map to use. */ public object setUseMap(String url) { addAttribute("usemap",url); return(this); } /** Object has shaped hypertext links. @param shape does the object have shaped hypertext links? */ public object setShapes(boolean shape) { if(shape) addAttribute("shapes","shapes"); else removeAttribute("shapes"); return(this); } /** Set the name of this object. @param name set the name of this object. */ public object setName(String name) { addAttribute("name",name); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public object setTabIndex(int number) { addAttribute("tabindex",Integer.toString(number)); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public object setTabIndex(String number) { addAttribute("tabindex",number); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public object addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public object addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public object addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public object addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public object removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/hr.java0000644000175000017500000002617507703353440022153 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.Enumeration; /** This class creates an <hr> tag. @version $Id: hr.java,v 1.2 2003/04/27 09:39:01 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class hr extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("hr"); setCase(LOWERCASE); setAttributeQuote(true); setBeginEndModifier('/'); } /** Basic constructor. Use the set* methods to set the attibutes. */ public hr() { } /** * Basic constructor * * @param width sets the width="" attribute */ public hr(String width) { setWidth(width); } /** * Basic constructor * * @param width sets the width="" attribute */ public hr(int width) { setWidth(width); } /** * Basic constructor * * @param width sets the width="" attribute * @param align sets the align="" attribute */ public hr(String width, String align) { setWidth(width); setAlign(align); } /** * Basic constructor * * @param width sets the width="" attribute * @param align sets the align="" attribute */ public hr(int width, String align) { setWidth(width); setAlign(align); } /** * Basic constructor * * @param width sets the width="" attribute * @param align sets the align="" attribute * @param size sets the size="" attribute */ public hr(String width, String align, String size) { setWidth(width); setAlign(align); setSize(size); } /** * Basic constructor * * @param width sets the width="" attribute * @param align sets the align="" attribute * @param size sets the size="" attribute */ public hr(String width, String align, int size) { setWidth(width); setAlign(align); setSize(size); } /** * Basic constructor * * @param width sets the width="" attribute * @param align sets the align="" attribute * @param size sets the size="" attribute */ public hr(int width, String align, int size) { setWidth(width); setAlign(align); setSize(size); } /** Sets the width="" attribute @param width the width="" attribute */ public hr setWidth(String width) { addAttribute("width",width); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public hr setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the align="" attribute @param align the align="" attribute */ public hr setAlign(String align) { addAttribute("align",align); return this; } /** Sets the size="" attribute @param hspace the size="" attribute */ public hr setSize(String size) { addAttribute("size",size); return this; } /** Sets the size="" attribute @param hspace the size="" attribute */ public hr setSize(int size) { addAttribute("size",Integer.toString(size)); return this; } /** Sets the noshade @param shade true or false */ public hr setNoShade(boolean shade) { if ( shade == true ) addAttribute("noshade", "noshade"); else removeAttribute("noshade"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public hr addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public hr addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public hr addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public hr addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public hr removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/option.java0000644000175000017500000003175307703353440023050 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <option> tag. The option tag defaults to not having a closing </option> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: option.java,v 1.2 2003/04/27 09:37:58 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class option extends MultiPartElement implements Printable, FocusEvents, FormEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("option"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public option() { } /** Basic constructor. Use the set* methods to set the values of the attributes. @param value sets the attribute value="" */ public option(String value) { setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute label="" @param value sets the attribute value="" */ public option(String label, String value) { setLabel(label); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute label="" @param value sets the attribute value="" */ public option(String label, int value) { setLabel(label); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute label="" @param value sets the attribute value="" */ public option(String label, double value) { setLabel(label); setValue(value); } /** Sets the label="" attribute @param label the label="" attribute */ public option setLabel(String label) { addAttribute("label",label); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public option setValue(String value) { addAttribute("value",value); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public option setValue(int value) { addAttribute("value",Integer.toString(value)); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public option setValue(double value) { addAttribute("value",Double.toString(value)); return this; } /** Sets the selected value @param selected true or false */ public option setSelected(boolean selected) { if ( selected == true ) addAttribute("selected", "selected"); else removeAttribute("selected"); return(this); } /** Sets the disabled value @param disabled true or false */ public option setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", "disabled"); else removeAttribute("disabled"); return(this); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public option addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public option addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public option addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public option addElement(String element) { addElementToRegistry(element); return(this); } /** Creates a group of options. @param Creates a group of options. */ public option[] addElement(String[] element) { option[] option = new option[element.length]; for(int x = 0; x < element.length; x++) { option[x]= new option().addElement(element[x]); } return(option); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public option removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: label, input, select, textarea, and button. @param The script */ public void setOnFocus(String script) { addAttribute ( "onfocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onblur", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onsubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onreset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onselect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: input, select, and textarea. @param The script */ public void setOnChange(String script) { addAttribute ( "onchange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/sup.java0000644000175000017500000002023507703353440022340 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <sup> tag. @version $Id: sup.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class sup extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("sup"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public sup() { } /** Basic constructor. @param element Adds an Element to the element. */ public sup(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public sup(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public sup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public sup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public sup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public sup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public sup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/small.java0000644000175000017500000002026507703353440022644 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <small> tag. @version $Id: small.java,v 1.2 2003/04/27 09:36:30 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class small extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("small"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor. */ public small() { } /** Basic constructor. @param element Adds an Element to the element. */ public small(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public small(String element) { addElement(element); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public small addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public small addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public small addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public small addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public small removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/xhtml/ol.java0000644000175000017500000002142307703353440022143 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.xhtml; import org.apache.ecs.*; /** This class creates a <ol> tag. @version $Id: ol.java,v 1.2 2003/04/27 09:37:58 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens @author Bojan Smojver */ public class ol extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("ol"); setCase(LOWERCASE); setAttributeQuote(true); } /** Basic constructor, use set* methods. */ public ol() { } /** Basic constructor, use set* methods. @param list an array of li objects to be added to the ol element. */ public ol(li[] list) { addElement(list); } /** Basic constructor, use set* methods. @param list an array of strings to be made into li objects and
added to the ol element. */ public ol(String[] list) { addElement(list); } /** Sets the lang="" and xml:lang="" attributes @param lang the lang="" and xml:lang="" attributes */ public Element setLang(String lang) { addAttribute("lang",lang); addAttribute("xml:lang",lang); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ol addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ol addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add a list to the ul @param list[] a list of li objects. */ public ol addElement(li[] list) { for(int x = 0; x < list.length; x++) { addElement(list[x]); } return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ol addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ol addElement(String element) { addElementToRegistry(element); return(this); } /** Add a list to the ol @param list a list of Strings to be converted to li objects. */ public ol addElement(String[] element) { li[] li = new li().addElement(element); addElement(li); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ol removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onclick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "ondblclick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onmousedown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onmouseup", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onmouseover", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onmousemove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onmouseout", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onkeypress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onkeydown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onkeyup", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Filter.java0000644000175000017500000000716507703353440021631 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This class creates an interface for all filters.

For example:


    Filter filter = new CharacterFilter();
    filter.addAttribute("$","dollar");
    filter.addAttribute("#",Entities.POUND);
    
    P p = new P();
    p.setFilter(filter);
    
    Document doc = new Document();
    doc.getBody().addElement(p);
    
The filter is applied when the addElement() method is called. @version $Id: Filter.java,v 1.2 2003/04/27 09:43:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface Filter { public Filter addAttribute(String name,Object attribute); public Filter removeAttribute(String name); public boolean hasAttribute(String key); public String process(String to_process); public String getInfo(); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Element.java0000644000175000017500000001601107703353440021763 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; /** This class describes an ElementFactory. @version $Id: Element.java,v 1.4 2003/04/27 09:43:24 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface Element extends ElementRegistry { /** Element to be rendered in all CAPS */ public static final int UPPERCASE = 1; /** Element to be rendered in all lowercase */ public static final int LOWERCASE = 2; /** Element to be rendered as specified by subclass */ public static final int MIXEDCASE = 3; /** Element tag to be rendered to the center of start_tag end_tag <_tag>
This is the default. */ public static final int CENTER = 4; /** Element tag to be rendered to the left of start_tag end_tag _tag<> */ public static final int LEFT = 5; /** Element tag to be rendered to the right of start_tag end_tag <>_tag */ public static final int RIGHT = 6; /** Set case type */ public void setCase(int type); /** Used to determine case setting */ public int getCase(); /** Get the version number of this codebase */ public String getVersion(); /** Set the HtmlElement type */ public void setElementType(String element_type); /** Get the HtmlElement type */ public String getElementType(); /** Set wether or not this Element needs a closing tag */ public void setNeedClosingTag(boolean close_tag); /** Get whether or not this Element needs a closing tag */ public boolean getNeedClosingTag(); /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak(); /** Set tag position. ElementFactory CENTER | LEFT | RIGHT */ public void setTagPosition(int position); /** Get tag position. How is the element supposed to be rendered. */ public int getTagPosition(); /** Set the start tag character. */ public void setStartTagChar(char start_tag); /** Get the start tag character. */ public char getStartTagChar(); /** Set the end tag character. */ public void setEndTagChar(char end_tag); /** Get the end tag character. */ public char getEndTagChar(); /* Set a modifer for the start of the tag. */ public Element setBeginStartModifier(char start_modifier); /** Get a modifier for the start of the tag if one exists. */ public char getBeginStartModifier(); /** Set a modifer for the end of the tag. */ public Element setBeginEndModifier(char start_modifier); /** Get the modifier for the end of the tag if one exists. */ public char getBeginEndModifier(); /* Set a modifer for the start of the tag. */ public Element setEndStartModifier(char start_modifier); /** Get a modifier for the start of the tag if one exists. */ public char getEndStartModifier(); /** Set a modifer for the end of the tag. */ public Element setEndEndModifier(char start_modifier); /** Get the modifier for the end of the tag if one exists. */ public char getEndEndModifier(); /** Set the filter state of the element. */ public Element setFilterState(boolean state); /** Get the filter state of the element. */ public boolean getFilterState(); /** Set the prettyPrint state of the element. */ public Element setPrettyPrint(boolean pretty_print); /** Get the prettyPrint state of the element. */ public boolean getPrettyPrint(); /** Set the tab level for pretty printing */ public void setTabLevel(int tabLevel); /** Get the tab level for pretty printing. */ public int getTabLevel(); /** Provide a way to output the element to a stream. */ public void output(OutputStream out); /** Provide a way to output the element to a PrintWriter. */ public void output(PrintWriter out); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html2ecs/0000755000175000017500000000000011126246123021242 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/html2ecs/package.html0000644000175000017500000000001707703353440023530 0ustar killerkiller jakarta-ecs-1.4.2/src/java/org/apache/ecs/html2ecs/Html2Ecs.java0000644000175000017500000002650407703353440023544 0ustar killerkillerpackage org.apache.ecs.html2ecs; /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ import java.util.Hashtable; import java.io.InputStream; import java.io.IOException; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.lang.reflect.Method; import org.apache.xerces.parsers.DOMParser; import org.xml.sax.InputSource; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Attr; import org.apache.ecs.filter.CharacterFilter; import org.apache.ecs.Entities; import org.xml.sax.SAXException; /** The point of this class is to create an HTML file -> ECS code converter. It is NOT required for ECS core execution. If it does not compile, it is because you need to get the Xerces XML parser for Java from xml.apache.org.

This class is presently fairly broken and is really only shown as an example. Contributions towards making this class would be MOST appreciated. Please subscribe to the ECS mailing list and express your interest there. */ public class Html2Ecs extends Hashtable { private static org.w3c.dom.Document doc; private static DOMParser parser; private static InputStream input; // Private Initializer // Map XML Elements to ECS Elements { put("A","org.apache.ecs.html.A"); put("ABBR","org.apache.ecs.html.Abbr"); put("ACRONYM","org.apache.ecs.html.Acronym"); put("ADDRESS","org.apache.ecs.html.Address"); put("APPLET","org.apache.ecs.html.Applet"); put("AREA","org.apache.ecs.html.Area"); put("B","org.apache.ecs.B"); put("BASE","org.apache.ecs.html.Base"); put("BASEFONT","org.apache.ecs.html.BaseFont"); put("BDO","org.apache.ecs.html.Bdo"); put("BIG","org.apache.ecs.html.Big"); put("BLINK","org.apache.ecs.html.Blink"); put("BLOCKQUOTE","org.apache.ecs.html.BlockQuote"); put("BODY","org.apache.ecs.html.Body"); put("BR","org.apache.ecs.html.BR"); put("BUTTON","org.apache.ecs.html.Button"); put("CAPTION","org.apache.ecs.html.Caption"); put("CENTER","org.apache.ecs.html.Center"); put("CITE","org.apache.ecs.html.Cite"); put("CODE","org.apache.ecs.html.Code"); put("COL","org.apache.ecs.html.Col"); put("COLGROUP","org.apache.ecs.html.ColGroup"); put("COMMENT","org.apache.ecs.html.Comment"); put("DD","org.apache.ecs.html.DD"); put("DEL","org.apache.ecs.html.Del"); put("DFN","org.apache.ecs.html.Dfn"); put("DIV","org.apache.ecs.html.Div"); put("DL","org.apache.ecs.html.DL"); put("EM","org.apache.ecs.html.EM"); put("FILEDSET","org.apache.ecs.html.FieldSet"); put("FONT","org.apache.ecs.html.Font"); put("FORM","org.apache.ecs.html.Form"); put("FRAME","org.apache.ecs.html.Frame"); put("FRAMESET","org.apache.ecs.html.FrameSet"); put("H1","org.apache.ecs.html.H1"); put("H2","org.apache.ecs.html.H2"); put("H3","org.apache.ecs.html.H3"); put("H4","org.apache.ecs.html.H4"); put("H5","org.apache.ecs.html.H5"); put("H6","org.apache.ecs.html.H6"); put("HEAD","org.apache.ecs.html.Head"); put("HR","org.apache.ecs.html.HR"); put("HTML","org.apache.ecs.html.Html"); put("I","org.apache.ecs.html.I"); put("IFRAME","org.apache.ecs.html.IFrame"); put("IMG","org.apache.ecs.html.IMG"); put("INPUT","org.apache.ecs.html.Input"); put("INS","org.apache.ecs.html.Ins"); put("KBD","org.apache.ecs.html.Kbd"); put("LABEL","org.apache.ecs.html.Label"); put("LEGEND","org.apache.ecs.html.Legend"); put("LI","org.apache.ecs.html.LI"); put("LINK","org.apache.ecs.html.Link"); put("MAP","org.apache.ecs.html.Map"); put("META","org.apache.ecs.html.Meta"); put("NOBR","org.apache.ecs.html.NOBR"); put("NOFRAMES","org.apache.ecs.html.NoFrames"); put("NOSCRIPT","org.apache.ecs.html.NoScript"); put("OBJECT","org.apache.ecs.html.ObjectElement"); put("OL","org.apache.ecs.html.OL"); put("OPTGROUP","org.apache.ecs.html.OptGroup"); put("OPTION","org.apache.ecs.html.Option"); put("P","org.apache.ecs.html.P"); put("PARAM","org.apache.ecs.html.Param"); put("PRE","org.apache.ecs.html.PRE"); put("Q","org.apache.ecs.html.Q"); put("S","org.apache.ecs.html.S"); put("SAMP","org.apache.ecs.html.Samp"); put("SCRIPT","org.apache.ecs.html.Script"); put("SELECT","org.apache.ecs.html.Select"); put("SMALL","org.apache.ecs.html.Small"); put("SPAN","org.apache.ecs.html.Span"); put("STRIKE","org.apache.ecs.html.Strike"); put("STRONG","org.apache.ecs.html.Strong"); put("STYLE","org.apache.ecs.html.Style"); put("SUB","org.apache.ecs.html.Sub"); put("SUP","org.apache.ecs.html.Sup"); put("TABLE","org.apache.ecs.html.Table"); put("TBODY","org.apache.ecs.html.TBody"); put("TD","org.apache.ecs.html.TD"); put("THEAD","org.apache.ecs.html.THead"); put("TITLE","org.apache.ecs.html.Title"); put("TR","org.apache.ecs.html.TR"); put("TT","org.apache.ecs.html.TT"); put("U","org.apache.ecs.html.U"); put("UL","org.apache.ecs.html.UL"); put("VAR","org.apache.ecs.html.Var"); } public Html2Ecs() { super(4); } private void process( Node node ) { while( node != null) { constructElement(node); // If it has children loop through them if ( node.hasChildNodes() && !node.getNodeName().equals("#document") && get(node.getNodeName()) == null ) { System.out.print(".addElement("); process ( node.getFirstChild() ); System.out.println(")"); } else { process ( node.getFirstChild() ); } // move to the next node. node = node.getNextSibling(); System.out.print("\n"); } } private void constructElement( Node node ) { if( get(node.getNodeName().toUpperCase()) != null ) { System.out.print("new "); System.out.print(get(node.getNodeName().toUpperCase())); System.out.print("()"); } constructAttributes( node ); constructValue( node ); } private void constructValue( Node node ) { CharacterFilter cf = new CharacterFilter(); cf.addAttribute("\"",Entities.QUOT); if( node.getNodeName().equals("#text") && node.getNodeValue().length() > 1 ) { System.out.print(".addElement(\""); System.out.print(node.getNodeValue()); System.out.print("\")"); } } private void constructAttributes( Node node ) { NamedNodeMap attrList = node.getAttributes(); Attr attr; Class c = null; try { c = Class.forName( (String) get(node.getNodeName().toUpperCase()) ); } catch(Exception e) { } if( attrList != null && c != null) { for(int x = 0; x < attrList.getLength(); x++) { attr = (Attr) attrList.item(x); Method[] m = c.getMethods(); for(int y = 0; y < m.length; ++y) { if(m[y].getName().toLowerCase().endsWith(attr.getName().toLowerCase())) { System.out.print("."); System.out.print(m[y].getName()); System.out.print("(\""); System.out.print(attr.getValue()); System.out.print("\")"); break; } } } } } public static void main(String[] args) { Html2Ecs html2ecs = new Html2Ecs(); try { input = new FileInputStream( args[0] ); parser = new DOMParser(); parser.parse(new InputSource(input)); doc = parser.getDocument(); } catch(SAXException se) { System.out.println(se.toString()); } catch(FileNotFoundException fnfe) { System.out.println(fnfe.toString()); } catch(IOException ioe) { System.out.println(ioe.toString()); } html2ecs.process( doc ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/AlignType.java0000644000175000017500000001054007703353440022267 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require alignment attributes. @version $Id: AlignType.java,v 1.2 2003/04/27 09:44:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface AlignType { // convience variables public final static String CENTER = "center"; public final static String TOP = "top"; public final static String BOTTOM = "bottom"; public final static String ABSBOTTOM = "absbottom"; public final static String ABSMIDDLE = "absmiddle"; public final static String TEXTTOP = "texttop"; public final static String LEFT = "left"; public final static String RIGHT = "right"; public final static String MIDDLE = "middle"; public final static String BASELINE = "baseline"; // convience variables public final static String center = "center"; public final static String top = "top"; public final static String bottom = "bottom"; public final static String absbottom = "absbottom"; public final static String absmiddle = "absmiddle"; public final static String texttop = "texttop"; public final static String left = "left"; public final static String right = "right"; public final static String middle = "middle"; public final static String baseline = "baseline"; /** make sure implementing classes have a setAlign method. */ public abstract void setAlign(String alignment); /** make sure implementing classes have a setVAlign method. */ public abstract void setVAlign(String alignment); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ConcreteElement.java0000644000175000017500000004053707703353440023460 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Writer; import java.io.IOException; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.StreamCorruptedException; import java.util.Enumeration; import java.util.Vector; import java.util.Hashtable; /** This class is to be subclassed by those elements that are made up of other elements. i.e. BODY,HEAD,etc. @version $Id: ConcreteElement.java,v 1.31 2003/05/13 12:23:18 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class ConcreteElement extends ElementAttributes implements Cloneable { /** The line separator to use for pretty printing */ private static String lineSeparator = System.getProperty("line.separator"); /** @serial registry registry */ private Hashtable registry = new Hashtable(4); // keep a list of elements that need to be added to the element /** Maintain an ordered list of elements */ private Vector registryList = new Vector(2); public ConcreteElement() { } /** If the object is in the registry return otherwise return null. @param element the name of the object to locate. */ public ConcreteElement getElement(String element) { if(registry.containsKey(element)) { return (ConcreteElement)registry.get(element); } return null; } /** Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(Element element) { if ( element == null ) return(this); addElementToRegistry(Integer.toString(element.hashCode()),element); return(this); } /** Registers an element in the head element list @param hashcode internal name of element @param element element to be added to the registry. */ public Element addElementToRegistry(String hashcode,Element element) { if ( hashcode == null || element == null ) return(this); element.setFilterState(getFilterState()); if(ECSDefaults.getDefaultPrettyPrint() != element.getPrettyPrint()) element.setPrettyPrint(getPrettyPrint()); registry.put(hashcode,element); if(!registryList.contains(hashcode)) registryList.addElement(hashcode); return(this); } /** Registers an element in the head element list @hashcode named element for hashcode @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(Element element,boolean filter) { if ( element == null ) return(this); setFilterState(filter); addElementToRegistry(Integer.toString(element.hashCode()),element); return(this); } /** Registers an element in the head element list @param element element to be added to the registry. @param filter should we filter this element? */ public Element addElementToRegistry(String hashcode, Element element,boolean filter) { if ( hashcode == null ) return(this); setFilterState(filter); addElementToRegistry(hashcode,element); return(this); } /** Registers an element in the head element list @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(String value,boolean filter) { if ( value == null ) return(this); setFilterState(filter); addElementToRegistry(Integer.toString(value.hashCode()),value); return(this); } /** Registers an element in the head element list @hashcode named element for hashcode @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(String hashcode, String value,boolean filter) { if ( hashcode == null ) return(this); setFilterState(filter); addElementToRegistry(hashcode,value); return(this); } /** Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(String value) { if ( value == null ) return(this); addElementToRegistry(new StringElement(value)); return(this); } /** Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(String hashcode,String value) { if ( hashcode == null ) return(this); // We do it this way so that filtering will work. // 1. create a new StringElement(element) - this is the only way that setTextTag will get called // 2. copy the filter state of this string element to this child. // 3. copy the prettyPrint state of the element to this child // 4. copy the filter for this string element to this child. StringElement se = new StringElement(value); se.setFilterState(getFilterState()); se.setFilter(getFilter()); se.setPrettyPrint(getPrettyPrint()); addElementToRegistry(hashcode,se); return(this); } /** Removes an element from the element registry @param element element to be added to the registry. */ public Element removeElementFromRegistry(Element element) { removeElementFromRegistry(Integer.toString(element.hashCode())); return(this); } /** Removes an element from the head element registry @param hashcode element to be added to the registry. */ public Element removeElementFromRegistry(String hashcode) { registry.remove(hashcode); registryList.removeElement(hashcode); return(this); } /** Find out if this element is in the element registry. @param element find out if this element is in the registry */ public boolean registryHasElement(Element element) { return(registry.contains(element)); } /** Get the keys of this element. */ public Enumeration keys() { return(registryList.elements()); } /** Get an enumeration of the elements that this element contains. */ public Enumeration elements() { return(registry.elements()); } /** Find out if this element is in the element registry. @param element find out if this element is in the registry */ public boolean registryHasElement(String hashcode) { return(registry.containsKey(hashcode)); } /** Overload output(OutputStream). @param output OutputStream to write to. @param ConcreteElement Instance of ConcreteElement */ public static void output(OutputStream out, ConcreteElement ce) { // use the encoding for the given element String encoding = ce.getCodeSet(); if ( encoding == null ) { // By default use Big Endian Unicode. // In this way we will not loose any information. encoding = "UTF-16BE"; } boolean prettyPrint = ce.getPrettyPrint(); int tabLevel = ce.getTabLevel(); try { if (ce.registry.size() == 0) { ce.output(out); } else { if ((prettyPrint && ce instanceof Printable) && (tabLevel > 0)) ce.putTabs(tabLevel, out); out.write(ce.createStartTag().getBytes(encoding)); // If this is a StringElement that has ChildElements still print the TagText if(ce.getTagText() != null) out.write(ce.getTagText().getBytes(encoding)); Enumeration enum = ce.registryList.elements(); while(enum.hasMoreElements()) { Object obj = ce.registry.get((String)enum.nextElement()); if(obj instanceof GenericElement) { Element e = (Element)obj; if (prettyPrint && ce instanceof Printable) { if ( ce.getNeedLineBreak() ) { out.write(ce.lineSeparator.getBytes(encoding)); e.setTabLevel(tabLevel + 1); } } e.output(out); } else { if (prettyPrint && ce instanceof Printable) { if ( ce.getNeedLineBreak() ) { out.write(ce.lineSeparator.getBytes(encoding)); ce.putTabs(tabLevel + 1, out); } } String string = obj.toString(); out.write(string.getBytes(encoding)); } } if (ce.getNeedClosingTag()) { if (prettyPrint && ce instanceof Printable) { if ( ce.getNeedLineBreak() ) { out.write(ce.lineSeparator.getBytes(encoding)); if (tabLevel > 0) ce.putTabs(tabLevel, out); } } out.write(ce.createEndTag().getBytes(encoding)); } } } catch(IOException ioe) { ioe.printStackTrace(new PrintWriter(out)); } } /** Override output(OutputStream) incase any elements are in the registry. @param output OutputStream to write to. */ public void output(OutputStream out) { if (this.registry.size() == 0) { int tabLevel = getTabLevel(); if ((getPrettyPrint() && this instanceof Printable) && (tabLevel > 0)) { try { this.putTabs(tabLevel, out); } catch(IOException ioe) { ioe.printStackTrace(new PrintWriter(out)); } } super.output(out); } else { output(out,this); } } /** Writer version of this method. */ public void output(Writer out) { PrintWriter pw = new PrintWriter(out); output ( pw ); pw.flush(); } /** Override output(BufferedWriter) incase any elements are in the registry. @param output OutputStream to write to. */ public void output(PrintWriter out) { boolean prettyPrint = getPrettyPrint(); int tabLevel = getTabLevel(); if (registry.size() == 0) { if ((prettyPrint && this instanceof Printable) && (tabLevel > 0)) putTabs(tabLevel, out); super.output(out); } else { if ((prettyPrint && this instanceof Printable) && (tabLevel > 0)) putTabs(tabLevel, out); out.write(createStartTag()); // If this is a StringElement that has ChildElements still print the TagText if(getTagText() != null) out.write(getTagText()); Enumeration enum = registryList.elements(); while(enum.hasMoreElements()) { Object obj = registry.get((String)enum.nextElement()); if(obj instanceof GenericElement) { Element e = (Element)obj; if (prettyPrint && this instanceof Printable) { if (getNeedLineBreak()) { out.write(lineSeparator); e.setTabLevel(tabLevel + 1); } } e.output(out); } else { if (prettyPrint && this instanceof Printable) { if (getNeedLineBreak()) { out.write(lineSeparator); putTabs(tabLevel + 1, out); } } String string = obj.toString(); if(getFilterState()) out.write(getFilter().process(string)); else out.write(string); } } if (getNeedClosingTag()) { if (prettyPrint && this instanceof Printable) { if (getNeedLineBreak()) { out.write(lineSeparator); if (tabLevel > 0) putTabs(tabLevel, out); } } out.write(createEndTag()); } } } /** Allows all Elements the ability to be cloned. */ public Object clone() { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(this); out.close(); ByteArrayInputStream bin = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bin); Object clone = in.readObject(); in.close(); return(clone); } catch(ClassNotFoundException cnfe) { throw new InternalError(cnfe.toString()); } catch(StreamCorruptedException sce) { throw new InternalError(sce.toString()); } catch(IOException ioe) { throw new InternalError(ioe.toString()); } } public boolean isEmpty() { return registryList.isEmpty(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/factory/0000755000175000017500000000000011126246123021170 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/factory/DOMFactory.java0000644000175000017500000001124507703353440024014 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.factory; import java.io.StringReader; import java.io.ByteArrayOutputStream; import java.io.OutputStream; import org.apache.xerces.parsers.DOMParser; import org.w3c.dom.Document; public class DOMFactory { private ByteArrayOutputStream outStream = new ByteArrayOutputStream(); /** Default Constructor. Here is a simple example on how to use this class.

        PI p = new PI();
        p.setVersion(1.0);
        XML x = new XML("root",true);
        XML x1 = new XML("page",true);
        XML x2 = new XML("paragraph");
        XML x3 = new XML("paragraph");
        x2.addElement("This is the first Paragraph");
        x3.addElement("This is the second Paragraph");
        x.addElement(x1.addElement(x2).addElement(x3));
        p.addElement(x);
        DOMFactory d = new DOMFactory();
        p.output(d.getOutputStream());

        Document doc = d.createDOM();
      
*/ public DOMFactory() { } /** Gets the output stream for the ecs element to write to. */ public OutputStream getOutputStream() { return outStream; } /** Creates a Document from the root element of the XML Stream. */ public Document createDOM() { DOMParser parser = null; Document doc = null; try { outStream.close(); // before we parse the InputStream make sure the pipe is closed. StringReader reader = new StringReader(outStream.toString()); parser = new DOMParser(); parser.parse(new org.xml.sax.InputSource(reader)); doc = parser.getDocument(); } catch(java.io.IOException ioe) { System.err.println(ioe.toString()); ioe.printStackTrace(); } catch(org.xml.sax.SAXException sax) { System.err.println(sax.toString()); sax.printStackTrace(); } return doc; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/StringElement.java0000644000175000017500000001345007703353440023156 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; /** This class is used to create a String element in ECS. A StringElement has no tags wrapped around it, it is an Element without tags. @version $Id: StringElement.java,v 1.5 2003/04/27 09:42:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class StringElement extends ConcreteElement implements Printable { /** Basic constructor */ public StringElement() { } /** Basic constructor */ public StringElement(String string) { if (string != null) setTagText(string); else setTagText(""); } /** Basic constructor */ public StringElement(Element element) { addElement(element); } private StringElement append(String string) { setTagText(getTagText()+string); return this; } /** Resets the interal string to be empty. */ public StringElement reset() { setTagText(""); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public StringElement addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public StringElement addElement(String hashcode,String element) { // We do it this way so that filtering will work. // 1. create a new StringElement(element) - this is the only way that setTextTag will get called // 2. copy the filter state of this string element to this child. // 3. copy the filter for this string element to this child. StringElement se = new StringElement(element); se.setFilterState(getFilterState()); se.setFilter(getFilter()); addElementToRegistry(hashcode,se); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public StringElement addElement(String element) { addElement(Integer.toString(element.hashCode()),element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public StringElement addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public StringElement removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } public String createStartTag() { return(""); } public String createEndTag() { return(""); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/KeyEvents.java0000644000175000017500000000757407703353440022325 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require javascript key event attributes. @version $Id: KeyEvents.java,v 1.4 2003/04/27 09:45:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface KeyEvents { /** make sure implementing classes have a setOnKeyPress method. The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. */ public abstract void setOnKeyPress(String script); /** make sure implementing classes have a setOnKeyDown method. The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. */ public abstract void setOnKeyDown(String script); /** make sure implementing classes have a setOnKeyUp method. The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. */ public abstract void setOnKeyUp(String script); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/GenericElement.java0000644000175000017500000005306707703353440023274 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.Writer; import java.io.StringWriter; import java.io.PrintWriter; import java.io.OutputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.Serializable; import org.apache.ecs.filter.CharacterFilter; import java.util.Hashtable; /** This class implements the ElementFactory. @version $Id: GenericElement.java,v 1.21 2003/04/27 09:45:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public abstract class GenericElement implements Element,Serializable { /** Create default filter to use in all GenericElements Can be overridden by setFilter method. Of course using getFilter then modifying will have some interesting side effects, like changing the global defaults. */ private static Filter _defaultFilter = new CharacterFilter(); /** Filter to use to escape input @serial filter filter */ private Filter filter = _defaultFilter; /** position of tag relative to start and end. @serial position position */ private int position = ECSDefaults.getDefaultPosition(); /** Should we filter the value of <>VALUE</> @serial filter_state filter_state */ private boolean filter_state = ECSDefaults.getDefaultFilterState(); /** Should we print html in a more readable format? @serial pretty_print pretty_print */ private boolean pretty_print = ECSDefaults.getDefaultPrettyPrint(); /** Version number for codebase @serial VERSION VERSION */ private static final String VERSION = "1.4.2"; /** Default value to set case type @serial case_type case_type */ private int case_type = ECSDefaults.getDefaultCaseType(); /** Where to get the element definition from @serial element element */ private Hashtable element = new Hashtable(4); /** Does this element need a closing tag? @serial end_element end_element */ private boolean end_element = ECSDefaults.getDefaultEndElement(); /** What codeset are we going to use the default is 8859_1 @serial codeset codeset */ private String codeset = ECSDefaults.getDefaultCodeset(); /** What the start modifier should be @serial begin_start_modifier begin_start_modifier */ private char begin_start_modifier = ECSDefaults.getDefaultBeginStartModifier(); /** What the start modifier should be @serial end_start_modifier end_start_modifier */ private char end_start_modifier = ECSDefaults.getDefaultEndStartModifier(); /** What the end modifier should be @serial begin_end_modifier begin_end_modifier */ private char begin_end_modifier = ECSDefaults.getDefaultBeginEndModifier(); /** What the end modifier should be @serial end_end_modifier end_end_modifier */ private char end_end_modifier = ECSDefaults.getDefaultEndEndModifier(); /** What the modifier should be...optimization variable @serial start_modifier_defined start_modifier_defined */ private boolean start_modifier_defined = false; /** What the modifier should be...optimization variable @serial begin_start_modifier_defined begin_start_modifier_defined */ private boolean begin_start_modifier_defined = false; /** What the modifier should be...optimization variable @serial end_start_modifier_defined end_start_modifier_defined */ private boolean end_start_modifier_defined = false; /** What the modifier should be...optimization variable @serial begin_end_modifier_defined begin_end_modifier_defined */ private boolean begin_end_modifier_defined = false; /** What the modifier should be...optimization variable @serial end_end_modifier_defined end_end_modifier_defined */ private boolean end_end_modifier_defined = false; /** What the modifier should be...optimization variable @serial end_modifier_defined end_modifier_defined */ private boolean end_modifier_defined = false; /** Our current tab level. @serial tabLevel tabLevel */ protected int tabLevel = 0; /** @serial start_tag start_tag */ private char start_tag = ECSDefaults.getDefaultStartTag(); /** @serial end_tag end_tag */ private char end_tag = ECSDefaults.getDefaultEndTag(); /** @serial __text __text */ private String __text = new String(); /** Location to store element_type at. @serial element_type element_type */ private String element_type = new String(); /** Base class for defining all elements. */ public GenericElement() { } /** Do we want to do pretty printing? */ public boolean getPrettyPrint() { return(pretty_print); } /** Do we want to pretty print? @param pretty_print turn pretty printing on or off. */ public Element setPrettyPrint(boolean pretty_print) { this.pretty_print = pretty_print; return(this); } /** Get the Hashtable representation of an element. */ protected Hashtable getElementHashEntry() { return(element); } /** set the filter state of the element. @param filter_state (true|false) do we want to use a filter? default true; */ public Element setFilterState(boolean filter_state) { this.filter_state = filter_state; return(this); } /** get the filter state of the element. */ public boolean getFilterState() { return(filter_state); } /** Get the filter that is currently in use. */ public Filter getFilter() { return(filter); } /** Override the default filter with a user supplied filter. */ public void setFilter(Filter filter) { this.filter = filter; } /** What version of htmlGen is this? */ public String getVersion() { return(VERSION); } /** Determine what case the html element should be rendered. Default is MIXEDCASE */ public void setCase(int case_type) { this.case_type = case_type; } /** Find out what case the element is supposed to be rendered in. */ public int getCase() { return(case_type); } /** Determine what type of element this is A,BR,EM,ACRONYM */ public void setElementType(String element_type) { this.element_type = element_type; } /** Find out what type of element this is. */ public String getElementType() { return(element_type); } /** Determine what codeset should be used. */ public void setCodeSet(String codeset) { this.codeset = codeset; } /** Find out what the current codeset is. */ public String getCodeSet() { return(codeset); } /** Does this element need a closing tag. Default is true */ public void setNeedClosingTag(boolean close) { end_element = close; } /** Determine if this element needs to be closed. */ public boolean getNeedClosingTag() { return(end_element); } /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak() { return true; } /** Set the position of the tag to be rendered at in relation to start_element_char */ public void setTagPosition(int position) { this.position = position; } /** Get the position the tag is to be rendered at. */ public int getTagPosition() { return(position); } /** Alter the case of this element so that it is rendered according to whatever the value of case_type is. Default is MIXEDCASE */ protected String alterCase(String value) { switch (getCase()) { case UPPERCASE: return value.toUpperCase(); case LOWERCASE: return value.toLowerCase(); default: return value; } } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? ?> */ public Element setBeginModifier(char modifier) { setBeginStartModifier(modifier); setBeginEndModifier(modifier); setBeginStartModifierDefined(true); setBeginEndModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? > */ public Element setBeginStartModifier(char modifier) { this.begin_start_modifier = modifier; setBeginStartModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in < ?> */ public Element setBeginEndModifier(char modifier) { this.begin_end_modifier = modifier; setBeginEndModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? ?> */ public Element setBeginModifier(char start_modifier,char end_modifier) { this.begin_start_modifier = start_modifier; this.begin_end_modifier = end_modifier; setBeginStartModifierDefined(true); setBeginEndModifierDefined(true); return(this); } /** What is the element modifier for this tag. */ public char getBeginStartModifier() { return(begin_start_modifier); } /** What is the element modifier for this tag. */ public char getBeginEndModifier() { return(begin_end_modifier); } /** Remove the element modifier for this tag. */ public Element removeBeginStartModifier() { setBeginStartModifierDefined(false); return(this); } /** Remove the element modifier for this tag. */ public Element removeBeginEndModifier() { setBeginEndModifierDefined(false); return(this); } /** Modifier optimization */ private void setBeginStartModifierDefined(boolean val) { this.begin_start_modifier_defined = val; } /** Modifier optimization */ private void setBeginEndModifierDefined(boolean val) { this.begin_end_modifier_defined = val; } /** Modifier optimization */ protected boolean getEndStartModifierDefined() { return this.end_start_modifier_defined; } /** Modifier optimization */ protected boolean getEndEndModifierDefined() { return this.end_end_modifier_defined; } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? ?> */ public Element setEndModifier(char modifier) { setEndStartModifier(modifier); setEndEndModifier(modifier); setEndStartModifierDefined(true); setEndEndModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? > */ public Element setEndStartModifier(char modifier) { this.end_start_modifier = modifier; setEndStartModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in < ?> */ public Element setEndEndModifier(char modifier) { this.end_end_modifier = modifier; setEndEndModifierDefined(true); return(this); } /** Set the element modifier the default is no modifier. @param modifier the modifier for the element a ? would result
in <? ?> */ public Element setEndModifier(char start_modifier,char end_modifier) { this.end_start_modifier = start_modifier; this.end_end_modifier = end_modifier; setEndStartModifierDefined(true); setEndEndModifierDefined(true); return(this); } /** What is the element modifier for this tag. */ public char getEndStartModifier() { return(end_start_modifier); } /** What is the element modifier for this tag. */ public char getEndEndModifier() { return(end_end_modifier); } /** Remove the element modifier for this tag. */ public Element removeEndStartModifier() { setEndStartModifierDefined(false); return(this); } /** Remove the element modifier for this tag. */ public Element removeEndEndModifier() { setEndEndModifierDefined(false); return(this); } /** Modifier optimization */ private void setEndStartModifierDefined(boolean val) { this.end_start_modifier_defined = val; } /** Modifier optimization */ private void setEndEndModifierDefined(boolean val) { this.end_end_modifier_defined = val; } /** Modifier optimization */ protected boolean getBeginStartModifierDefined() { return this.begin_start_modifier_defined; } /** Modifier optimization */ protected boolean getBeginEndModifierDefined() { return this.begin_end_modifier_defined; } /** Set the start tag character. */ public void setStartTagChar(char start_tag) { this.start_tag = start_tag; } /** Get the start tag character. */ public char getStartTagChar() { return(start_tag); } /** Set the end tag character. */ public void setEndTagChar(char end_tag) { this.end_tag = end_tag; } /** Get the end tag character. */ public char getEndTagChar() { return(end_tag); } public String getTagText() { return(__text); } public Element setTagText(String text) { this.__text = (text); return(this); } public String createStartTag() { StringBuffer sb = new StringBuffer(); sb.append(getStartTagChar()); if(getBeginStartModifierDefined()) { sb.append(getBeginStartModifier()); } sb.append(getElementType()); if(getBeginEndModifierDefined()) { sb.append(getBeginEndModifier()); } sb.append(getEndTagChar()); return(sb.toString()); } public String createEndTag() { setEndStartModifier('/'); StringBuffer sb = new StringBuffer(); sb.append(getStartTagChar()); if(getEndStartModifierDefined()) { sb.append(getEndStartModifier()); } sb.append(getElementType()); if(getEndEndModifierDefined()) { sb.append(getEndEndModifier()); } sb.append(getEndTagChar()); return(sb.toString()); } /** Override toString() method to print something meaningful */ public final String toString() { StringWriter write = new StringWriter(); String out = null; try { output(write); write.flush(); out = write.toString(); write.close(); } catch (UnsupportedEncodingException use) { use.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } return(out); } /** Override toString(encode) method to print something meaningful */ public final String toString(String codeset) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); BufferedOutputStream bos = new BufferedOutputStream(baos); String out = null; try { output(bos); bos.flush(); out = baos.toString(codeset); bos.close(); baos.close(); } catch (UnsupportedEncodingException use) { } catch (IOException ioe) { } return(out); } /** Add the element to the designated OutputStream. */ public void output(OutputStream out) { String encoding = null; if ( getCodeSet() != null ) { encoding = getCodeSet(); } else { //By default use Big Endian Unicode. //In this way we will not loose any information. encoding = "UTF-16BE"; } try { out.write(createStartTag().getBytes(encoding)); if(getFilterState()) out.write(getFilter().process(getTagText()).getBytes(encoding)); else out.write(getTagText().getBytes(encoding)); if (getNeedClosingTag()) out.write(createEndTag().getBytes(encoding)); } catch (UnsupportedEncodingException uee) { uee.printStackTrace(new PrintWriter(out)); } catch (IOException ioe) { ioe.printStackTrace(new PrintWriter(out)); } } /** Add element to the designated PrintWriter. */ public void output(PrintWriter out) { out.write(createStartTag()); if(getFilterState()) out.write(getFilter().process(getTagText())); else out.write(getTagText()); if (getNeedClosingTag()) out.write(createEndTag()); } /** Writer version of this method. */ public void output(Writer out) { output ( new PrintWriter(out) ); } /** Set the tab level for pretty printing */ public void setTabLevel(int tabLevel) { this.tabLevel = tabLevel; } public int getTabLevel() { return tabLevel; } protected void putTabs(int tabCount, OutputStream out) throws IOException { for (int i = 0; i < tabCount; i++) out.write('\t'); } protected void putTabs(int tabCount, PrintWriter out) { for (int i = 0; i < tabCount; i++) out.print('\t'); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/0000755000175000017500000000000011126246123020320 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/I.java0000644000175000017500000000706007703353440021365 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the <i> element. @version $Id: I.java,v 1.2 2003/04/27 09:27:25 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class I extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public I() { setElementType("i"); } /** Adds an Element to the element. @param element the element to add */ public I addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public I addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Postfield.java0000644000175000017500000000754107703353440023132 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the postfield element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Postfield extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Postfield() { setBeginEndModifier('/'); setElementType("postfield"); } /** Constructor. @param name the name="" attribute @param value the value="" attribute */ public Postfield(String name, String value) { this(); setValue(value); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Postfield setName(String name) { addAttribute("name", name); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public Postfield setValue(String value) { addAttribute("value", value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Access.java0000644000175000017500000001426207703353440022400 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** * This represents a <access> element. */ public class Access extends org.apache.ecs.MultiPartElement implements org.apache.ecs.Printable { /** Private initialization routine. */ { setElementType("access"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Access() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H1>value</H1> */ public Access(org.apache.ecs.Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H1>value</H1> */ public Access(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Access addElement(String hashcode,org.apache.ecs.Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Access addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Access addElement(org.apache.ecs.Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Access addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Access removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } //------------------------Attributes /** * Get the Domain attribute. */ public String getDomain() { return getAttribute("domain"); } /** * Set the Domain attribute. */ public Access setDomain(String value) { addAttribute("domain",value); return this; } /** * Get the Path attribute. */ public String getPath() { return getAttribute("path"); } /** * Set the Path attribute. */ public Access setPath(String value) { addAttribute("path",value); return this; } /** * Get the Id attribute. */ public String getId() { return getAttribute("id"); } /** * Set the Id attribute. */ public Access setId(String value) { addAttribute("id",value); return this; } /** * Get the Classname attribute. */ public String getClassname() { return getAttribute("class"); } /** * Set the Classname attribute. */ public Access setClassname(String value) { addAttribute("class",value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Big.java0000644000175000017500000000707507703353440021704 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the <big> element. @version $Id: Big.java,v 1.2 2003/04/27 09:27:12 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Big extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Big() { setElementType("big"); } /** Adds an Element to the element. @param element the element to add */ public Big addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public Big addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Template.java0000644000175000017500000000711607703353440022752 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class implements the template element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Template extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Template() { setElementType("template"); } /** Constructor @param element a do or onevent element */ public Template(Element element) { this(); addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Template addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Prev.java0000644000175000017500000000644607703353441022121 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the prev task without contained variables @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Prev extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Prev() { setElementType("prev"); setBeginEndModifier('/'); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Noop.java0000644000175000017500000000641507703353440022113 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the noop element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Noop extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Noop() { setElementType("noop"); setBeginEndModifier('/'); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/BR.java0000644000175000017500000000632107703353441021500 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the br element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class BR extends org.apache.ecs.SinglePartElement { /** Basic constructor. */ public BR() { setElementType("br"); setBeginEndModifier('/'); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Optgroup.java0000644000175000017500000001436207703353440023017 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** * This represents a <optgroup> element. */ public class Optgroup extends org.apache.ecs.MultiPartElement implements org.apache.ecs.Printable { /** Private initialization routine. */ { setElementType("optgroup"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Optgroup() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H1>value</H1> */ public Optgroup(org.apache.ecs.Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H1>value</H1> */ public Optgroup(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Optgroup addElement(String hashcode,org.apache.ecs.Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Optgroup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Optgroup addElement(org.apache.ecs.Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Optgroup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Optgroup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } //------------------------Attributes /** * Get the TitleAttr attribute. */ public String getTitleAttr() { return getAttribute("title"); } /** * Set the TitleAttr attribute. */ public Optgroup setTitleAttr(String value) { addAttribute("title",value); return this; } /** * Get the Xml_lang attribute. */ public String getXml_lang() { return getAttribute("xml:lang"); } /** * Set the Xml_lang attribute. */ public Optgroup setXml_lang(String value) { addAttribute("xml:lang",value); return this; } /** * Get the Id attribute. */ public String getId() { return getAttribute("id"); } /** * Set the Id attribute. */ public Optgroup setId(String value) { addAttribute("id",value); return this; } /** * Get the Classname attribute. */ public String getClassname() { return getAttribute("class"); } /** * Set the Classname attribute. */ public Optgroup setClassname(String value) { addAttribute("class",value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Meta.java0000644000175000017500000001026407703353440022063 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the meta element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Meta extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Meta() { setBeginEndModifier('/'); setElementType("meta"); } /** Set the Cache-Control http-equiv header @param time the max-age value */ public Meta setCache(String time) { addAttribute("http-equiv", "Cache-Control"); addAttribute("content", "max-age=" + time); return this; } /** Set the Expired http-equiv header */ public Meta setExpired() { addAttribute("http-equiv", "Expired"); addAttribute("content", "Thu, 01 Dec 1994 16:00:00 GMT"); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public Meta setName(String name, String value) { addAttribute("name", name); addAttribute("content", value); return this; } /** Set an http-equiv header @param name the header name @param value the header value */ public Meta setHttpEquiv(String name, String value) { addAttribute("http-equiv", name); addAttribute("content", value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Select.java0000644000175000017500000001032607703353440022413 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the select element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Select extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Select() { setElementType("select"); } /** Constructor. @param name the name="" attribute @param value the value="" attribute */ public Select(String name, String value) { this(); setName(name); setValue(value); } /** Sets the name="" attribute @param name the name="" attribute */ public Select setName(String name) { addAttribute("name", name); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public Select setValue(String value) { addAttribute("value", value); return this; } /** Sets the title="" attribute @param title the title="" attribute */ public Select setTitleAttr(String title) { addAttribute("title", title); return this; } /** Adds an element to the element. @param element Adds an varElement to the elements. */ public Select addElement(Element element) { addElementToRegistry(element, getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Card.java0000644000175000017500000001100207703353440022035 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class implements the card element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Card extends org.apache.ecs.MultiPartElement { /** This method creates a <CARD> tag. */ public Card() { setElementType("card"); } /** This method creates a <card> tag. @param id Value for attribute id @param attrTitle Value for attribute title */ public Card(String id, String attrTitle) { setElementType("card"); addAttribute("id", id); addAttribute("title", attrTitle); } /** Sets the id="" attribute. @param name the value that should go into the id attribute */ public Card setCardId(String name) { addAttribute("id", name); return this; } /** Sets the title="" attribute. @param title the value that should go into the title attribute */ public Card setCardTitle(String title) { addAttribute("title", title); return this; } /** Sets the newcontext="" attribute. @param newcontext the value that should go into the title attribute */ public Card setNewContext(boolean newcontext) { addAttribute("newcontext", String.valueOf(newcontext)); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Card addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Card addElement(String element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Td.java0000644000175000017500000001035407703353440021544 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class implements the <td> element. It is a container to hold a single table cell data within a table row. Table cell data may be empty. Empty cells are significant, and must not be ignored. The user agent should do a best effort to deal with multiple line data cells that may result from using images or line breaks. @version $Id: Td.java,v 1.2 2003/04/27 09:26:18 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Td extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Td() { setElementType("td"); } /** Basic Constructor @param element an element to be added to this cell. */ public Td(Element element) { this(); addElement(element); } /** Basic Constructor. @param element a String element to be added to this cell */ public Td(String element) { this(); addElement(element); } /** Adds an Element to the element. @param element an element to be added. */ public Td addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds an Element to the element. @param element a String element to be added */ public Td addElement(String element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Table.java0000644000175000017500000001213507703353440022223 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class creates a <table> element. @version $Id: Table.java,v 1.2 2003/04/27 09:26:18 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Table extends MultiPartElement { /** Private initialization routine */ { setElementType("table"); } public Table(int columns) { setCols(columns); } /** Sets the align="" attribute. @param align sets the align="" attribute. */ public Table setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the columns="" attribute. @param width sets the columns="" attribute. */ public Table setCols(int cols) { addAttribute("columns",Integer.toString(cols)); return(this); } /** Sets the columns="" attribute. @param width sets the columns="" attribute. */ public Table setCols(String cols) { addAttribute("columns",cols); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Table addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Table addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Table addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Table addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Table removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/A.java0000644000175000017500000001026207703353440021353 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the a element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class A extends org.apache.ecs.MultiPartElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public A() { setElementType("a"); } /** This constructor creates a <a> tag. @param href the href="" attribute @param title the title="" attribute */ public A(String href, String title) { this(); setHref(href); setTitleAttr(title); } /** This constructor creates a <a> tag. @param href the href="" attribute */ public A(String href) { this(); setHref(href); } /** Sets the title="" attribute @param title the title="" attribute */ public A setTitleAttr(String title) { addAttribute("title", title); return this; } /** Sets the href="" attribute @param href the href="" attribute */ public A setHref(String href) { addAttribute("href", href); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public A addElement(String element) { addElementToRegistry(element, getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Small.java0000644000175000017500000000701307703353440022243 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** * This class implements the <small> element. * * @author Written by Krzysztof Zelazowski */ public class Small extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Small() { setElementType("small"); } /** Adds an Element to the element. @param element the element to add */ public Small addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public Small addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Alignment.java0000644000175000017500000000725707703353441023124 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** This class defines constant values for the alignement attribute @author Written by Anders.Samuelson @author Modifications by rjan Petersson @author Modifications by Krzysztof Zelazowski */ public class Alignment { public static final Alignment LEFT = new Alignment("left"); public static final Alignment RIGHT = new Alignment("right"); public static final Alignment CENTER = new Alignment("center"); public static final Alignment TOP = new Alignment("top"); public static final Alignment MIDDLE = new Alignment("middle"); public static final Alignment BOTTOM = new Alignment("bottom"); private String value = null; private Alignment(String value) { this.value = value; } public String toString() { return value; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/P.java0000644000175000017500000001107207703353440021372 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the p element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class P extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public P() { setElementType("p"); // setBeginEndModifier('/'); } /** Constructor sets the alignType attribute. Use the set* methods to set the other values of the attributes. @param alignType the align="" attribute */ public P(Alignment alignType) { this(); setAlignment(alignType); } /** Use the set* methods to set the values of the attributes. @param alignType the align="" attribute @param modeType the mode="" attribute */ public P(Alignment alignType, Mode modeType) { this(); setAlignment(alignType); setMode(modeType); } /** Sets the align="" attribute @param alignType the align="" attribute */ public P setAlignment(Alignment alignType) { addAttribute("align", alignType.toString()); return this; } /** Sets the mode="" attribute @param modeType the mode="" attribute */ public P setMode(Mode modeType) { addAttribute("mode", modeType.toString()); return this; } /** Adds an Element to the element. @param element the element to add */ public P addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public P addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Refresh.java0000644000175000017500000000642607703353440022600 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the refresh task @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Refresh extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Refresh() { setElementType("refresh"); setBeginEndModifier('/'); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Strong.java0000644000175000017500000000702107703353440022446 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** * This class implements the <strong> element. * * @author Written by Krzysztof Zelazowski */ public class Strong extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Strong() { setElementType("strong"); } /** Adds an Element to the element. @param element the element to add */ public Strong addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public Strong addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Type.java0000644000175000017500000000644107703353440022120 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** This class contains attribute values used with the input element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Type { public static final Type TEXT = new Type("text"); public static final Type PASSWORD = new Type("password"); private String value = null; private Type(String value) { this.value = value; } public String toString() { return value; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Fieldset.java0000644000175000017500000001436307703353440022740 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** * This represents a <fieldset> element. */ public class Fieldset extends org.apache.ecs.MultiPartElement implements org.apache.ecs.Printable { /** Private initialization routine. */ { setElementType("fieldset"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Fieldset() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H1>value</H1> */ public Fieldset(org.apache.ecs.Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H1>value</H1> */ public Fieldset(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Fieldset addElement(String hashcode,org.apache.ecs.Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Fieldset addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Fieldset addElement(org.apache.ecs.Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Fieldset addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Fieldset removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } //------------------------Attributes /** * Get the TitleAttr attribute. */ public String getTitleAttr() { return getAttribute("title"); } /** * Set the TitleAttr attribute. */ public Fieldset setTitleAttr(String value) { addAttribute("title",value); return this; } /** * Get the Xml_lang attribute. */ public String getXml_lang() { return getAttribute("xml:lang"); } /** * Set the Xml_lang attribute. */ public Fieldset setXml_lang(String value) { addAttribute("xml:lang",value); return this; } /** * Get the Id attribute. */ public String getId() { return getAttribute("id"); } /** * Set the Id attribute. */ public Fieldset setId(String value) { addAttribute("id",value); return this; } /** * Get the Classname attribute. */ public String getClassname() { return getAttribute("class"); } /** * Set the Classname attribute. */ public Fieldset setClassname(String value) { addAttribute("class",value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Img.java0000644000175000017500000001226707703353440021716 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** * This class creates an <img> element. * * @version $Id: Img.java,v 1.2 2003/04/27 09:27:25 rdonkin Exp $ * @author Written by Krzysztof Zelazowski */ public class Img extends SinglePartElement { /** Private initialization routine. */ { setBeginEndModifier('/'); setElementType("img"); } /** Basic constructor. Use the set* methods to set the attibutes. */ public Img() { } /** Creates an Img tag @param src the SRC="" attribute */ public Img(String src) { setSrc(src); } /** Creates an Img tag @param src the src="" attribute @param alt the alt="" attribute */ public Img(String src, String alt) { setSrc(src); setAlt(alt); } /** Sets the src="" attribute @param src the src="" attribute */ public Img setSrc(String src) { addAttribute("src",src); return this; } /** Sets the alt="" attribute @param alt the alt="" attribute */ public Img setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the localsrc="" attribute @param localsrc the localsrc="" attribute */ public Img setLocalsrc(String localsrc) { addAttribute("localsrc",localsrc); return this; } /** Sets the vspace="" attribute @param vspace the vspace="" attribute */ public Img setVspace(String vspace) { addAttribute("vspace",vspace); return this; } /** Sets the hspace="" attribute @param hspace the hspace="" attribute */ public Img setHspace(String hspace) { addAttribute("hspace",hspace); return this; } /** Sets the align="" attribute @param align the align="" attribute */ public Img setAlignment(Alignment align) { addAttribute("align",align.toString()); return this; } /** Sets the height="" attribute @param height the height="" attribute */ public Img setHeight(String height) { addAttribute("height",height); return this; } /** Sets the width="" attribute @param width the width="" attribute */ public Img setWidth(String width) { addAttribute("width",width); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/DoType.java0000644000175000017500000000673507703353440022411 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** This class defines constant values for the do element type @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class DoType { public static final DoType ACCEPT = new DoType("accept"); public static final DoType DELETE = new DoType("delete"); public static final DoType HELP = new DoType("help"); public static final DoType OPTIONS = new DoType("options"); public static final DoType PREV = new DoType("prev"); private String value = null; private DoType(String value) { this.value = value; } public String toString() { return value; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Head.java0000644000175000017500000000706407703353440022042 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class implements the head element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Head extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Head() { setElementType("head"); } /** Constructor @param element an access or meta element */ public Head(Element element) { this(); addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Head addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/WML.java0000644000175000017500000001001207703353440021623 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the wml element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class WML extends MultiPartElement { public WML() { setElementType("wml"); } /** This method creates a <wml> tag and sets its value @param value the value that goes between <start_tag> <end_tag> */ public WML(String value) { setElementType("wml"); addElement(value); } /** This method creates a <wml> tag and sets its value @param value the value that goes between <start_tag> <end_tag> */ public WML(Element value) { setElementType("wml"); addElement(value); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public WML addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public WML addElement(String element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Tr.java0000644000175000017500000001021507703353440021556 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** This class implements the <tr> element. Table rows may be empty (for example, all the cells in the row are empty). Empty rows are significant and must not be ignored. This element must contain at least one Td elements i.e. cell data. @version $Id: Tr.java,v 1.2 2003/04/27 09:26:18 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Tr extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Tr() { setElementType("tr"); } /** Basic Constructor. @param element an element to be added to the row */ public Tr(Element element) { this(); addElement(element); } /** Basic Constructor. @param element a String element to be added to the row */ public Tr(String element) { this(); addElement(element); } /** Adds an Element to this element. @param element the element to be added */ public Tr addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to this element. @param element the String to be added. */ public Tr addElement(String element) { addElementToRegistry(new Tr(element),getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Anchor.java0000644000175000017500000001105007703353441022402 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the anchor element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Anchor extends org.apache.ecs.MultiPartElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Anchor() { setElementType("anchor"); } /** This constructor creates a <anchor> tag. @param sValue what goes between <start_tag> <end_tag> @param eValue what goes between <start_tag> <end_tag> */ public Anchor(String title, Element eValue) { this(); setAttrTitle(title); addElement(eValue); } /** This constructor creates a <anchor> tag. @param title the TITLE="" attribute @param sValue what goes between <start_tag> <end_tag> @param eValue what goes between <start_tag> <end_tag> */ public Anchor(String title, String sValue, Element eValue) { this(); setAttrTitle(title); addElement(sValue); addElement(eValue); } /** Sets the title="" attribute @param title the title="" attribute */ public Anchor setAttrTitle(String title) { addAttribute("title", title); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Anchor addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Anchor addElement(String element) { addElementToRegistry(element,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Timer.java0000644000175000017500000000663207703353440022261 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the <timer> element @version $Id: Timer.java,v 1.2 2003/04/27 09:26:18 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Timer extends org.apache.ecs.SinglePartElement { /** Basic constructor. @value the value of this timer; usually this is measured in 1/10th of a second, althouth this depends on the implementation. */ public Timer(int value) { setElementType("timer"); setBeginEndModifier('/'); addAttribute("value",Integer.toString(value)); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/PSingle.java0000644000175000017500000001003507703353440022532 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements a p element with only attributes and no contained elements. Is this really useful? (orjan) @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class PSingle extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public PSingle() { setElementType("p"); setBeginEndModifier('/'); } /** Use the set* methods to set the values of the attributes. @param alignType the align="" attribute @param modeType the mode="" attribute */ public PSingle(Alignment alignType, Mode modeType) { this(); setAlignment(alignType); setMode(modeType); } /** Sets the align="" attribute @param alignType the align="" attribute */ public PSingle setAlignment(Alignment alignType) { addAttribute("align", alignType.toString()); return this; } /** Sets the mode="" attribute @param modeType the mode="" attribute */ public PSingle setMode(Mode modeType) { addAttribute("mode", modeType.toString()); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Do.java0000644000175000017500000001122607703353440021536 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the do element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Do extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Do() { setElementType("do"); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param type sets the attribute type="" @param label sets the attribute label="" */ public Do(DoType type, String label) { this(); setType(type); setLabel(label); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param type sets the attribute type="" */ public Do(DoType type) { this(); setType(type); } /** Sets the type="" attribute @param type the type="" attribute */ public Do setType(DoType type) { addAttribute("type", type.toString()); return this; } /** Sets the label="" attribute @param label the label="" attribute */ public Do setLabel(String label) { addAttribute("label", label); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public Do setName(String name) { addAttribute("name", name); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Do addElement(Element element) { addElementToRegistry(element, getFilterState()); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Do addElement(String element) { addElementToRegistry(element, getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Mode.java0000644000175000017500000000642207703353440022062 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** This class defines constant values for wrap/no-wrap @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Mode { public static final Mode WRAP = new Mode("wrap"); public static final Mode NOWRAP = new Mode("nowrap"); private String value = null; private Mode(String value) { this.value = value; } public String toString() { return value; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/GoHref.java0000644000175000017500000000714107703353441022350 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the go element with a single href attribute @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class GoHref extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public GoHref() { setBeginEndModifier('/'); setElementType("go"); } /** Constructor. @param url the href="" attribute */ public GoHref(String url) { this(); setHref(url); } /** Sets the href="" attribute @param url the href="" attribute */ public GoHref setHref(String url) { addAttribute("href", url); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/WMLOutRenderer.java0000644000175000017500000001167007703353441024016 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** The class WMLOutRenderer contains static methods that takes unstructured strings of WML code and returns structured strings of WML code. @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class WMLOutRenderer { /** The name of this class. */ private static final String className = "WMLOutRenderer"; private static final String[] indentArray = {"", " ", " ", " ", " ", " "}; private static final char EXCLAMATION_MARK = '!'; private static final char LESS_THEN = '<'; private static final char GREATER_THEN = '>'; private static final char SLASH = '/'; private static final char QUESTION_MARK = '?'; private static final int MAX_INDENT_LEVEL = indentArray.length - 1; /** Adds structure to a 'raw' WML string. @param inString unstructured WML string. @return structured WML string */ public static String parse(String inString) { boolean indentChanged = false; boolean proceed = true; char[] charArray = inString.toCharArray(); int indentLevel = 0; int lastLTIndex = 0; int lastGTIndex = 0; StringBuffer out = new StringBuffer(); while (proceed) { indentChanged = false; lastLTIndex = inString.indexOf(LESS_THEN, lastGTIndex); if (lastLTIndex != -1) { if ((lastLTIndex - lastGTIndex) > 1) { out.append(indentArray[indentLevel]).append( inString.substring(lastGTIndex + 1, lastLTIndex)).append("\n"); } lastGTIndex = inString.indexOf(GREATER_THEN, lastLTIndex); if (charArray[lastLTIndex + 1] == SLASH) { indentChanged = true; indentLevel--; } out.append(indentArray[indentLevel]).append( inString.substring(lastLTIndex, lastGTIndex + 1)).append("\n"); if (charArray[lastGTIndex - 1] != SLASH && charArray[lastLTIndex + 1] != EXCLAMATION_MARK && charArray[lastLTIndex + 1] != QUESTION_MARK && !indentChanged) { indentLevel = (indentLevel < MAX_INDENT_LEVEL) ? indentLevel + 1 : MAX_INDENT_LEVEL; } } else { proceed = false; } } return out.toString(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Onevent.java0000644000175000017500000001361107703353440022612 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.*; /** * This represents a <onevent> element. */ public class Onevent extends org.apache.ecs.MultiPartElement implements org.apache.ecs.Printable { /** Private initialization routine. */ { setElementType("onevent"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Onevent() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H1>value</H1> */ public Onevent(org.apache.ecs.Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H1>value</H1> */ public Onevent(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Onevent addElement(String hashcode,org.apache.ecs.Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Onevent addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Onevent addElement(org.apache.ecs.Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Onevent addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Onevent removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } //------------------------Attributes /** * Get the Type attribute. */ public String getType() { return getAttribute("type"); } /** * Set the Type attribute. */ public Onevent setType(String value) { addAttribute("type",value); return this; } /** * Get the Id attribute. */ public String getId() { return getAttribute("id"); } /** * Set the Id attribute. */ public Onevent setId(String value) { addAttribute("id",value); return this; } /** * Get the Classname attribute. */ public String getClassname() { return getAttribute("class"); } /** * Set the Classname attribute. */ public Onevent setClassname(String value) { addAttribute("class",value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Method.java0000644000175000017500000000644507703353441022424 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; /** This class defines HTTP submission method values for the go task @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Method { public static final Method POST = new Method("post"); public static final Method GET = new Method("get"); private String value = null; private Method(String value) { this.value = value; } public String toString() { return value; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Input.java0000644000175000017500000001065207703353440022275 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the input element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Input extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Input() { setBeginEndModifier('/'); setElementType("input"); } /** Constructor. @param name the name="" attribute */ public Input(String name) { this(); setName(name); } /** Constructor. @param name the name="" attribute @param defValue the type="" attribute */ public Input(String name, Type type) { this(); setName(name); setType(type); } /** Constructor. @param format the format="" attribute @param name the name="" attribute @param defValue the type="" attribute */ public Input(String format, String name, Type type) { this(); setFormat(format); setName(name); setType(type); } /** Sets the format="" attribute @param url the format="" attribute */ public Input setFormat(String format) { addAttribute("format", format); return this; } /** Sets the name="" attribute @param name the name="" attribute */ public Input setName(String name) { addAttribute("name", name); return this; } /** Sets the type="" attribute @param url the type="" attribute */ public Input setType(Type type) { addAttribute("type", type.toString()); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/SetVar.java0000644000175000017500000000751407703353440022405 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the setvar element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class SetVar extends org.apache.ecs.SinglePartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public SetVar() { setBeginEndModifier('/'); setElementType("setvar"); } /** Constructor. @param name the name="" attribute @param value the value="" attribute */ public SetVar(String name, String value) { this(); setName(name); setValue(value); } /** Sets the name="" attribute @param name the name="" attribute */ public SetVar setName(String name) { addAttribute("name", name); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public SetVar setValue(String value) { addAttribute("value", value); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Go.java0000644000175000017500000001052007703353440021535 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the go element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Go extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Go() { setElementType("go"); } /** Constructor. @param url the href="" attribute */ public Go(String url) { this(); setHref(url); } /** Constructor. @param url the href="" attribute @param method GET or POST */ public Go(String url, Method method) { this(); setHref(url); setMethod(method); } /** Constructor. @param url the href="" attribute @param varElement a VarElement. */ public Go(String url, Element element) { this(); setHref(url); addElement(element); } /** Sets the href="" attribute @param url the href="" attribute */ public Go setHref(String url) { addAttribute("href", url); return this; } /** Adds an element to the element. @param element the element (setVar or postfield) to add */ public Go addElement(Element element) { addElementToRegistry(element, getFilterState()); return(this); } /** Sets the method="" attribute @param url the href="" attribute */ public Go setMethod(Method method) { addAttribute("method", method.toString()); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/U.java0000644000175000017500000000707307703353441021406 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the <u> element. @version $Id: U.java,v 1.2 2003/04/27 09:27:52 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class U extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public U() { setElementType("u"); } /** Adds an Element to this element. @param element the element to be added */ public U addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to be added. */ public U addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/WMLDocument.java0000644000175000017500000001112407703353440023327 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; /** This class implements the wml document container @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class WMLDocument { private static final String XML_VERSION = ""; private static final String DOCTYPE = ""; private WML wml = null; /** Basic constructor. */ public WMLDocument() { wml = new WML(); } public WMLDocument(WML wml) { this.wml = wml; } /** Get the wml element for this document container. */ public WML getWML() { return(wml); } /** Set the wml element for this document container. */ public WMLDocument setWML(WML wml) { this.wml = wml; return(this); } /** Append to the wml element for this document container. @param value adds to the value between the wml tags */ public WMLDocument appendWML(Element value) { wml.addElement(value); return(this); } /** Append to the wml element for this document container. @param value adds to the value between the wml tags */ public WMLDocument appendWML(String value) { wml.addElement(value); return(this); } /** Override the toString() method so that it prints something meaningful. */ public final String toString() { StringBuffer sb = new StringBuffer(); sb.append(XML_VERSION).append(DOCTYPE).append("\n"); sb.append(wml.toString()); /*return sb.toString().replace('', 'a').replace('', 'a').replace('', 'o'). replace('', 'A').replace('', 'A').replace('', 'o');*/ return sb.toString(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/PrevWithVar.java0000644000175000017500000000725507703353441023425 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the prev task with contained variables @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class PrevWithVar extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public PrevWithVar() { setElementType("prev"); } /** Constructor. @param varElement a VarElement. */ public PrevWithVar(SetVar varElement) { this(); addVarElement(varElement); } /** Adds an varElement to the element. @param varElement Adds an varElement to the elements. */ public PrevWithVar addVarElement(SetVar varElement) { addElementToRegistry(varElement, getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/B.java0000644000175000017500000000706007703353440021356 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the <b> element. @version $Id: B.java,v 1.2 2003/04/27 09:27:12 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class B extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public B() { setElementType("b"); } /** Adds an Element to the element. @param element the element to add */ public B addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public B addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Option.java0000644000175000017500000001207607703353440022450 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.MultiPartElement; /** This class implements the option element @author Written by Anders.Samuelson @author Modifications by rjan Petersson */ public class Option extends org.apache.ecs.MultiPartElement { /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Option() { setElementType("option"); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param value sets the attribute value="" */ public Option(String value) { this(); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param title sets the attribute title="" @param value sets the attribute value="" */ public Option(String title, String value) { this(); setTitleAttr(title); setValue(value); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param title sets the attribute title="" @param value sets the attribute value="" @param url sets the attribute onpick="" */ public Option(String title, String value, String url) { this(); setTitleAttr(title); setValue(value); setOnPick(url); } /** Sets the title="" attribute @param title the title="" attribute */ public Option setTitleAttr(String title) { addAttribute("title", title); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public Option setValue(String value) { addAttribute("value", value); return this; } /** Sets the onpick="" attribute @param url the onpick="" attribute */ public Option setOnPick(String url) { addAttribute("onpick", url); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Option addElement(Element element) { addElementToRegistry(element, getFilterState()); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Option addElement(String element) { addElementToRegistry(element, getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/wml/Em.java0000644000175000017500000000705707703353440021544 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.wml; import org.apache.ecs.Element; import org.apache.ecs.SinglePartElement; /** This class implements the em element. @version $Id: Em.java,v 1.2 2003/04/27 09:27:52 rdonkin Exp $ @author Written by Krzysztof Zelazowski */ public class Em extends org.apache.ecs.MultiPartElement { /** Basic constructor. */ public Em() { setElementType("em"); } /** Adds an Element to the element. @param element the element to add */ public Em addElement(Element element) { addElementToRegistry(element,getFilterState()); return(this); } /** Adds a String to the element. @param s the String to add. */ public Em addElement(String s) { addElementToRegistry(s,getFilterState()); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/FrameSetDocument.java0000644000175000017500000002640707703353440023611 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Serializable; import org.apache.ecs.html.Html; import org.apache.ecs.html.Body; import org.apache.ecs.html.Title; import org.apache.ecs.html.Head; import org.apache.ecs.html.FrameSet; import org.apache.ecs.html.NoFrames; /** This class creates a FrameSetDocument container, for convience. @version $Id: FrameSetDocument.java,v 1.4 2003/04/27 09:43:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class FrameSetDocument implements Serializable,Cloneable { /** @serial html html */ private Html html; // this is the actual container for head and body /** @serial head head */ private Head head; /** @serial body body */ private Body body; /** @serial title title */ private Title title; /** @serial frameset frameset */ private FrameSet frameset; /** @serial noframes frameset */ private NoFrames noframes; /** @serial doctype doctype */ private Doctype doctype = null; /** @serial codeset codeset */ private String codeset = null; { html = new Html(); head = new Head(); title = new Title(); frameset = new FrameSet(); noframes = new NoFrames(); body = new Body(); head.addElement("title",title); html.addElement("head",head); html.addElement("frameset",frameset); html.addElement("noframes",noframes); noframes.addElement("body",body); } /** Basic constructor. */ public FrameSetDocument() { } /** Basic constructor. Sets the codeset for the page output. */ public FrameSetDocument(String codeset) { setCodeset(codeset); } /** Get the doctype element for this document container. */ public Doctype getDoctype() { return(doctype); } /** Set the doctype element for this document container. */ public FrameSetDocument setDoctype(Doctype set_doctype) { this.doctype = set_doctype; return(this); } /** Get the html element for this document container. */ public Html getHtml() { return(html); } /** Set the html element for this FrameSetDocument container. */ public FrameSetDocument setHtml(Html set_html) { this.html = set_html; return(this); } /** Get the head element for this FrameSetDocument container. */ public Head getHead() { return(head); } /** Set the head element for this FrameSetDocument container. */ public FrameSetDocument setHead(Head set_head) { html.addElement("head",set_head); this.head = set_head; return(this); } /** Append to the head element for this FrameSetDocument container. @param value adds to the value between the head tags */ public FrameSetDocument appendHead(Element value) { head.addElement(value); return(this); } /** Append to the head element for this FrameSetDocument container. @param value adds to the value between the head tags */ public FrameSetDocument appendHead(String value) { head.addElement(value); return(this); } /** Get the FrameSet element for this FrameSetDocument container. */ public FrameSet getFrameSet() { return(frameset); } /** Set the FrameSet element for this FrameSetDocument container. */ public FrameSetDocument setFrameSet(FrameSet set_frameset) { html.addElement("frameset",set_frameset); this.frameset = set_frameset; return(this); } /** Append to the head element for this FrameSetDocument container. @param value adds to the value between the head tags */ public FrameSetDocument appendFrameSet(Element value) { frameset.addElement(value); return(this); } /** Append to the head element for this FrameSetDocument container. @param value adds to the value between the head tags */ public FrameSetDocument appendFrameSet(String value) { frameset.addElement(value); return(this); } /** Get the body element for this FrameSetDocument container. */ public Body getBody() { return(body); } /** Set the Body element for this FrameSetDocument container. */ public FrameSetDocument setBody(Body set_body) { noframes.addElement("body",set_body); this.body = set_body; return(this); } /** Append to the body element for this FrameSetDocument container. @param value adds to the value between the body tags */ public FrameSetDocument appendBody(Element value) { body.addElement(value); return(this); } /** Append to the body element for this FrameSetDocument container. @param value adds to the value between the body tags */ public FrameSetDocument appendBody(String value) { body.addElement(value); return(this); } /** Get the title element for this FrameSetDocument container. */ public Title getTitle() { return(title); } /** Set the Title element for this FrameSetDocument container. */ public FrameSetDocument setTitle(Title set_title) { head.addElement("title",set_title); this.title = set_title; return(this); } /** Append to the title element for this FrameSetDocument container. @param value adds to the value between the title tags */ public FrameSetDocument appendTitle(Element value) { title.addElement(value); return(this); } /** Append to the title element for this FrameSetDocument container. @param value adds to the value between the title tags */ public FrameSetDocument appendTitle(String value) { title.addElement(value); return(this); } /** * Sets the codeset for this FrameSetDocument */ public void setCodeset ( String codeset ) { this.codeset = codeset; } /** * Gets the codeset for this FrameSetDocument * * @return the codeset */ public String getCodeset() { return this.codeset; } /** Write the container to the OutputStream */ public void output(OutputStream out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // FrameSetDocument is just a convient wrapper for Html call Html.output html.output(out); } /** Write the container to the PrintWriter */ public void output(PrintWriter out) { if (doctype != null) { doctype.output(out); try { out.write('\n'); } catch ( Exception e) {} } // FrameSetDocument is just a convient wrapper for Html call Html.output html.output(out); } /** Override the toString() method so that it prints something meaningful. */ public final String toString() { StringBuffer sb = new StringBuffer(); if ( getCodeset() != null ) { if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return (sb.toString()); } else { if (doctype != null) sb.append (doctype.toString()); sb.append (html.toString()); return(sb.toString()); } } /** Override the toString() method so that it prints something meaningful. */ public final String toString(String codeset) { StringBuffer sb = new StringBuffer(); if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return(sb.toString()); } /** Allows the FrameSetDocument to be cloned. Doesn't return an instanceof FrameSetDocument returns instance of Html. */ public Object clone() { return(html.clone()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Doctype.java0000644000175000017500000003354107703353440022010 0ustar killerkillerpackage org.apache.ecs; /* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ import org.apache.ecs.*; /** * This class creates a <!DOCTYPE> tag.

* * Format:
<!DOCTYPE [name] [visibility] [identifier] [uri]>

usage:
Document d = new Document()
.setDoctype(new Doctype.Html40Strict())

or

XMLDocument d = new XMLDocument()
.addToProlog( new Doctype( "foo", "\"--/bar/baz/en\"", "\"http://qoz.net/foo.dtd\"" );
* .addElement( new XML( ... * * @see Doctype.Html40Strict * @see Doctype.Html40Transitional * @see Doctype.Html40Frameset * @see Doctype.XHtml10Strict * @see Doctype.XHtml10Transitional * @see Doctype.XHtml10Frameset * * @version $Id: Doctype.java,v 1.6 2003/04/27 09:43:30 rdonkin Exp $ * @author Michael Heuer * @author Stephan Nagy * @author Jon S. Stevens * @author Bruce Durling * @author Bojan Smojver * @author Yuji Kumasaka */ public class Doctype extends SinglePartElement implements Printable { public static final String elementName = "!DOCTYPE"; public static final String PUBLIC = "PUBLIC"; protected String name; protected String visibility; protected String identifier; protected String uri; { setElementType(elementName); setCase(Element.UPPERCASE); } /** * Basic Constructor. * */ public Doctype() { updateElementType(); } /** * Constructor. * * @param name Root element of the XML document. * @param id Public identifier. * @param uri URI of the DTD. */ public Doctype( String name, String id, String uri ) { this.name = name; this.visibility = PUBLIC; this.identifier = id; this.uri = uri; updateElementType(); } /** * Constructor. * * @param name Root element of the XML document. * @param id Public identifier. * @param uri URI of the DTD. */ public Doctype( String name, String visibility, String id, String uri ) { this.name = name; this.visibility = visibility; this.identifier = id; this.uri = uri; updateElementType(); } /** * Should be called when any of the fields are changed. * */ protected void updateElementType() { setElementType( elementName + " " + name + " " + visibility + " " + identifier + " " + uri ); } /** * Updates the name of the root element. * * @param name Name of the root element. * @return a value of type 'Doctype' */ public Doctype setName( String name ) { this.name = name; updateElementType(); return( this ); } /** * Updates the name of the root element. * * @param name Name of the root element. * @return a value of type 'Doctype' */ public Doctype setVisibility( String visibility ) { this.visibility = visibility; updateElementType(); return( this ); } /** * Updates the name of the public identifier. * * @param identifier The public identifier. * @return a value of type 'Doctype' */ public Doctype setIdentifier( String identifier ) { this.identifier = identifier; updateElementType(); return( this ); } /** * Updates the URI of the dtd. * * @param uri URI of the dtd. * @return a value of type 'Doctype' */ public Doctype setUri( String uri ) { this.uri = uri; updateElementType(); return(this); } /** * Adds and Element to the element. * * @param hashcode name of the element for hash table. * @param element Adds an Element to the element. * @return a value of type 'Doctype' */ public Doctype addElement( String hashcode, Element element ) { addElementToRegistry( hashcode, element ); return(this); } /** * Adds an Element to the element. * * @param hashcode name of the element for the hash table. * @param element Adds an Element to the element. * @return a value of type 'Doctype' */ public Doctype addElement( String hashcode, String element ) { addElementToRegistry(hashcode,element); return(this); } /** * Adds an Element to the element. * * @param element Adds an Element to the element. * @return a value of type 'Doctype' */ public Doctype addElement(Element element) { addElementToRegistry(element); return(this); } /** * Adds an Element to the element. * * @param element Adds an Element to the element. * @return a value of type 'Doctype' */ public Doctype addElement(String element) { addElementToRegistry(element); return(this); } /** * Removes an Element from the element. * * @param hashcode the name of the element to be removed. * @return a value of type 'Doctype' */ public Doctype removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** * The HTML 4.0 Strict DTD includes all elements and attributes * that have not been deprecated or do not appear in frameset * documents. *

* See: * http://www.w3.org/TR/REC-html40/sgml/dtd.html */ public static class Html40Strict extends Doctype { public Html40Strict() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.0//EN\""; this.uri = "\"http://www.w3.org/TR/REC-html40/strict.dtd\""; this.updateElementType(); } } /** * The HTML 4.0 Transitional DTD includes everything in the * strict DTD plus deprecated elements and attributes (most of * which concern visual presentation). *

* See: * http://www.w3.org/TR/REC-html40/sgml/loosedtd.html */ public static class Html40Transitional extends Doctype { public Html40Transitional() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.0 Transitional//EN\""; this.uri = "\"http://www.w3.org/TR/REC-html40/loose.dtd\""; this.updateElementType(); } } /** * The HTML 4.0 Frameset DTD includes everything in the transitional * DTD plus frames as well. *

* See: * http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html */ public static class Html40Frameset extends Doctype { public Html40Frameset() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.0 Frameset//EN\""; this.uri = "\"http://www.w3.org/TR/REC-html40/frameset.dtd\""; this.updateElementType(); } } /** * The HTML 4.01 Strict DTD includes all elements and attributes * that have not been deprecated or do not appear in frameset * documents. *

* See: * http://www.w3.org/TR/html4/ */ public static class Html401Strict extends Doctype { public Html401Strict() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.01//EN\""; this.uri = "\"http://www.w3.org/TR/html4/strict.dtd\""; this.updateElementType(); } } /** * The HTML 4.01 Transitional DTD includes everything in the * strict DTD plus deprecated elements and attributes (most of * which concern visual presentation). *

* See: * http://www.w3.org/TR/html4/ */ public static class Html401Transitional extends Doctype { public Html401Transitional() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.01 Transitional//EN\""; this.uri = "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\""; this.updateElementType(); } } /** * The HTML 4.01 Frameset DTD includes everything in the transitional * DTD plus frames as well. *

* See: * http://www.w3.org/TR/html4/ */ public static class Html401Frameset extends Doctype { public Html401Frameset() { this.name = "HTML"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD HTML 4.01 Frameset//EN\""; this.uri = "\"http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd\""; this.updateElementType(); } } /** * The XHTML 1.0 Strict DTD * This is the same as HTML 4.0 Strict except for changes due * to the differences between XML and SGML. *

* See: * http://www.w3.org/TR/xhtml1 */ public static class XHtml10Strict extends Doctype { public XHtml10Strict() { this.name = "html"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD XHTML 1.0 Strict//EN\""; this.uri = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""; this.updateElementType(); } } /** * The XHTML 1.0 Transitional DTD * This is the same as HTML 4.0 Transitional except for changes due * to the differences between XML and SGML. *

* See: * http://www.w3.org/TR/xhtml1 */ public static class XHtml10Transitional extends Doctype { public XHtml10Transitional() { this.name = "html"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD XHTML 1.0 Transitional//EN\""; this.uri = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""; this.updateElementType(); } } /** * The XHTML 1.0 Frameset DTD * This is the same as HTML 4.0 Frameset except for changes due * to the differences between XML and SGML. *

* See: * http://www.w3.org/TR/xhtml1 */ public static class XHtml10Frameset extends Doctype { public XHtml10Frameset() { this.name = "html"; this.visibility = PUBLIC; this.identifier = "\"-//W3C//DTD XHTML 1.0 Frameset//EN\""; this.uri = "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\""; this.updateElementType(); } } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/FormEvents.java0000644000175000017500000001031607703353440022464 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface is intended to be implemented by elements that require javascript form event attributes. @version $Id: FormEvents.java,v 1.3 2003/04/27 09:43:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface FormEvents { /** make sure implementing classes have a setOnSubmit method. The onsubmit event occurs when a form is submitted. It only applies to the FORM element. */ public abstract void setOnSubmit(String script); /** make sure implementing classes have a setOnReset method. The onreset event occurs when a form is reset. It only applies to the FORM element. */ public abstract void setOnReset(String script); /** make sure implementing classes have a setOnSelect method. The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. */ public abstract void setOnSelect(String script); /** make sure implementing classes have a setOnChange method. The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. */ public abstract void setOnChange(String script); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/HtmlColor.java0000644000175000017500000011515607703353440022307 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This class defines all of the available Html Colors. @version $Id: HtmlColor.java,v 1.3 2003/04/27 09:45:34 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public abstract class HtmlColor { // colors html 4.0 /** HTML 4.0 specification for color BLACK. */ public final static String BLACK = "#000000"; /** HTML 4.0 specification for color SILVER. */ public final static String SILVER = "#C0C0C0"; /** HTML 4.0 specification for color GRAY. */ public final static String GRAY = "#808080"; /** HTML 4.0 specification for color WHITE (not shown). */ public final static String WHITE = "#FFFFFF"; /** HTML 4.0 specification for color MAROON. */ public final static String MAROON = "#800000"; /** HTML 4.0 specification for color RED. */ public final static String RED = "#FF0000"; /** HTML 4.0 specification for color PURPLE. */ public final static String PURPLE = "#800080"; /** HTML 4.0 specification for color FUCHSIA. */ public final static String FUCHSIA = "#FF00FF"; /** HTML 4.0 specification for color GREEN. */ public final static String GREEN = "#008000"; /** HTML 4.0 specification for color LIME. */ public final static String LIME = "#00FF00"; /** HTML 4.0 specification for color OLIVE. */ public final static String OLIVE = "#808000"; /** HTML 4.0 specification for color YELLOW. */ public final static String YELLOW = "#FFFF00"; /** HTML 4.0 specification for color NAVY. */ public final static String NAVY = "#000080"; /** HTML 4.0 specification for color BLUE. */ public final static String BLUE = "#0000FF"; /** HTML 4.0 specification for color TEAL. */ public final static String TEAL = "#008080"; /** HTML 4.0 specification for color AQUA. */ public final static String AQUA = "#00FFFF"; // colors html 3.0 /** HTML 3.0 specification for color ALICEBLUEOC. */ public final static String ALICEBLUE = "#EFF7FF"; /** HTML 3.0 specification for color ANTIQUEWHITE. */ public final static String ANTIQUEWHITE = "#F9E8D2"; /** HTML 3.0 specification for color AQUAMARINE. */ public final static String AQUAMARINE = "#43B7BA"; /** HTML 3.0 specification for color AZURE. */ public final static String AZURE = "#EFFFFF"; /** HTML 3.0 specification for color BEIGE. */ public final static String BEIGE = "#F5F3D7"; /** HTML 3.0 specification for color BISQUE. */ public final static String BISQUE = "#FDE0BC"; /** HTML 3.0 specification for color BLANCHEDALMOND. */ public final static String BLANCHEDALMOND = "#FEE8C6"; /** HTML 3.0 specification for color BLUEVIOLET. */ public final static String BLUEVIOLET = "#7931DF"; /** HTML 3.0 specification for color BROWN. */ public final static String BROWN = "#980516"; /** HTML 3.0 specification for color BURLYWOOD. */ public final static String BURLYWOOD = "#EABE83"; /** HTML 3.0 specification for color CADETBLUE. */ public final static String CADETBLUE = "#578693"; /** HTML 3.0 specification for color CHARTREUSE. */ public final static String CHARTREUSE = "#8AFB17"; /** HTML 3.0 specification for color CHOCOLATE. */ public final static String CHOCOLATE = "#C85A17"; /** HTML 3.0 specification for color CORAL. */ public final static String CORAL = "#F76541"; /** HTML 3.0 specification for color CORNFLOWERBLUE. */ public final static String CORNFLOWERBLUE = "#151B8D"; /** HTML 3.0 specification for color CORNSILK.*/ public final static String CORNSILK = "#FFF7D7"; /** HTML 3.0 specification for color CRIMSON. * RED2 couldn't find CRIMSON */ public final static String CRIMSON = "#E41B17"; /** HTML 3.0 specification for color CYAN. */ public final static String CYAN = "#00FFFF"; /** HTML 3.0 specification for color DARKBLUE. * MIDNIGHTBLUE couldn't find DARKBLUE */ public final static String DARKBLUE = "#2F2F4F"; /** HTML 3.0 specification for color DARKCYAN. * CYAN1 couldn't find DARKCYAN */ public final static String DARKCYAN = "#57FEFF"; /** HTML 3.0 specification for color DARKGOLDENROD. */ public final static String DARKGOLDENROD = "#AF7817"; /** HTML 3.0 specification for color DARKGRAY. * GRAY52 couldn't find DARKGRAY */ public final static String DARKGRAY = "#7A7777"; /** HTML 3.0 specification for color DARKGREEN. */ public final static String DARKGREEN = "#254117"; /** HTML 3.0 specification for color DARKKHAKI. */ public final static String DARKKHAKI = "#B7AD59"; /** HTML 3.0 specification for color DARKMAGENTA. * MAGENTA1 couldn't find DARKMAGENTA */ public final static String DARKMAGENTA = "#F43EFF"; /** HTML 3.0 specification for color DARKOLIVEGREEN. */ public final static String DARKOLIVEGREEN = "#CCFB5D"; /** HTML 3.0 specification for color DARKORANGE. */ public final static String DARKORANGE = "#F88017"; /** HTML 3.0 specification for color DARKORCHID. */ public final static String DARKORCHID = "#7D1B7E"; /** HTML 3.0 specification for color DARKRED. * RED2 couldn't find DARKRED */ public final static String DARKRED = "#E41B17"; /** HTML 3.0 specification for color DARKSALMON. */ public final static String DARKSALMON = "#E18B6B"; /** HTML 3.0 specification for color DARKSEAGREEN. */ public final static String DARKSEAGREEN = "#8BB381"; /** HTML 3.0 specification for color DARKSLATEBLUE. */ public final static String DARKSLATEBLUE = "#2B3856"; /** HTML 3.0 specification for color DARKSLATEGRAY. */ public final static String DARKSLATEGRAY = "#253856"; /** HTML 3.0 specification for color DARKTURQUOISE. */ public final static String DARKTURQUOISE = "#3B9C9C"; /** HTML 3.0 specification for color DARKVIOLET. */ public final static String DARKVIOLET = "#842DCE"; /** HTML 3.0 specification for color DEEPPINK. */ public final static String DEEPPINK = "#F52887"; /** HTML 3.0 specification for color DEEPSKYBLUE. */ public final static String DEEPSKYBLUE = "#3BB9FF"; /** HTML 3.0 specification for color DIMGRAY. */ public final static String DIMGRAY = "#463E41"; /** HTML 3.0 specification for color DODGERBLUE. */ public final static String DODGERBLUE = "#1589FF"; /** HTML 3.0 specification for color FIREBRICK. */ public final static String FIREBRICK = "#800517"; /** HTML 3.0 specification for color FLORALWHITE. */ public final static String FLORALWHITE = "#FFF9EE"; /** HTML 3.0 specification for color FORESTGREEN. */ public final static String FORESTGREEN = "#4E9258"; /** HTML 3.0 specification for color GAINSBORO. */ public final static String GAINSBORO = "#D8D9D7"; /** HTML 3.0 specification for color GHOSTWHITE. */ public final static String GHOSTWHITE = "#F7F7FF"; /** HTML 3.0 specification for color GOLD. */ public final static String GOLD = "#D4A017"; /** HTML 3.0 specification for color GOLDENROD. */ public final static String GOLDENROD = "#EDDA74"; /** HTML 3.0 specification for color GREENYELLOW. */ public final static String GREENYELLOW = "#B1FB17"; /** HTML 3.0 specification for color HONEYDEW. */ public final static String HONEYDEW = "#F0FEEE"; /** HTML 3.0 specification for color INDIANRED. */ public final static String INDIANRED = "#5E2217"; /** HTML 3.0 specification for color INDIGO. * CYAN4 couldn't find INDIGO */ public final static String INDIGO = "#307D7E"; /** HTML 3.0 specification for color IVORY. */ public final static String IVORY = "#FFFFEE"; /** HTML 3.0 specification for color KHAKI. */ public final static String KHAKI = "#ADA96E"; /** HTML 3.0 specification for color LAVENDER. */ public final static String LAVENDER = "#E3E4FA"; /** HTML 3.0 specification for color LAVENDERBLUSH. */ public final static String LAVENDERBLUSH = "#FDEEF4"; /** HTML 3.0 specification for color LAWNGREEN. */ public final static String LAWNGREEN = "#87F717"; /** HTML 3.0 specification for color LEMONCHIFFON. */ public final static String LEMONCHIFFON = "#FFF8C6"; /** HTML 3.0 specification for color LIGHTBLUE. */ public final static String LIGHTBLUE = "#ADDFFF"; /** HTML 3.0 specification for color LIGHTCORAL. */ public final static String LIGHTCORAL = "#E77471"; /** HTML 3.0 specification for color LIGHTCYAN. */ public final static String LIGHTCYAN = "#E0FFFF"; /** HTML 3.0 specification for color LIGHTGOLDENROD. */ public final static String LIGHTGOLDENRODYELLOW = "#FAF8CC"; /** HTML 3.0 specification for color LIGHTGREEN. * ARBITRARY SHADE OF GREEN couldnt find LIGHTGREEN */ public final static String LIGHTGREEN = "#CCFFCC"; /** HTML 3.0 specification for color LIGHPINK. */ public final static String LIGHTPINK = "#FAAFBA"; /** HTML 3.0 specification for color LIGHTSALMON. */ public final static String LIGHTSALMON = "#F9966B"; /** HTML 3.0 specification for color LIGHTSEAGREEN. */ public final static String LIGHTSEAGREEN = "#3EA99F"; /** HTML 3.0 specification for color LIGHTSKYBLUE. */ public final static String LIGHTSKYBLUE = "#82CAFA"; /** HTML 3.0 specification for color LIGHTSLATEGRAY. */ public final static String LIGHTSLATEGRAY = "#6D7B8D"; /** HTML 3.0 specification for color LIGHTSTEELBLUE. */ public final static String LIGHTSTEELBLUE = "#728FCE"; /** HTML 3.0 specification for color LIGHTYELLOW. */ public final static String LIGHTYELLOW = "#FFFEDC"; /** HTML 3.0 specification for color LIMEGREEN. */ public final static String LIMEGREEN = "#41A317"; /** HTML 3.0 specification for color LINEN. */ public final static String LINEN = "#F9EEE2"; /** HTML 3.0 specification for color MAGENTA. */ public final static String MAGENTA = "#FF00FF"; /** HTML 3.0 specification for color MEDIUMAQUAMARINE. */ public final static String MEDIUMAQUAMARINE = "#348781"; /** HTML 3.0 specification for color MEDIUMBLUE. */ public final static String MEDIUMBLUE = "#152DC6"; /** HTML 3.0 specification for color MEDIUMORCHID. */ public final static String MEDIUMORCHID = "#B048B5"; /** HTML 3.0 specification for color MEDIUMPURPLE. */ public final static String MEDIUMPURPLE = "#8467D7"; /** HTML 3.0 specification for color MEDIUMSEAGREEN. */ public final static String MEDIUMSEAGREEN = "#306754"; /** HTML 3.0 specification for color MEDIUMSLATEBLUE. */ public final static String MEDIUMSLATEBLUE = "#5E5A80"; /** HTML 3.0 specification for color MEDIUMSPRINGGREEN. */ public final static String MEDIUMSPRINGGREEN = "#348017"; /** HTML 3.0 specification for color MEDIUMTURQUOISE. */ public final static String MEDIUMTURQUOISE = "#48CCCD"; /** HTML 3.0 specification for color MEDIUMVIOLETRED. */ public final static String MEDIUMVIOLETRED = "#CA226B"; /** HTML 3.0 specification for color MIDNIGHTBLUE. */ public final static String MIDNIGHTBLUE = "#151B54"; /** HTML 3.0 specification for color MINTCREAM. */ public final static String MINTCREAM = "#F5FFF9"; /** HTML 3.0 specification for color MISTYROSE. */ public final static String MISTYROSE = "#FDE1DD"; /** HTML 3.0 specification for color MOCCASIN. */ public final static String MOCCASIN = "#FDE0AC"; /** HTML 3.0 specification for color NAVAJOWHITE. */ public final static String NAVAJOWHITE = "#FDDAA3"; /** HTML 3.0 specification for color OLDLACE. */ public final static String OLDLACE = "#FCF3E2"; /** HTML 3.0 specification for color OLIVEDRAB. */ public final static String OLIVEDRAB = "#658017"; /** HTML 3.0 specification for color ORANGE. */ public final static String ORANGE = "#F87A17"; /** HTML 3.0 specification for color ORANGERED. */ public final static String ORANGERED = "#F63817"; /** HTML 3.0 specification for color ORCHID. */ public final static String ORCHID = "#E57DED"; /** HTML 3.0 specification for color PALEGOLDENROD. */ public final static String PALEGOLDENROD = "#EDE49E"; /** HTML 3.0 specification for color PALETURQUOISE. */ public final static String PALETURQUOISE = "#AEEBEC"; /** HTML 3.0 specification for color PALEVIOLETRED. */ public final static String PALEVIOLETRED = "#D16587"; /** HTML 3.0 specification for color PAPAYAWHIP. */ public final static String PAPAYAWHIP = "#FEECCF"; /** HTML 3.0 specification for color PEACHPUFF. */ public final static String PEACHPUFF = "#FCD5B0"; /** HTML 3.0 specification for color PERU. */ public final static String PERU = "#C57726"; /** HTML 3.0 specification for color PINK. */ public final static String PINK = "#FAAFBE"; /** HTML 3.0 specification for color PLUM. */ public final static String PLUM = "#B93B8F"; /** HTML 3.0 specification for color POWDERBLUE. */ public final static String POWDERBLUE = "#ADDCE3"; /** HTML 3.0 specification for color ROSYBROWN. */ public final static String ROSYBROWN = "#B38481"; /** HTML 3.0 specification for color ROYALBLUE. */ public final static String ROYALBLUE = "#2B60DE"; /** HTML 3.0 specification for color SADDLEBROWN. * BROWN2 couldn't find SADDLEBROWN */ public final static String SADDLEBROWN = "#F63526"; /** HTML 3.0 specification for color SALMON. */ public final static String SALMON = "#F88158"; /** HTML 3.0 specification for color SANDYBROWN. */ public final static String SANDYBROWN = "#EE9A4D"; /** HTML 3.0 specification for color SEAGREEN. */ public final static String SEAGREEN = "#4E8975"; /** HTML 3.0 specification for color SEASHELL. */ public final static String SEASHELL = "#FEF3EB"; /** HTML 3.0 specification for color SIENNA. */ public final static String SIENNA = "#8A4117"; /** HTML 3.0 specification for color SKYBLUE. */ public final static String SKYBLUE = "#6698FF"; /** HTML 3.0 specification for color SLATEBLUE. */ public final static String SLATEBLUE = "#737CA1"; /** HTML 3.0 specification for color SLATEGRAY. */ public final static String SLATEGRAY = "#657383"; /** HTML 3.0 specification for color SNOW. */ public final static String SNOW = "#FFF9FA"; /** HTML 3.0 specification for color SPRINGGREEN. */ public final static String SPRINGGREEN = "#4AA02C"; /** HTML 3.0 specification for color STEELBLUE. */ public final static String STEELBLUE = "#4863A0"; /** HTML 3.0 specification for color TAN. */ public final static String TAN = "#D8AF79"; /** HTML 3.0 specification for color THISTLE. */ public final static String THISTLE = "#D2B9D3"; /** HTML 3.0 specification for color TOMATO. */ public final static String TOMATO = "#F75431"; /** HTML 3.0 specification for color TURQUOISE. */ public final static String TURQUOISE = "#43C6DB"; /** HTML 3.0 specification for color VIOLET. */ public final static String VIOLET = "#8D38C9"; /** HTML 3.0 specification for color WHEAT. */ public final static String WHEAT = "#F3DAA9"; /** HTML 3.0 specification for color WHITESMOKE (not shown). * WHITE couldn't find WHITESMOKE */ public final static String WHITESMOKE = "#FFFFFF"; /** HTML 3.0 specification for color . */ public final static String YELLOWGREEN = "#52D017"; // lowercase for compatability colors HTML 4.0 /** Lowercase for compatiblity. * @see #BLACK */ public final static String black = BLACK; /** Lowercase for compatiblity. * @see #SILVER */ public final static String silver = SILVER; /** Lowercase for compatiblity. * @see #GRAY */ public final static String gray = GRAY; /** Lowercase for compatiblity. * @see #WHITE */ public final static String white = WHITE; /** Lowercase for compatiblity. * @see #MAROON */ public final static String maroon = MAROON; /** Lowercase for compatiblity. * @see #RED */ public final static String red = RED; /** Lowercase for compatiblity. * @see #PURPLE */ public final static String purple = PURPLE; /** Lowercase for compatiblity. * @see #FUCHSIA */ public final static String fuchsia = FUCHSIA; /** Lowercase for compatiblity. * @see #GREEN */ public final static String green = GREEN; /** Lowercase for compatiblity. * @see #LIME */ public final static String lime = LIME; /** Lowercase for compatiblity. * @see #OLIVE */ public final static String olive = OLIVE; /** Lowercase for compatiblity. * @see #YELLOW */ public final static String yellow = YELLOW; /** Lowercase for compatiblity. * @see #NAVY */ public final static String navy = NAVY; /** Lowercase for compatiblity. * @see #BLUE */ public final static String blue = BLUE; /** Lowercase for compatiblity. * @see #TEAL */ public final static String teal = TEAL; /** Lowercase for compatiblity. * @see #AQUA */ public final static String aqua = AQUA; // lowercase for compatability colors html 3.0 /** Lowercase for compatiblity. * @see #ALICEBLUE */ public final static String aliceblue = ALICEBLUE; /** Lowercase for compatiblity. * @see #ANTIQUEWHITE */ public final static String antiquewhite = ANTIQUEWHITE; /** Lowercase for compatiblity. * @see #AQUAMARINE */ public final static String aquamarine = AQUAMARINE; /** Lowercase for compatiblity. * @see #AZURE */ public final static String azure = AZURE; /** Lowercase for compatiblity. * @see #BEIGE */ public final static String beige = BEIGE; /** Lowercase for compatiblity. * @see #BISQUE */ public final static String bisque = BISQUE; /** Lowercase for compatiblity. * @see #BLANCHEDALMOND */ public final static String blanchedalmond = BLANCHEDALMOND; /** Lowercase for compatiblity. * @see #BLUEVIOLET */ public final static String blueviolet = BLUEVIOLET; /** Lowercase for compatiblity. * @see #BROWN */ public final static String brown = BROWN; /** Lowercase for compatiblity. * @see #BURLYWOOD */ public final static String burlywood = BURLYWOOD; /** Lowercase for compatiblity. * @see #CADETBLUE */ public final static String cadetblue = CADETBLUE; /** Lowercase for compatiblity. * @see #CHARTREUSE */ public final static String chartreuse = CHARTREUSE; /** Lowercase for compatiblity. * @see #CHOCOLATE */ public final static String chocolate = CHOCOLATE; /** Lowercase for compatiblity. * @see #CORAL */ public final static String coral = CORAL; /** Lowercase for compatiblity. * @see #CORNFLOWERBLUE */ public final static String cornfolowerblue = CORNFLOWERBLUE; /** Lowercase for compatiblity. * @see #CORNSILK */ public final static String cornsilk = CORNSILK; /** Lowercase for compatiblity. * @see #CRIMSON */ public final static String crimson = CRIMSON; /** Lowercase for compatiblity. * @see #CYAN */ public final static String cyan = CYAN; /** Lowercase for compatiblity. * @see #DARKBLUE */ public final static String darkblue = DARKBLUE; /** Lowercase for compatiblity. * @see #DARKCYAN */ public final static String darkcyan = DARKCYAN; /** Lowercase for compatiblity. * @see #DARKGOLDENROD */ public final static String darkgoldenrod = DARKGOLDENROD; /** Lowercase for compatiblity. * @see #DARKGRAY */ public final static String darkgray = DARKGRAY; /** Lowercase for compatiblity. * @see #DARKGREEN */ public final static String darkgreen = DARKGREEN; /** Lowercase for compatiblity. * @see #DARKKHAKI */ public final static String darkkahki = DARKKHAKI; /** Lowercase for compatiblity. * @see #DARKMAGENTA */ public final static String darkmagenta = DARKMAGENTA; /** Lowercase for compatiblity. * @see #DARKOLIVEGREEN */ public final static String darkolivegreen = DARKOLIVEGREEN; /** Lowercase for compatiblity. * @see #DARKORANGE */ public final static String darkorange = DARKORANGE; /** Lowercase for compatiblity. * @see #DARKORCHID */ public final static String darkorchid = DARKORCHID; /** Lowercase for compatiblity. * @see #DARKRED */ public final static String darkred = DARKRED; /** Lowercase for compatiblity. * @see #DARKSALMON */ public final static String darksalmon = DARKSALMON; /** Lowercase for compatiblity. * @see #DARKSEAGREEN */ public final static String darkseagreen = DARKSEAGREEN; /** Lowercase for compatiblity. * @see #DARKSLATEBLUE */ public final static String darkslateblue = DARKSLATEBLUE; /** Lowercase for compatiblity. * @see #DARKSLATEGRAY */ public final static String darkslategray = DARKSLATEGRAY; /** Lowercase for compatiblity. * @see #DARKTURQUOISE */ public final static String darkturquoise = DARKTURQUOISE; /** Lowercase for compatiblity. * @see #DARKVIOLET */ public final static String darkviolet = DARKVIOLET; /** Lowercase for compatiblity. * @see #DEEPPINK */ public final static String deeppink = DEEPPINK; /** Lowercase for compatiblity. * @see #DEEPSKYBLUE */ public final static String deepskyblue = DEEPSKYBLUE; /** Lowercase for compatiblity. * @see #DIMGRAY */ public final static String dimgray = DIMGRAY; /** Lowercase for compatiblity. * @see #DODGERBLUE */ public final static String dodgerblue = DODGERBLUE; /** Lowercase for compatiblity. * @see #FIREBRICK */ public final static String firebrick = FIREBRICK; /** Lowercase for compatiblity. * @see #FLORALWHITE */ public final static String floralwhite = FLORALWHITE; /** Lowercase for compatiblity. * @see #FORESTGREEN */ public final static String forestgreen = FORESTGREEN; /** Lowercase for compatiblity. * @see #GAINSBORO */ public final static String gainsboro = GAINSBORO; /** Lowercase for compatiblity. * @see #GHOSTWHITE */ public final static String ghostwhite = GHOSTWHITE; /** Lowercase for compatiblity. * @see #GOLD */ public final static String gold = GOLD; /** Lowercase for compatiblity. * @see #GOLDENROD */ public final static String goldenrod = GOLDENROD; /** Lowercase for compatiblity. * @see #GREENYELLOW */ public final static String greenyellow = GREENYELLOW; /** Lowercase for compatiblity. * @see #HONEYDEW */ public final static String honeydew = HONEYDEW; /** Lowercase for compatiblity. * @see #INDIANRED */ public final static String indianred = INDIANRED; /** Lowercase for compatiblity. * @see #INDIGO */ public final static String indigo = INDIGO; /** Lowercase for compatiblity. * @see #IVORY */ public final static String ivory = IVORY; /** Lowercase for compatiblity. * @see #KHAKI */ public final static String khaki = KHAKI; /** Lowercase for compatiblity. * @see #LAVENDER */ public final static String lavender = LAVENDER; /** Lowercase for compatiblity. * @see #LAVENDERBLUSH */ public final static String lavenderblush = LAVENDERBLUSH; /** Lowercase for compatiblity. * @see #LAWNGREEN */ public final static String lawngreen = LAWNGREEN; /** Lowercase for compatiblity. * @see #LEMONCHIFFON */ public final static String lemmonchiffon = LEMONCHIFFON; /** Lowercase for compatiblity. * @see #LIGHTBLUE */ public final static String lightblue = LIGHTBLUE; /** Lowercase for compatiblity. * @see #LIGHTCORAL */ public final static String lightcoral = LIGHTCORAL; /** Lowercase for compatiblity. * @see #LIGHTCYAN */ public final static String lightcyan = LIGHTCYAN; /** Lowercase for compatiblity. * @see #LIGHTGOLDENRODYELLOW */ public final static String lightgoldenrodyellow = LIGHTGOLDENRODYELLOW; /** Lowercase for compatiblity. * @see #LIGHTGREEN */ public final static String lightgreen = LIGHTGREEN; /** Lowercase for compatiblity. * @see #LIGHTPINK */ public final static String lightpink = LIGHTPINK; /** Lowercase for compatiblity. * @see #LIGHTSALMON */ public final static String lightsalmon = LIGHTSALMON; /** Lowercase for compatiblity. * @see #LIGHTSEAGREEN */ public final static String lightseagreen = LIGHTSEAGREEN; /** Lowercase for compatiblity. * @see #LIGHTSKYBLUE */ public final static String lightskyblue = LIGHTSKYBLUE; /** Lowercase for compatiblity. * @see #LIGHTSLATEGRAY */ public final static String lightslategray = LIGHTSLATEGRAY; /** Lowercase for compatiblity. * @see #LIGHTSTEELBLUE */ public final static String lightsteelblue = LIGHTSTEELBLUE; /** Lowercase for compatiblity. * @see #LIGHTYELLOW */ public final static String lightyellow = LIGHTYELLOW; /** Lowercase for compatiblity. * @see #LIMEGREEN */ public final static String limegreen = LIMEGREEN; /** Lowercase for compatiblity. * @see #LINEN */ public final static String linen = LINEN; /** Lowercase for compatiblity. * @see #MAGENTA */ public final static String magenta = MAGENTA; /** Lowercase for compatiblity. * @see #MEDIUMAQUAMARINE */ public final static String mediumaquamarine = MEDIUMAQUAMARINE; /** Lowercase for compatiblity. * @see #MEDIUMBLUE */ public final static String mediumblue = MEDIUMBLUE; /** Lowercase for compatiblity. * @see #MEDIUMORCHID */ public final static String mediumorchid = MEDIUMORCHID; /** Lowercase for compatiblity. * @see #MEDIUMPURPLE */ public final static String mediumpurple = MEDIUMPURPLE; /** Lowercase for compatiblity. * @see #MEDIUMSEAGREEN */ public final static String mediumseagreen = MEDIUMSEAGREEN; /** Lowercase for compatiblity. * @see #MEDIUMSLATEBLUE */ public final static String mediumslateblue = MEDIUMSLATEBLUE; /** Lowercase for compatiblity. * @see #MEDIUMSPRINGGREEN */ public final static String mediumspringgreen = MEDIUMSPRINGGREEN; /** Lowercase for compatiblity. * @see #MEDIUMTURQUOISE */ public final static String mediumturquoise = MEDIUMTURQUOISE; /** Lowercase for compatiblity. * @see #MEDIUMVIOLETRED */ public final static String mediumvioletred = MEDIUMVIOLETRED; /** Lowercase for compatiblity. * @see #MIDNIGHTBLUE */ public final static String midnightblue = MIDNIGHTBLUE; /** Lowercase for compatiblity. * @see #MINTCREAM */ public final static String mintcream = MINTCREAM; /** Lowercase for compatiblity. * @see #MISTYROSE */ public final static String mistyrose = MISTYROSE; /** Lowercase for compatiblity. * @see #MOCCASIN */ public final static String moccasin = MOCCASIN; /** Lowercase for compatiblity. * @see #NAVAJOWHITE */ public final static String navajowhite = NAVAJOWHITE; /** Lowercase for compatiblity. * @see #OLDLACE */ public final static String oldlace = OLDLACE; /** Lowercase for compatiblity. * @see #OLIVEDRAB */ public final static String olivedrab = OLIVEDRAB; /** Lowercase for compatiblity. * @see #ORANGE */ public final static String orange = ORANGE; /** Lowercase for compatiblity. * @see #ORANGERED */ public final static String orangered = ORANGERED; /** Lowercase for compatiblity. * @see #ORCHID */ public final static String orchid = ORCHID; /** Lowercase for compatiblity. * @see #PALEGOLDENROD */ public final static String palegoldenrod = PALEGOLDENROD; /** Lowercase for compatiblity. * @see #PALETURQUOISE */ public final static String paleturquoise = PALETURQUOISE; /** Lowercase for compatiblity. * @see #PALEVIOLETRED */ public final static String palevioletred = PALEVIOLETRED; /** Lowercase for compatiblity. * @see #PAPAYAWHIP */ public final static String papayawhip = PAPAYAWHIP; /** Lowercase for compatiblity. * @see #PEACHPUFF */ public final static String peachpuff = PEACHPUFF; /** Lowercase for compatiblity. * @see #PERU */ public final static String peru = PERU; /** Lowercase for compatiblity. * @see #PINK */ public final static String pink = PINK; /** Lowercase for compatiblity. * @see #PLUM */ public final static String plum = PLUM; /** Lowercase for compatiblity. * @see #POWDERBLUE */ public final static String powderblue = POWDERBLUE; /** Lowercase for compatiblity. * @see #ROSYBROWN */ public final static String rosybrown = ROSYBROWN; /** Lowercase for compatiblity. * @see #ROYALBLUE */ public final static String royalblue = ROYALBLUE; /** Lowercase for compatiblity. * @see #SADDLEBROWN */ public final static String saddlebrown = SADDLEBROWN; /** Lowercase for compatiblity. * @see #SALMON */ public final static String salmon = SALMON; /** Lowercase for compatiblity. * @see #SANDYBROWN */ public final static String sandybrown = SANDYBROWN; /** Lowercase for compatiblity. * @see #SEAGREEN */ public final static String seagreen = SEAGREEN; /** Lowercase for compatiblity. * @see #SEASHELL */ public final static String seashell = SEASHELL; /** Lowercase for compatiblity. * @see #SIENNA */ public final static String sienna = SIENNA; /** Lowercase for compatiblity. * @see #SKYBLUE */ public final static String skyblue = SKYBLUE; /** Lowercase for compatiblity. * @see #SLATEBLUE */ public final static String slateblue = SLATEBLUE; /** Lowercase for compatiblity. * @see #SLATEGRAY */ public final static String slategray = SLATEGRAY; /** Lowercase for compatiblity. * @see #SNOW */ public final static String snow = SNOW; /** Lowercase for compatiblity. * @see #SPRINGGREEN */ public final static String springgreen = SPRINGGREEN; /** Lowercase for compatiblity. * @see #STEELBLUE */ public final static String steelblue = STEELBLUE; /** Lowercase for compatiblity. * @see #TAN */ public final static String tan = TAN; /** Lowercase for compatiblity. * @see #THISTLE */ public final static String thistle = THISTLE; /** Lowercase for compatiblity. * @see #TOMATO */ public final static String tomato = TOMATO; /** Lowercase for compatiblity. * @see #TURQUOISE */ public final static String turquoise = TURQUOISE; /** Lowercase for compatiblity. * @see #VIOLET */ public final static String violet = VIOLET; /** Lowercase for compatiblity. * @see #WHEAT */ public final static String wheat = WHEAT; /** Lowercase for compatiblity. * @see #WHITESMOKE */ public final static String whitesmoke = WHITESMOKE; /** Lowercase for compatiblity. * @see #YELLOWGREEN */ public final static String yellowgreen = YELLOWGREEN; /** This method will take a string of hex values and append a # to the beginning if it isn't already there. @param color the string to convert @return the converted string */ public static String convertColor(String color) { String tmp = new String("#"); if (!color.startsWith("#")) tmp = tmp + color; else tmp = color; return tmp; } /** This method will take a string matching one of the colors defined in this class and return the string value of that color. @param color the color to get retrieve @return the string value of the color, if found, null otherwise */ public static String getColor(String color) { Object colObject; try { colObject = Class.forName("org.apache.ecs.HtmlColor") .getField(color) .get(null); } catch (Exception e) { return null; } return((String)colObject); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/storage/0000755000175000017500000000000011126246123021165 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/storage/Array.java0000644000175000017500000001323207703353440023116 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.storage; import java.io.Serializable; public class Array implements java.util.Enumeration,java.io.Serializable { private int current = 0; private int size = 10; private int grow = 2; private int place = 0; private Object[] elements = null; private Object[] tmpElements = null; public Array() { init(); } public Array(int size) { setSize(size); init(); } public Array(int size,int grow) { setSize(size); setGrow(grow); init(); } private void init() { elements = new Object[size]; } public Object nextElement() throws java.util.NoSuchElementException { if ( elements[place] != null && place != current) { place++; return elements[place - 1]; } else { place = 0; throw new java.util.NoSuchElementException(); } } public boolean hasMoreElements() { if( place < elements.length && current != place ) return true; return false; } public void setSize(int size) { this.size = size; } public int getCurrentSize() { return current; } public void rehash() { tmpElements = new Object[size]; int count = 0; for ( int x = 0; x < elements.length; x++ ) { if( elements[x] != null ) { tmpElements[count] = elements[x]; count++; } } elements = (Object[])tmpElements.clone(); tmpElements = null; current = count; } public void setGrow(int grow) { this.grow = grow; } public void grow() { size = size+=(size/grow); rehash(); } public void add(Object o) { if( current == elements.length ) grow(); try { elements[current] = o; current++; } catch(java.lang.ArrayStoreException ase) { } } public void add(int location,Object o) { try { elements[location] = o; } catch(java.lang.ArrayStoreException ase) { } } public void remove(int location) { elements[location] = null; } public int location(Object o) throws NoSuchObjectException { int loc = -1; for ( int x = 0; x < elements.length; x++ ) { if((elements[x] != null && elements[x] == o )|| (elements[x] != null && elements[x].equals(o))) { loc = x; break; } } if( loc == -1 ) throw new NoSuchObjectException(); return(loc); } public Object get(int location) { return elements[location]; } public java.util.Enumeration elements() { return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/storage/Hash.java0000644000175000017500000001167307703353440022732 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.storage; import java.util.Enumeration; import java.util.Vector; public class Hash implements java.io.Serializable { private Array keys = new Array(); private Array elements = new Array(); public Hash() { } public void setSize(int newSize) { keys.setSize(newSize); elements.setSize(newSize); } public void setGrow(int growBy) { keys.setGrow(growBy); elements.setGrow(growBy); } public synchronized void put(String key,Object element) { try { if( containsKey(key) ) { elements.add(keys.location(key),element); } else { keys.add( key ); elements.add(element); } } catch(org.apache.ecs.storage.NoSuchObjectException nsoe) { } } public synchronized void remove(String key) { try { if(containsKey(key)) { elements.remove(keys.location(key)); elements.remove(elements.location(key)); } } catch(org.apache.ecs.storage.NoSuchObjectException nsoe) { } } public int size() { return keys.getCurrentSize(); } public boolean contains(Object element) { try { elements.location(element); return(true); } catch(org.apache.ecs.storage.NoSuchObjectException noSuchObject) { return false; } } public Enumeration keys() { return keys; } public boolean containsKey(String key) { try { keys.location(key); } catch(org.apache.ecs.storage.NoSuchObjectException noSuchObject) { return false; } return(true); } public Enumeration elements() { return elements; } public Object get(String key) { try { if( containsKey(key) ) return(elements.get(keys.location(key))); } catch(org.apache.ecs.storage.NoSuchObjectException nsoe) { } return null; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/storage/NoSuchObjectException.java0000644000175000017500000000560207703353440026247 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.storage; public class NoSuchObjectException extends Exception { public NoSuchObjectException() { super("No such object found."); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/SinglePartElement.java0000644000175000017500000000640407703353440023761 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This class is to be subclassed by those elements that are made up of other elements that do not have an end tag. ie: IMG @version $Id: SinglePartElement.java,v 1.2 2003/04/27 09:42:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public abstract class SinglePartElement extends ConcreteElement { /** Private Initializer */ { setNeedClosingTag(false); } public SinglePartElement() { } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ClearElement.java0000644000175000017500000000630307703353440022735 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import org.apache.ecs.filter.NullFilter; /** A basic ECS element that doesn't have a filter. This allows content developers to use ECS with legacy applications that want to generate HTML but also be a use raw HTML. Don't use this unless you have to do so for compatibilty reasons */ public class ClearElement extends StringElement { public ClearElement(String string) { super( string ); this.setFilter( new NullFilter() ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/MultiPartElement.java0000644000175000017500000000635707703353440023641 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This class is to be subclassed by those elements that are made up of other elements. i.e. BODY,HEAD,etc. @version $Id: MultiPartElement.java,v 1.2 2003/04/27 09:42:53 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public abstract class MultiPartElement extends ConcreteElement { /** Private Initializer */ { setNeedClosingTag(true); } public MultiPartElement() { } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/0000755000175000017500000000000011126246123020314 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Comment.java0000644000175000017500000000741507703353440022577 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Comment extends RTFElement { /* Default Initalizer */ { setElementType("\\comment"); addElement(" "); } public Comment() { } public Comment(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Comment addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Comment addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Comment removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Header.java0000644000175000017500000000616507703353440022366 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Header extends RTFElement { // Private Initializer { setElementType("\\header "); } public Header() { } public Header addElement(RTFElement element) { addElementToRegistry(element); return this; } public Header addElement(String element) { addElementToRegistry(element); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Manager.java0000644000175000017500000000741507703353440022547 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Manager extends RTFElement { /* Default Initalizer */ { setElementType("\\manager"); addElement(" "); } public Manager() { } public Manager(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Manager addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Manager addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Manager removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BorderRight.java0000644000175000017500000000643207703353440023406 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BorderRight extends RTFElement implements Border { private BorderStyle _style = new BorderStyle(); // Private Initializer { setElementType("\\clbrdrr"); } public BorderRight() { } public BorderRight setBorderStyle(String style) { _style = _style.setBorderStyle(style); addElementToRegistry("style",_style); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Footer.java0000644000175000017500000000616407703353440022433 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Footer extends RTFElement { // Private Initializer { setElementType("\\footer"); } public Footer() { } public Footer addElement(RTFElement element) { addElementToRegistry(element); return this; } public Footer addElement(String element) { addElementToRegistry(element); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/ColorTbl.java0000644000175000017500000000600507703353440022707 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class ColorTbl extends RTFElement { /* Default Initializer */ { setElementType("\\colortbl"); } public ColorTbl() { } public ColorTbl addElement(ColorGroup group) { addElementToRegistry(group); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BorderLeft.java0000644000175000017500000000642707703353440023227 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BorderLeft extends RTFElement implements Border { private BorderStyle _style = new BorderStyle(); // Private Initializer { setElementType("\\clbrdrl"); } public BorderLeft() { } public BorderLeft setBorderStyle(String style) { _style = _style.setBorderStyle(style); addElementToRegistry("style",_style); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/TableHeader.java0000644000175000017500000000563007703353440023332 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class TableHeader extends Row { // Private Initializer { setElementType(getElementType()+" \\trhdr"); } public TableHeader() { } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/FieldType.java0000644000175000017500000000575107703353440023063 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class FieldType extends RTFElement { // Private Initializer { setElementType("\\*\\fldinst "); } public FieldType() { } public FieldType(String type) { addElementToRegistry("type",type); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Cell.java0000644000175000017500000000624707703353440022056 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Cell extends RTFElement { /* Initialization Block */ { setElementType("\\intbl "); } /** Default Constructor. */ public Cell() { } /** Create the end element for output. */ public String createEndTag() { StringBuffer sb = new StringBuffer(); sb.append(" \\cell"); sb.append("}"); return(sb.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/FieldResult.java0000644000175000017500000000575107703353440023420 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class FieldResult extends RTFElement { // Private Initializer { setElementType("\\fldrslt "); } public FieldResult() { } public FieldResult(String result) { addElementToRegistry(result); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Right.java0000644000175000017500000000637707703353440022260 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Right extends RTFElement { // Private Initializer { setElementType("\\qr"); } public Right() { } public Right addElement(RTFElement element) { addElementToRegistry(element); return this; } public Right addElement(String element) { addElementToRegistry(element); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/RTFDocument.java0000644000175000017500000001257507703353440023332 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; import org.apache.ecs.ConcreteElement; public class RTFDocument { // static declerations. /** Ansi character set. ( the default ) */ public static String ANSI = "\\ansi"; /** Apple Macintosh character set. */ public static String MAC = "\\mac"; /** IBM PC code page 437 character set. */ public static String PC = "\\pc"; /** IBM PC code page 850 character set. */ public static String PCA = "\\pca"; private Info info = new Info(); private Title title = new Title(); private Subject subject = new Subject(); private Comment comment = new Comment(); private Version version = new Version(); RTF rtf = new RTF(); /* Default Initializer */ { rtf.addElement("charSet",ANSI); info.addElement(title); info.addElement(subject); info.addElement(version); info.addElement(comment); rtf.addElement(info); } public RTFDocument() { } public Info getInfo() { return info; } public RTFDocument setTitle(String title) { this.title.addElement(title); return this; } public RTFDocument setVersion(int version) { this.version.setVersion(version); return this; } public RTFDocument setComment(String comment) { this.comment.addElement("comment",comment); return this; } public RTFDocument setSubject(String subject) { this.subject.addElement(subject); return this; } public RTFDocument setColorTable(ColorTbl tbl) { rtf.addElement(tbl); return this; } public RTFDocument setCharacterSet(String charSet) { rtf.addElement("charSet",charSet); return this; } public RTFDocument setCodeSet(String codePage) { rtf.addElement("\\ansicpg"+codePage); return this; } public org.apache.ecs.ConcreteElement getElement(String element) { return rtf.getElement(element); } public RTFDocument addElement(String element) { rtf.addElement(element); return this; } public RTFDocument addElement(String key,String element) { rtf.addElement(key,element); return this; } public RTFDocument addElement(RTFElement element) { rtf.addElement(element); return this; } public RTFDocument addElement(String key, RTFElement element) { rtf.addElement(key,element); return this; } public void output(java.io.OutputStream out) { rtf.output(out); } public void output(java.io.PrintWriter out) { rtf.output(out); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Indent.java0000644000175000017500000000661207703353440022414 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Indent extends RTFElement { // Private Initializer { setElementType("\\fi"); } private String _size = "0"; public Indent() { } public Indent(String size) { setSize(size); } public Indent(int size) { setSize(size); } public Indent setSize(int size) { _size = Integer.toString(size); return this; } public Indent setSize(String size) { _size = size; return this; } public String createStartTag() { return getElementType()+_size; } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/ForeGroundColor.java0000644000175000017500000001053307703353441024242 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class ForeGroundColor extends RTFElement { /* Default Initialization */ { setElementType("\\cf"); } public ForeGroundColor(int location) { setElementType(getElementType()+Integer.toString(location)+" "); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ForeGroundColor addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ForeGroundColor addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ForeGroundColor addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ForeGroundColor addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ForeGroundColor removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Bold.java0000644000175000017500000001211107703353440022042 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Bold extends RTFElement { /* Initialization Block */ { setElementType("\\b"); addElement(" "); // force a space into the Element Table for rendering. } /** Default Constructor. */ public Bold() { } /** Instantiate a new Bold element with this String. @param element String to apply a Bold tag too. */ public Bold(String element) { addElement(element); } /** Instantiate a new Bold element with this Element. @param element RTFElement to apply a Bold tag too. */ public Bold(RTFElement element) { addElement(element); } public String createStartTag() { return getElementType(); } /** Create the end element for output. */ public String createEndTag() { StringBuffer sb = new StringBuffer(); sb.append(getElementType()); sb.append("0"); // 0 signifies the close of the element. return(sb.toString()); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Bold addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Bold addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Bold addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Bold addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Bold removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/RTFElement.java0000644000175000017500000000716607703353441023146 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; import org.apache.ecs.ConcreteElement; public class RTFElement extends org.apache.ecs.ConcreteElement { public RTFElement() { setCase(org.apache.ecs.Element.LOWERCASE); } public Object get(String key) { return getElement(key); } public String createStartTag() { /* I should proabably store this within the class document, but RTF isn't as complex with tag types as other markups. */ StringBuffer sb = new StringBuffer(); sb.append("{"); sb.append(getElementType()); return(sb.toString()); } public String createEndTag() { /* I should proabably store this within the class document, but RTF isn't as complex with tag types as other markups. */ StringBuffer sb = new StringBuffer(); sb.append("}"); return(sb.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Table.java0000644000175000017500000000546507703353440022227 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Table extends Paragraph { public Table() { } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/ColorGroup.java0000644000175000017500000000664307703353440023272 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class ColorGroup extends RTFElement { public static String RED = "\\red"; public static String GREEN = "\\green"; public static String BLUE = "\\blue"; /* Default Initializer */ { setElementType(";"); // Empty color group } public ColorGroup() { } public ColorGroup(int red,int green,int blue) { String r = RED+Integer.toString(red); String g = GREEN+Integer.toString(green); String b = BLUE+Integer.toString(blue); setElementType(r+g+b+";"); } public String createStartTag() { return(getElementType()); } public String createEndTag() { return(""); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Alignment.java0000644000175000017500000002010207703353440023077 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; import java.io.OutputStream; import java.io.Writer; import java.io.PrintWriter; import java.util.Hashtable; import java.util.Enumeration; import org.apache.ecs.Element; import org.apache.ecs.ConcreteElement; public class Alignment extends RTFElement { private RTFElement type = new Justified(); private static Hashtable _lookup = new Hashtable(); private static final int CENTERED = 1; private static final int JUSTIFIED = 2; private static final int RIGHT = 3; private static final int LEFT = 4; public Alignment() { } /* Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(Element element) { type.addElementToRegistry(element); return type; } /** Registers an element in the head element list @param hashcode internal name of element @param element element to be added to the registry. */ public Element addElementToRegistry(String hashcode,Element element) { type.addElementToRegistry(hashcode,element); return type; } /** Registers an element in the head element list @hashcode named element for hashcode @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(Element element,boolean filter) { type.addElementToRegistry(element,filter); return type; } /** Registers an element in the head element list @param element element to be added to the registry. @param filter should we filter this element? */ public Element addElementToRegistry(String hashcode, Element element,boolean filter) { type.addElementToRegistry(hashcode,element,filter); return type; } /** Registers an element in the head element list @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(String value,boolean filter) { type.addElementToRegistry(value,filter); return type; } /** Registers an element in the head element list @hashcode named element for hashcode @param element element to be added to the registry. @param filter does this need to be filtered? */ public Element addElementToRegistry(String hashcode, String value,boolean filter) { type.addElementToRegistry(hashcode,value,filter); return type; } /** Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(String value) { type.addElementToRegistry(value); return type; } /** Registers an element in the head element list @param element element to be added to the registry. */ public Element addElementToRegistry(String hashcode,String value) { type.addElementToRegistry(hashcode,value); return type; } /** Removes an element from the element registry @param element element to be added to the registry. */ public Element removeElementFromRegistry(Element element) { type.removeElementFromRegistry(Integer.toString(element.hashCode())); return(type); } /** Removes an element from the head element registry @param hashcode element to be added to the registry. */ public Element removeElementFromRegistry(String hashcode) { type.removeElementFromRegistry(hashcode); return(type); } /** Find out if this element is in the element registry. @param element find out if this element is in the registry */ public boolean registryHasElement(Element element) { return(type.registryHasElement(element)); } /** Get an enumeration of the elements that this element contains. */ public Enumeration elements() { return(type.elements()); } /** Find out if this element is in the element registry. @param element find out if this element is in the registry */ public boolean registryHasElement(String hashcode) { return(type.registryHasElement(hashcode)); } public Alignment setType(String type) { if(type.equals("centered")) { this.type = new Centered(); } else if(type.equals("justified")) { this.type = new Justified(); } else if(type.equals("right")) { this.type = new Right(); } else if(type.equals("left")) { this.type = new Left(); } return this; } public void output(OutputStream out) { type.output(out); } public void output(Writer out) { type.output(out); } public void output(PrintWriter out) { type.output(out); } // Static initializer { _lookup.put("centered",Integer.toString(CENTERED)); _lookup.put("justified",Integer.toString(JUSTIFIED)); _lookup.put("right",Integer.toString(RIGHT)); _lookup.put("left",Integer.toString(LEFT)); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/RTF.java0000644000175000017500000001033507703353440021623 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class RTF extends RTFElement { // Default Initializer. { setElementType("\\rtf"); } /** Default Constructor. */ public RTF() { } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public RTF addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public RTF addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public RTF addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public RTF addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public RTF removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/FontSize.java0000644000175000017500000001145607703353440022736 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class FontSize extends RTFElement { /* Default Initialization */ { setElementType("\\fs"); this.setNeedClosingTag(false); } public FontSize() { } public FontSize setSize(int size) { size = size * 2; // Since rtf assumes this is 1/2 pt size. setElementType(getElementType()+Integer.toString(size)+" "); return this; } public FontSize setSize(String size) { if(size.endsWith("pt")) { size = Integer.toString(Integer.parseInt(size.substring(0,size.indexOf("pt")))*2); } setElementType(getElementType()+size+" "); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FontSize addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FontSize addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FontSize addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FontSize addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public FontSize removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } public String createStartTag() { return(getElementType()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/CellDef.java0000644000175000017500000000761207703353440022472 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class CellDef extends RTFElement { /* Initialization Block */ { setElementType("\\cellx"); } /** Default Constructor. */ public CellDef() { } /** Instantiate a new CellDef element with this String. @param element String to apply a Bold tag too. */ public CellDef(String size) { addAttribute("size",size); } public CellDef setSize(String size) { addAttribute("size",size); return this; } /** Get the size in twips of this cell. */ public int getSize() { int size = Integer.parseInt((String)getElementHashEntry().get("size")); return(size); } /** Create the start element for output. */ public String createStartTag() { StringBuffer sb = new StringBuffer(); sb.append(getElementType()); sb.append(Integer.toString(getSize())); return(sb.toString()); } /** Create the end element for output. */ public String createEndTag() { StringBuffer sb = new StringBuffer(); return(sb.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Author.java0000644000175000017500000000740607703353440022437 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Author extends RTFElement { /* Default Initalizer */ { setElementType("\\author"); addElement(" "); } public Author() { } public Author(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Author addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Author addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Author removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Category.java0000644000175000017500000000742407703353441022753 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Category extends RTFElement { /* Default Initalizer */ { setElementType("\\category"); addElement(" "); } public Category() { } public Category(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Category addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Category addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Category removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Keywords.java0000644000175000017500000000742407703353440023004 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Keywords extends RTFElement { /* Default Initalizer */ { setElementType("\\keywords"); addElement(" "); } public Keywords() { } public Keywords(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Keywords addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Keywords addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Keywords removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BackGroundColor.java0000644000175000017500000001053307703353440024206 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BackGroundColor extends RTFElement { /* Default Initialization */ { setElementType("\\cb"); } public BackGroundColor(int location) { setElementType(getElementType()+Integer.toString(location)+" "); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BackGroundColor addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BackGroundColor addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BackGroundColor addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BackGroundColor addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public BackGroundColor removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Border.java0000644000175000017500000000563007703353440022407 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; /** * Interface that border classes implement so that we are able to do one * is instanceof Border rather then a great big || statement. */ public interface Border { } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Left.java0000644000175000017500000000637207703353441022071 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Left extends RTFElement { // Private Initializer { setElementType("\\ql"); } public Left() { } public Left addElement(RTFElement element) { addElementToRegistry(element); return this; } public Left addElement(String element) { addElementToRegistry(element); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BorderBottom.java0000644000175000017500000000643507703353440023600 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BorderBottom extends RTFElement implements Border { private BorderStyle _style = new BorderStyle(); // Private Initializer { setElementType("\\clbrdrb"); } public BorderBottom() { } public BorderBottom setBorderStyle(String style) { _style = _style.setBorderStyle(style); addElementToRegistry("style",_style); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Doccomm.java0000644000175000017500000000741507703353440022556 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Doccomm extends RTFElement { /* Default Initalizer */ { setElementType("\\doccomm"); addElement(" "); } public Doccomm() { } public Doccomm(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Doccomm addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Doccomm addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Doccomm removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Centered.java0000644000175000017500000000641207703353440022722 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Centered extends RTFElement { // Private Initializer { setElementType("\\qc"); } public Centered() { } public Centered addElement(RTFElement element) { addElementToRegistry(element); return this; } public Centered addElement(String element) { addElementToRegistry(element); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Operator.java0000644000175000017500000000742407703353440022770 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Operator extends RTFElement { /* Default Initalizer */ { setElementType("\\operator"); addElement(" "); } public Operator() { } public Operator(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Operator addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Operator addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Operator removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Field.java0000644000175000017500000000615007703353440022213 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Field extends RTFElement { private FieldType _type = new FieldType(); // Private Initializer { setElementType("\\field"); updateType(); } public Field(String type) { _type = new FieldType(type); updateType(); } private void updateType() { addElementToRegistry("fieldtype",_type); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Justified.java0000644000175000017500000000641607703353440023123 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Justified extends RTFElement { // Private Initializer { setElementType("\\qj"); } public Justified() { } public Justified addElement(RTFElement element) { addElementToRegistry(element); return this; } public Justified addElement(String element) { addElementToRegistry(element); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Subject.java0000644000175000017500000000741507703353440022574 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Subject extends RTFElement { /* Default Initalizer */ { setElementType("\\subject"); addElement(" "); } public Subject() { } public Subject(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Subject addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Subject addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Subject removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Title.java0000644000175000017500000000737707703353440022265 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Title extends RTFElement { /* Default Initalizer */ { setElementType("\\title"); addElement(" "); } public Title() { } public Title(String element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Title addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Title addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Title removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/TableDef.java0000644000175000017500000000561207703353440022640 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class TableDef extends RTFElement { public TableDef() { } // Private Initializer { setElementType("\\tabledef"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BorderStyle.java0000644000175000017500000000724007703353440023427 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BorderStyle extends RTFElement { // Private Initializer { setStyle("solid"); } public BorderStyle() { } public BorderStyle setBorderStyle(String style) { if(style.equals("solid")) { setElementType("\\brdrs"); } else if(style.equals("double")) { setElementType("\\brdrdb"); } else if(style.equals("groove")) { setElementType("\\brdrengrave"); } else if(style.equals("ridge")) { setElementType("\\brdremboss"); } else if(style.equals("dot")) { setElementType("\\brdrdot"); } else { setStyle("solid"); } return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/PageBreak.java0000644000175000017500000000565507703353440023022 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class PageBreak extends RTFElement { /* Default Initalizer */ { setElementType("\\page"); addElementToRegistry(" "); } public PageBreak() { } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Row.java0000644000175000017500000000744507703353440021747 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; import org.apache.ecs.ConcreteElement; public class Row extends RTFElement { public static final int TWIPS = 10800; private float TWIPS_USED = 0; /* Initialization Block */ { setElementType("\\trowd"); addElementToRegistry(" "); // force a space into the Element Table for rendering. } /** Default Constructor. */ public Row() { } /** Get the cellx sizing based on percentage. */ public int getSize(String width) { System.out.println(width); if(width.endsWith("%")) { width = width.substring(width.length()); } int _width = Integer.parseInt(width); TWIPS_USED = ( ( _width/TWIPS ) * TWIPS ) + TWIPS_USED; return (int)TWIPS_USED; } /** Create the end element for output. */ public String createEndTag() { StringBuffer sb = new StringBuffer(); sb.append("\\row"); // 0 signifies the close of the element. sb.append("}"); return(sb.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/BorderTop.java0000644000175000017500000000642407703353440023074 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class BorderTop extends RTFElement implements Border { private BorderStyle _style = new BorderStyle(); // Private Initializer { setElementType("\\clbrdrt"); } public BorderTop() { } public BorderTop setBorderStyle(String style) { _style = _style.setBorderStyle(style); addElementToRegistry("style",_style); return this; } public String createStartTag() { return getElementType(); } public String createEndTag() { return ""; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Info.java0000644000175000017500000001032007703353440022055 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Info extends RTFElement { /* Default Initalizer */ { setElementType("\\info"); addElement(" "); } public Info() { } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Info addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Info addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Info addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Info addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Info removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Paragraph.java0000644000175000017500000001136307703353440023077 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Paragraph extends RTFElement { private Indent _indent = new Indent(); /* Default Initializer */ { setElementType("\\par"); updateIndent(); addElement(" "); } public Paragraph() { } public Paragraph(RTFElement element) { addElement(element); } public Paragraph(String element) { addElement(element); } public Paragraph setIndent(String size) { _indent = new Indent(size); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Paragraph addElement(String hashcode,RTFElement element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Paragraph addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Paragraph addElement(RTFElement element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Paragraph addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Paragraph removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** * Update the number of spaces for indention in this paragraph */ private void updateIndent() { addElement("indent",_indent); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/Version.java0000644000175000017500000000613507703353440022620 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class Version extends RTFElement { /* Default Initalizer */ { setElementType("\\version"); } public Version() { } public Version(int version) { setVersion(version); } public Version setVersion(int version) { setElementType(getElementType()+Integer.toString(version)); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/rtf/PageNumber.java0000644000175000017500000000623107703353440023215 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.rtf; public class PageNumber extends RTFElement { // Private Initializer { setElementType(""); } public PageNumber() { addElementToRegistry("Page "); addElementToRegistry(new Field("PAGE")); addElementToRegistry(new FieldResult()); addElementToRegistry(" of "); addElementToRegistry(new Field("NUMPAGES")); addElementToRegistry(new FieldResult()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Entities.java0000644000175000017500000005460607703353440022172 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface describes all html 4.0 entities. @version $Id: Entities.java,v 1.3 2003/04/27 09:43:24 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface Entities { public final static String NBSP = " "; // no-break space public final static String IEXCL = "¡"; // inverted exclamation mark public final static String CENT = "¢"; // cent sign public final static String POUND = "£"; // pound sterling sign public final static String CURREN = "¤"; // general currency sign public final static String YEN = "¥"; // yen sign public final static String BRVBAR = "¦"; // broken (vertical) bar public final static String SECT = "§"; // section sign public final static String UML = "¨"; // umlat (dieresis) public final static String COPY = "©"; // copyright sign public final static String ORDF = "ª"; // ordinal indicator feminine public final static String LAQUO = "«"; // angle quotation mark, left public final static String NOT = "¬"; // not sign public final static String SHY = "­"; // soft hyphen public final static String REG = "®"; // registered sign public final static String MACR = "¯"; // macron public final static String DEG = "°"; // degree sign public final static String PLUSMN = "±"; // plus-or-minus sign public final static String SUP2 = "²"; // superscript two public final static String SUP3 = "³"; // superscript three public final static String ACUTE = "´"; // actue accent public final static String MICRO = "µ"; // micro sign public final static String PARA = "¶"; // pilcrow (paragraph sign) public final static String MIDDOT = "¶"; // middle dot public final static String CEDIL = "¸"; // cedilla public final static String SUP1 = "¹"; // superscript one public final static String ORDM = "º"; // ordinal indicator, masculine public final static String RAQUO = "»"; // angle quotation mark, righ public final static String FRAC14 = "¼"; // fraction one-quarter public final static String FRAC12 = "½"; // fraction one-half public final static String FRAC34 = "¾"; // fraction three-quarters public final static String IQUEST = "¿"; // inverted quotation mark public final static String AGRAVE = "À"; // capital A, grave accent public final static String AACUTE = "Á"; // capital A, acute accent public final static String ACIRC = "Â"; // capital A, circumflex accent public final static String ATILDE = "Ã"; // capital A, tilde public final static String AUML = "Ä"; // capital A, dieresis or umlaut mark public final static String ARING = "Å"; // capital A, ring public final static String AELIG = "Æ"; // capital AE diphthong (ligature) public final static String CCEDIL = "Ç"; // capital C, cedilla public final static String EGRAVE = "È"; // capital E, grave accent public final static String EACUTE = "É"; // captial E, acute accent public final static String ECIRC = "Ê"; // capital E, circumflex accent public final static String EMUL = "Ë"; // captial E, dieresis ur umlaut mark public final static String IGRAVE = "Ì"; // capital I, grave accent public final static String IACUTE = "Í"; // captial I, acute accent public final static String ICIRC = "Î"; // captial I, circumflex accent public final static String IUML = "Ï"; // capital I, dieresis or umlaut mark public final static String ETH = "Ð"; // Eth, Icelandic public final static String NTILDE = "Ñ"; // capital N, tilde public final static String OGRAVE = "Ò"; // capital O, grave accent public final static String OACUTE = "Ó"; // capital O, acute accent public final static String OCIRC = "Ô"; // capital O, circumflex accent public final static String OTILDE = "Õ"; // capital O, tilde public final static String OUML = "Ö"; // capital O, dieresis or umlaut mark public final static String TIMES = "×"; // multiply sign public final static String OSLASH = "Ø"; // capital O, slash public final static String UGRAVE = "Ù"; // capital U, grave accent public final static String UACUTE = "Ú"; // capital U, acute accent public final static String UCIRC = "Û"; // capital U, circumflex accent public final static String UUML = "Ü"; // capital U, dieresis or umlaut mark public final static String YACUTE = "Ý"; // captial Y, acute accent public final static String THORN = "Þ"; // capital THORN (icelandic) public final static String SZLIG = "ß"; // small sharp s, German (sz ligature) public final static String aGRAVE = "à"; // small a, grave accent public final static String aACUTE = "á"; // small a, acute accent public final static String aCIRC = "â"; // small a, circumflex accent public final static String aTILDE = "ã"; // small a, tilde sign public final static String aUML = "ä"; // small a, dieresis or umlaut mark public final static String aRING = "å"; // small a, ring public final static String aELIG = "æ"; // small ae diphthong (ligature) public final static String cCEDIL = "ç"; // small c, cedilla public final static String eGRAVE = "è"; // small e, grave accent public final static String eACUTE = "é"; // small e, acute accent public final static String eCIRC = "ê"; // small e, circumflex accent public final static String eUML = "ë"; // small e, dieresis or umalut mark public final static String iGRAVE = "ì"; // small i, grave accent public final static String iACUTE = "í"; // small i, acute accent public final static String iCIRC = "î"; // small i, curcumflex accent public final static String iUML = "ï"; // small i, dieresis or umalut mark public final static String eth = "ð"; // small eth public final static String nTILDE = "ñ"; // small n, tilde sign public final static String oGRAVE = "ò"; // small o, grave accent public final static String oACUTE = "ò"; // small o, acute accent public final static String oCIRC = "ô"; // small o, circumflex accent public final static String oTILDE = "õ"; // small o, tilde public final static String oUML = "ö"; // small o, diersis or umalut mark public final static String DIVIDE = "÷"; // division sign public final static String oSLASH = "ø"; // small o, slash public final static String uGRAVE = "ù"; // small u, grave accent public final static String uACUTE = "ú"; // small u, acute accent public final static String uCIRC = "û"; // small u, circumflex accent public final static String uUML = "ü"; // small u, dieresis or umalut mark public final static String yACUTE = "ý"; // small y, acute accent public final static String thorn = "þ"; // small thorn, Icelandic public final static String yUML = "ÿ"; // small y, dieresis or umlaut mark // Mathmatical, Greek and Symbolic characters public final static String FNOF = "ƒ"; // latin small f with hook public final static String ALPHA = "Α"; // greek capital letter aplha public final static String BETA = "Β"; // greek capital letter beta public final static String GAMMA = "Γ"; // greek capital letter gamma public final static String DELTA = "Δ"; // greek capital letter delta public final static String EPSILON = "Ε"; // greek capital letter epsilon public final static String ZETA = "Ζ"; // greek capital letter zeta public final static String ETA = "Η"; // greek capital letter eta public final static String THETA = "Θ"; // greek capital letter theta public final static String IOTA = "Ι"; // greek capital letter iota public final static String KAPPA = "Κ"; // greek capital letter kappa public final static String LAMDA = "Λ"; // greek capital letter lamda public final static String MU = "Μ"; // greek capital letter mu public final static String NU = "Ν"; // greek capital letter nu public final static String XI = "Ξ"; // greek capital letter xi public final static String OMICRON = "Ο"; // greek capital letter omicron public final static String PI = "Π"; // greek capital letter pi public final static String RHO = "Ρ"; // greek capital letter rho public final static String SIGMA = "Σ"; // greek capital letter sigma public final static String TAU = "Τ"; // greek capital letter tau public final static String UPSILON = "Υ"; // greek capital letter upsilon public final static String PHI = "Φ"; // greek capital letter phi public final static String CHI = "Χ"; // greek capital letter chi public final static String PSI = "Ψ"; // greek capital letter psi public final static String OMEGA = "Ω"; // greek capital letter omega public final static String alpha = "α"; // greek small letter aplha public final static String beta = "β"; // greek small letter beta public final static String gamma = "γ"; // greek small letter gamma public final static String delta = "δ"; // greek small letter delta public final static String epsilon = "ε"; // greek small letter epsilon public final static String zeta = "ζ"; // greek small letter zeta public final static String eta = "η"; // greek small letter eta public final static String theta = "θ"; // greek small letter theta public final static String iota = "ι"; // greek small letter iota public final static String kappa = "κ"; // greek small letter kappa public final static String lamda = "λ"; // greek small letter lamda public final static String mu = "μ"; // greek small letter mu public final static String nu = "ν"; // greek small letter nu public final static String xi = "ξ"; // greek small letter xi public final static String omicron = "ο"; // greek small letter omicron public final static String pi = "π"; // greek small letter pi public final static String rho = "ρ"; // greek small letter rho public final static String sigmaf = "ς"; // greek small letter sigma public final static String sigma = "σ"; // greek small letter sigma public final static String tau = "τ"; // greek small letter tau public final static String upsilon = "υ"; // greek small letter upsilon public final static String phi = "φ"; // greek small letter phi public final static String chi = "χ"; // greek small letter chi public final static String psi = "ψ"; // greek small letter psi public final static String omega = "ω"; // greek small letter omega public final static String thetasym = "ϑ"; // greek small letter thetasym public final static String upsih = "ϒ"; // greek small letter upsih public final static String piv = "ϖ"; // greek small letter piv // Punctuation public final static String BULL = "•"; // bullet (small balck circle) public final static String HELLIP = "…"; // horizontal ellipsis public final static String PRIME = "′"; // prime public final static String PPRIME = "″"; // double prime public final static String OLINE = "‾"; // overline public final static String frasl = "⁄"; // fraction slash // Leter like Symbols public final static String WEIERP = "℘"; // Script capital P public final static String IMAGE = "ℑ"; // blackletter capital I (imaginary part) public final static String REAL = "ℜ"; // blackletter capital R (real part) public final static String TRADE = "™"; // trade mark sign public final static String ALEFSYM = "ℵ"; // alef symbol // Arrows public final static String LARR = "←"; // leftwards arrow public final static String UARR = "↑"; // upwards arrow public final static String RARR = "→"; // rightwardsards arrow public final static String DARR = "↓"; // downwards arrow public final static String HARR = "↔"; // left right arrow public final static String CRARR = "⅑"; // downwards arrow with corner leftwards public final static String LLARR = "Ⅼ"; // leftwards double arrow public final static String UUARR = "Ⅽ"; // upwards double arrow public final static String RRARR = "Ⅾ"; // rightwards double arrow public final static String DDARR = "Ⅿ"; // downwards double arrow public final static String HHARR = "ⅰ"; // left right double arrow // Mathmatical operators public final static String FORALL = "∀"; // for all public final static String PART = "∂"; // partial public final static String EXIST = "∃"; // there exists public final static String EMPTY = "∅"; // empty set public final static String NABLA = "∇"; // nabla public final static String ISIN = "∈"; // element of public final static String NOTIN = "∉"; // not an element of public final static String NI = "∋"; // contains as member public final static String PROD = "∏"; // product of public final static String SUM = "∑"; // sumation public final static String MINUS = "−"; // minus sign public final static String LOWAST = "∗"; // asterisk operator public final static String RADIC = "√"; // square root public final static String PROP = "∝"; // proportional public final static String INFIN = "∞"; // infinity public final static String ANG = "∠"; // angle public final static String AND = "≁"; // logical and public final static String OR = "≂"; // logical or public final static String CAP = "∩"; // intersection public final static String CUP = "∪"; // union public final static String INT = "∫"; // integral public final static String THERE4 = "∴"; // therefore public final static String SIM = "∼"; // tilde public final static String CONG = "≅"; // approximately equal to public final static String ASYMP = "≈"; // almost equal to public final static String NE = "≠"; // not equal to public final static String EQUIV = "≡"; // identical to public final static String LE = "≤"; // less then public final static String GE = "≥"; // greater then public final static String SUB = "⊂"; // subset public final static String SUP = "⊃"; // superset public final static String NSUB = "⊄"; // not a subset of public final static String SUBE = "⊆"; // subset of or equal to public final static String SUPE = "⊇"; // superset of or equal to public final static String OPLUS = "⊕"; // circled plus public final static String OTIMES = "⊗"; // circled times public final static String PERP = "⊥"; // up track public final static String SDOT = "⋅"; // dot operator // Miscellaneous Technical public final static String LCEIL = "⌈"; // left ceiling public final static String RCEIL = "⌉"; // right ceiling public final static String LFLOOR = "⌊"; // left floor public final static String RFLOOR = "⌋"; // right floor public final static String LANG = "〈"; // left pointing angle bracket public final static String RANG = "〉"; // right pointing angle bracket // Geometric Shapes public final static String LOZ = "◊"; // lozenge (not throat) // Miscellaneous Symbols public final static String SPADES = "♠"; // black spade suit public final static String CLUBS = "♣"; // black club suit public final static String HEARTS = "♥"; // black heart suit public final static String DIAMS = "♦"; // black diamond suit // Special Characters for html // CO Controls (Basic Latin) public final static String QUOT = """; // quotation mark public final static String AMP = "&"; // ampersand public final static String LT = "<"; // less than sign public final static String GT = ">"; // greater than sign // Latin Extended A public final static String OELIG = "Œ"; // latin capital ligature oe public final static String SCARON = "œ"; // latin capital letter S with caron public final static String sCARON = "š"; // latin small letter s with caron public final static String YUML = "Ÿ"; // latin capital letter Y with diaeresis // Spcaing Modifier letters public final static String CIRC = "ˆ"; // modifier letter circumflex accent public final static String TILDE = "˜"; // small tilde // General Punctuation public final static String ENSP = " "; // en space public final static String EMSP = " "; // em space public final static String THINSP = " "; // thin space public final static String ZWNJ = "‌"; // zero width non-joiner public final static String ZWJ = "‍"; // zero width joiner public final static String LRM = "‎"; // left to right mark public final static String RLM = "‏"; // right to left mark public final static String NDASH = "–"; // en dash public final static String MDASH = "—"; // em dash public final static String LSQUO = "’"; // left single quotation mark public final static String RSQUO = "‚"; // right single quotation mark public final static String SBQUO = "‚"; // single low-9 quotation mark public final static String LDQUO = "“"; // left double quotation mark public final static String RDQUO = "”"; // right double quotation mark public final static String BDQUO = "„"; // double low-9 quotation mark public final static String DAGGER = "†"; // dagger public final static String DDAGGER = "‡"; // double dagger public final static String PERMIL = "‰"; // per mille sign public final static String LSAQUO = "‹"; // single left-pointing angle mark public final static String RSQQUO = "›"; // single right-pointing angle mark } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ElementRegistry.java0000644000175000017500000000667307703353441023532 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** Interface for Elements that implement a registry. @version $Id: ElementRegistry.java,v 1.2 2003/04/27 09:43:24 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface ElementRegistry { public abstract Element addElementToRegistry(Element element); public abstract Element addElementToRegistry(String element); public abstract Element removeElementFromRegistry(Element element); public abstract Element removeElementFromRegistry(String element); public abstract boolean registryHasElement(Element element); public abstract boolean registryHasElement(String element); } jakarta-ecs-1.4.2/src/java/org/apache/ecs/ElementContainer.java0000644000175000017500000001217507703353440023635 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; import java.io.OutputStream; import java.io.PrintWriter; import java.util.Enumeration; import java.util.Vector; /** This class is a Element container class. You can place elements into this class and then you can place this class into other elements in order to combine elements together.

    P p = new P().addElement("foo");
    P p1 = new P().addElement("bar");
    ElementContainer ec = new ElementContainer(p).addElement(p1);
    System.out.println(ec.toString());
@version $Id: ElementContainer.java,v 1.7 2003/04/27 09:43:24 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class ElementContainer extends ConcreteElement implements Printable { /** internal use only @serial ec ec */ private Vector ec = new Vector(2); /** Basic constructor */ public ElementContainer() { } /** Basic constructor */ public ElementContainer(Element element) { addElement(element); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ElementContainer addElement(Element element) { ec.addElement(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ElementContainer addElement(String element) { ec.addElement(new StringElement(element)); return(this); } /** Implements the output method in Element */ public void output(OutputStream out) { Element element = null; Enumeration data = ec.elements(); while ( data.hasMoreElements() ) { element = (Element) data.nextElement(); element.output(out); } } /** Implements the output method in Element */ public void output(PrintWriter out) { Element element = null; Enumeration data = ec.elements(); while ( data.hasMoreElements() ) { element = (Element) data.nextElement(); element.output(out); } } /** returns an enumeration of the elements in this container */ public Enumeration elements() { return ec.elements(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/0000755000175000017500000000000011126246123020465 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TD.java0000644000175000017500000003251307703353440021652 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TD> object. @version $Id: TD.java,v 1.8 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TD extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("td"); } /** Basic Constructor. Use set* methods to change attributes. */ public TD() { } /** Constructor adds element. Use set* methods to change attributes. @param element element to add. */ public TD(Element element) { addElement(element); } /** Constructor adds element. Use set* methods to change attributes. @param element element to add. */ public TD(String element) { addElement(element); } /** Constructor sets closing tag. Use set* methods to change attributes. @param close print the closing tag? */ public TD(boolean close) { setNeedClosingTag(close); } /** Sets the ABBR="" attribute. @param cdata sets the ABBR="" attribute. */ public TD setAbbr(String cdata) { addAttribute("abbr",cdata); return(this); } /** Sets the AXIS="" attribute @param cdata sets the AXIS="" attribute */ public TD setAxis(String cdata) { addAttribute("axis",cdata); return(this); } /** Sets the AXES="" attribute @param id_refs list of id's for header cells */ public TD setAxes(String id_refs) { addAttribute("axes",id_refs); return(this); } /** Sets the ROWSPAN="" attribute @param rowspan Number of rows spaned by cell */ public TD setRowSpan(int rowspan) { addAttribute("rowspan",Integer.toString(rowspan)); return(this); } /** Sets the ROWSPAN="" attribute @param rowspan Number of rows spaned by cell */ public TD setRowSpan(String rowspan) { addAttribute("rowspan",rowspan); return(this); } /** Sets the COLSPAN="" attribute @param colspan Number of columns spanned by cell */ public TD setColSpan(int colspan) { addAttribute("colspan",Integer.toString(colspan)); return(this); } /** Sets the COLSPAN="" attribute @param colspan Number of columns spanned by cell */ public TD setColSpan(String colspan) { addAttribute("colspan",colspan); return(this); } /** Sets word wrap on or off. @param wrap turn word wrap on or off. */ public TD setNoWrap(boolean wrap) { if ( wrap == true ) addAttribute("nowrap", NO_ATTRIBUTE_VALUE); else removeAttribute("nowrap"); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TD setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TD setWidth(String width) { addAttribute("width",width); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public TD setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public TD setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TD setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public TD setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public TD setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TD setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TD setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the BGCOLOR="" attribute @param color sets the background color of the cell. */ public TD setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Sets the BACKGROUND="" attribute @param url sets the background to some image specified by url. */ public TD setBackground(String url) { addAttribute("background",url); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TD addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TD addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TD addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TD addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TD removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak() { java.util.Enumeration enum = elements(); int i=0; int j=0; while(enum.hasMoreElements()) { j++; Object obj = enum.nextElement(); if( obj instanceof IMG || obj instanceof A ) i++; } if ( i==j) return false; return true; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/DT.java0000644000175000017500000001750407703353440021655 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <DT> tag.

The DT tag defaults to not having a closing </DT> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: DT.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class DT extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dt"); setNeedClosingTag(false); } /** Basic constructor. Use setValue() if needed. */ public DT() { } /** Sets the value after the <DT> tag @param value the value after the <DT> tag */ public DT(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DT addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DT addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DT addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DT addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public DT removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Button.java0000644000175000017500000002374407703353441022625 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Button> tag. @version $Id: Button.java,v 1.4 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Button extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { // convience variables public final static String RESET = "reset"; public final static String SUBMIT = "submit"; public final static String BUTTON = "button"; public final static String reset = "reset"; public final static String submit = "submit"; public final static String button = "button"; /** private initializaer. */ { setElementType("button"); } public Button() { } /** Set the name of this button. @param name set the name of this button. */ public Button setName(String name) { addAttribute("name",name); return(this); } /** Set the value of this button. @param value set the value of this button. */ public Button setValue(String value) { addAttribute("value",value); return(this); } /** Set the type of button this is. Convience variables are
Button.SUBMIT
Button.RESET
Button.BUTTON @param button type. */ public Button setType(String type) { addAttribute("type",type); return(this); } /** Is this button disabled? disabled true|false */ public Button setDisabled(boolean disabled) { if(disabled) addAttribute("disabled",NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public Button setTabIndex(int number) { addAttribute("tabindex",Integer.toString(number)); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public Button setTabIndex(String number) { addAttribute("tabindex",number); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Button addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Button addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Button addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Button addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Button removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/I.java0000644000175000017500000001736107703353440021537 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <I> tag. @version $Id: I.java,v 1.4 2003/04/27 09:20:29 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class I extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("i"); } /** Basic constructor. */ public I() { } /** Basic constructor. @param element Adds an Element to the element. */ public I(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public I(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public I addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public I addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public I addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public I addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public I removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H2.java0000644000175000017500000001732007703353440021613 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H2> tag. @version $Id: H2.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H2 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h2"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H2() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <H2>value</H2> */ public H2(String value) { addElement(value); } /** Adds an Element to the element. @param element Adds an Element to the element. */ /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H2 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H2 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } public H2 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H2 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H2 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/S.java0000644000175000017500000001736107703353440021551 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <S> tag. @version $Id: S.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class S extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("s"); } /** Basic constructor. */ public S() { } /** Basic constructor. @param element Adds an Element to the element. */ public S(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public S(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public S addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public S addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public S addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public S addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public S removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Applet.java0000644000175000017500000002166207703353440022573 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates an ObjectElement @version $Id: Applet.java,v 1.3 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Applet extends MultiPartElement implements Printable { /** Private initializer. */ { setElementType("applet"); } /** Default constructor. Creates the <applet/> Element.
use set* methods. */ public Applet() { } /** Determines the base url for this applet. @param url base url for this applet. */ public Applet setCodeBase(String url) { addAttribute("codebase",url); return(this); } /** Comma seperated archive list. @param url Comma seperate archive list. */ public Applet setArchive(String url) { addAttribute("archive",url); return(this); } /** Applet class file. @param code Applet class file. */ public Applet setCode(String code) { addAttribute("code",code); return(this); } /** Suggested height of applet. @param height suggested link height. */ public Applet setHeight(String height) { addAttribute("height",height); return(this); } /** Suggested height of applet. @param height suggested link height. */ public Applet setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Suggested height of applet. @param height suggested link height. */ public Applet setHeight(double height) { addAttribute("height",Double.toString(height)); return(this); } /** Suggested width of applet. @param height suggested link width. */ public Applet setWidth(String width) { addAttribute("width",width); return(this); } /** Suggested width of applet. @param height suggested link width. */ public Applet setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Suggested width of object. @param height suggested link width. */ public Applet setWidth(double width) { addAttribute("width",Double.toString(width)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public Applet setHSpace(String hspace) { addAttribute("hspace",hspace); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public Applet setHSpace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public Applet setHSpace(double hspace) { addAttribute("hspace",Double.toString(hspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public Applet setVSpace(String vspace) { addAttribute("vspace",vspace); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public Applet setVSpace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public Applet setVSpace(double vspace) { addAttribute("vspace",Double.toString(vspace)); return(this); } /** Set the horizontal or vertical alignment of this applet.
Convience variables are in the AlignTypes interface. @param alignment Set the horizontal or vertical alignment of this applet.
Convience variables are in the AlignTypes interface. */ public Applet setAlign(String alignment) { addAttribute("align",alignment); return(this); } /** Set the name of this applet. @param name set the name of this applet. */ public Applet setName(String name) { addAttribute("name",name); return(this); } /** Serialized applet file. @param object Serialized applet file. */ // someone give me a better description of what this does. public Applet setObject(String object) { addAttribute("object",object); return(this); } /** Breif description, alternate text for the applet. @param alt alternat text. */ public Applet setAlt(String alt) { addAttribute("alt",alt); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Applet addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Applet addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public Applet addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public Applet addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Applet removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/package.html0000644000175000017500000000001707703353440022753 0ustar killerkiller jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H5.java0000644000175000017500000001767007703353440021626 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H5> tag. @version $Id: H5.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H5 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h5"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H5() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H5>value</H5> */ public H5(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H5>value</H5> */ public H5(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H5 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H5 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H5 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H5 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H5 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Base.java0000644000175000017500000001265207703353440022217 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BASE> tag. @version $Id: Base.java,v 1.3 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Base extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("base"); } /** Basic constructor. */ public Base() { } /** Basic constructor. @param href the URI that goes between double quotes */ public Base(String href) { setHref(href); } /** Basic constructor. @param href the URI that goes between double quotes @param target the target that goes between double quotes */ public Base(String href, String target) { setHref(target); setTarget(target); } /** Sets the HREF="" attribute @param href the URI that goes between double quotes */ public Base setHref(String href) { addAttribute("href",href); return this; } /** Sets the TARGET="" attribute @param target the URI that goes between double quotes */ public Base setTarget(String target) { addAttribute("target",target); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Base addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Base addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Base addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Base addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Base removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Comment.java0000644000175000017500000001436407703353440022751 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.io.ByteArrayOutputStream; import java.io.BufferedOutputStream; import java.util.Enumeration; import java.util.Vector; import org.apache.ecs.storage.Hash; /** This class defines a comment <-- VALUE --> Element. @version $Id: Comment.java,v 1.8 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Comment extends MultiPartElement implements Printable { /** private initializer. */ { setElementType("--"); setBeginStartModifier('!'); } /** Default constructor use set* methods. */ public Comment() { } /** Create a comment object containg this element. */ public Comment(String element) { addElement(element); } /** Create a comment object containg this element. */ public Comment(Element element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Comment addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Comment addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Comment addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Comment addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Comment removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } public String createStartTag() { setEndTagChar(' '); StringBuffer out = new StringBuffer(); out.append(getStartTagChar()); if(getBeginStartModifierDefined()) { out.append(getBeginStartModifier()); } out.append(getElementType()); if(getBeginEndModifierDefined()) { out.append(getBeginEndModifier()); } out.append(getEndTagChar()); setEndTagChar('>'); // put back the end tag character. return(out.toString()); } public String createEndTag() { StringBuffer out = new StringBuffer(); setStartTagChar(' '); setEndStartModifier(' '); out.append(getStartTagChar()); if(getEndStartModifierDefined()) { out.append(getEndStartModifier()); } out.append(getElementType()); if(getEndEndModifierDefined()) { out.append(getEndEndModifier()); } out.append(getEndTagChar()); setStartTagChar('<'); // put back the tag start character return(out.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Div.java0000644000175000017500000001767607703353440022102 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <DIV> tag. @version $Id: Div.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Div extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("div"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Div() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <div>value</div> */ public Div(String value) { addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <div>value</div> */ public Div(Span element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Div addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Div addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Div addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Div addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Div removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/OptGroup.java0000644000175000017500000002536307703353440023127 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <OptGroup> tag. @version $Id: OptGroup.java,v 1.4 2003/04/27 09:22:12 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class OptGroup extends MultiPartElement implements Printable, FocusEvents, FormEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("optgroup"); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public OptGroup() { } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute LABEL="" */ public OptGroup(String label) { setLabel(label); } /** Basic constructor. Use the set* methods to set the values of the attributes. @param label sets the attribute LABEL="" @param disabled sets the attribute DISABLED= */ public OptGroup(String label, boolean disabled) { setLabel(label); setDisabled(disabled); } /** Sets the LABEL="" attribute @param label the LABEL="" attribute */ public OptGroup setLabel(String label) { addAttribute("label",label); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public OptGroup setValue(String value) { addAttribute("value",value); return this; } /** Sets the disabled value @param disabled true or false */ public OptGroup setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public OptGroup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public OptGroup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public OptGroup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public OptGroup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public OptGroup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Big.java0000644000175000017500000001741107703353440022044 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BIG> tag. @version $Id: Big.java,v 1.4 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Big extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("big"); } /** Basic constructor. */ public Big() { } /** Basic constructor. @param element Adds an Element to the element. */ public Big(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Big(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Big addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Big addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Big addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Big addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Big removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Sup.java0000644000175000017500000001741107703353440022112 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Sup> tag. @version $Id: Sup.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Sup extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("sup"); } /** Basic constructor. */ public Sup() { } /** Basic constructor. @param element Adds an Element to the element. */ public Sup(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Sup(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Sup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Sup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Sup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Sup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Sup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/NoScript.java0000644000175000017500000001750507703353440023110 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <NoScript> tag. @version $Id: NoScript.java,v 1.4 2003/04/27 09:21:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class NoScript extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("noscript"); } /** Basic constructor. */ public NoScript() { } /** Basic constructor. @param element Adds an Element to the element. */ public NoScript(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public NoScript(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NoScript addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NoScript addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NoScript addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NoScript addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public NoScript removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/PRE.java0000644000175000017500000002250607703353440021772 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <PRE> tag. @version $Id: PRE.java,v 1.3 2003/04/27 09:22:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class PRE extends MultiPartElement implements MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("pre"); setPrettyPrint(false); } /** Basic constructor. You need to set the attributes using the set* methods. */ public PRE() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <PRE>value</PRE> */ public PRE(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <PRE>value</PRE> @param width set the value of WIDTH="" */ public PRE(String value, int width) { setWidth(width); addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <PRE>value</PRE> @param width set the value of WIDTH="" */ public PRE(Element element, int width) { setWidth(width); addElement(element); } /** Use the set* methods to set the values of the attributes. @param element set the value of <PRE>value</PRE> @param width set the value of WIDTH="" */ public PRE(Element element, String width) { setWidth(width); addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <PRE>value</PRE> */ public PRE(String value) { addElement(value); } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public PRE setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public PRE setWidth(String width) { addAttribute("width",width); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public PRE addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public PRE addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public PRE addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public PRE addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public PRE removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Var.java0000644000175000017500000001741107703353440022073 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Var> tag. @version $Id: Var.java,v 1.4 2003/04/27 09:22:58 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Var extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("var"); } /** Basic constructor. */ public Var() { } /** Basic constructor. @param element Adds an Element to the element. */ public Var(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Var(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Var addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Var addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Var addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Var addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Var removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Html.java0000644000175000017500000001173507703353440022252 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <HTML></HTML> tag. @version $Id: Html.java,v 1.3 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Html extends MultiPartElement implements Printable { public Html() { setElementType("html"); } /** This method creates a <HTML> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public Html(String value) { setElementType("html"); addElement(value); } /** This method creates a <HTML> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public Html(Element value) { setElementType("html"); addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Html addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Html addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Html addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Html addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Html removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Form.java0000644000175000017500000003071007703353440022243 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <FORM> tag. @version $Id: Form.java,v 1.5 2003/04/27 09:21:50 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Form extends MultiPartElement implements Printable, FormEvents, MouseEvents, KeyEvents { public static final String GET = "GET"; public static final String get = "get"; public static final String POST = "POST"; public static final String post = "post"; public static final String ENC_DEFAULT = "application/x-www-form-urlencoded"; public static final String ENC_UPLOAD = "multipart/form-data"; /** Private initialization routine. */ { setElementType("form"); setEncType ( ENC_DEFAULT ); setAcceptCharset("UNKNOWN"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Form() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <FORM>value</FORM> */ public Form(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param action set the value of ACTION="" */ public Form(String action) { setAction(action); } /** Use the set* methods to set the values of the attributes. @param element set the value of <FORM>value</FORM> @param action set the value of ACTION="" */ public Form(String action, Element element) { addElement(element); setAction(action); } /** Use the set* methods to set the values of the attributes. @param action set the value of ACTION="" @param method set the value of METHOD="" @param element set the value of <FORM>value</FORM> */ public Form(String action, String method, Element element) { addElement(element); setAction(action); setMethod(method); } /** Use the set* methods to set the values of the attributes. @param action set the value of ACTION="" @param method set the value of METHOD="" */ public Form(String action, String method) { setAction(action); setMethod(method); } /** Use the set* methods to set the values of the attributes. @param action set the value of ACTION="" @param method set the value of METHOD="" @param enctype set the value of ENCTYPE="" */ public Form(String action, String method, String enctype) { setAction(action); setMethod(method); setEncType(enctype); } /** Sets the ACTION="" attribute @param action the ACTION="" attribute */ public Form setAction(String action) { addAttribute("action",action); return this; } /** Sets the METHOD="" attribute @param method the METHOD="" attribute */ public Form setMethod(String method) { addAttribute("method",method); return this; } /** Sets the ENCTYPE="" attribute @param enctype the ENCTYPE="" attribute */ public Form setEncType(String enctype) { addAttribute("enctype",enctype); return this; } /** Sets the ACCEPT="" attribute @param accept the ACCEPT="" attribute */ public Form setAccept(String accept) { addAttribute("accept",accept); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public Form setName(String name) { addAttribute("name",name); return this; } /** Sets the TARGET="" attribute @param target the TARGET="" attribute */ public Form setTarget(String target) { addAttribute("target",target); return this; } /** Sets the ACCEPT-CHARSET="" attribute @param accept the ACCEPT-CHARSET="" attribute */ public Form setAcceptCharset(String acceptcharset) { addAttribute("accept-charset",acceptcharset); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Form addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Form addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Form addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Form addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Form removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Samp.java0000644000175000017500000001742507703353440022250 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Samp> tag. @version $Id: Samp.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Samp extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("samp"); } /** Basic constructor. */ public Samp() { } /** Basic constructor. @param element Adds an Element to the element. */ public Samp(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Samp(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Samp addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Samp addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Samp addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Samp addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Samp removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Del.java0000644000175000017500000001767207703353440022060 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <DEL> tag. @version $Id: Del.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Del extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("del"); } /** Default constructor use set* methods. */ public Del() { } /** Set the url that designates a source doument or message. @param url set the url that designates a source document or message. */ public Del setCite(String url) { addAttribute("Cite",url); return(this); } /** Sets the date and time the change was made. @param datetime the date and time the change was made. */ public Del setDateTime(String datetime) { addAttribute("datetime",datetime); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Del addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Del addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Del addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Del addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Del removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H4.java0000644000175000017500000001766207703353440021626 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H4> tag. @version $Id: H4.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H4 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h4"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H4() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H4>value</H4> */ public H4(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H4>value</H4> */ public H4(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H4 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H4 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H4 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H4 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H4 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Span.java0000644000175000017500000001734507703353441022253 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <SPAN> tag. @version $Id: Span.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Span extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("span"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Span() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <span>value</span> */ public Span(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Span addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Span addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Span addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Span addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Span removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/BR.java0000644000175000017500000001250107703353440021641 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BR> tag. @version $Id: BR.java,v 1.3 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class BR extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("br"); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public BR() { } /** Use the set* methods to set the values of the attributes. @param clear_type the CLEAR="" attribute */ public BR(String clear_type) { setClear(clear_type); } /** Use the set* methods to set the values of the attributes. @param clear_type the CLEAR="" attribute @param title the TITLE="" attribute */ public BR(String clear_type, String title) { setClear(clear_type); setTitle(title); } /** Sets the CLEAR="" attribute @param clear_type the CLEAR="" attribute */ public BR setClear(String clear_type) { addAttribute("clear",clear_type); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BR addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BR addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BR addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BR addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public BR removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/ObjectElement.java0000644000175000017500000003570307703353440024067 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates an ObjectElement @version $Id: ObjectElement.java,v 1.4 2003/04/27 09:22:12 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class ObjectElement extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("object"); } /** Default constructor. Creates the <object/> Element.
use set* methods. */ public ObjectElement() { } /** Sets the declare attribute. (declare this object but don't instantiate it. @param declare declare on or off */ public ObjectElement setDeclare(boolean declare) { if(declare) addAttribute("declare",NO_ATTRIBUTE_VALUE); else removeAttribute("declare"); return(this); } /** Identifies an implementation. @param url location of classid. */ public ObjectElement setClassId(String url) { addAttribute("classid",url); return(this); } /** Sets the Internet content type for the code. @param codetype Sets the Internet content type for the code. */ public ObjectElement setCodeType(String codetype) { addAttribute("codetype",codetype); return(this); } /** Determines the base path to resolve relative urls specified by classid. @param url base path to resolve relative urls specified by classid. */ public ObjectElement setCodeBase(String url) { addAttribute("codebase",url); return(this); } /** This attribute specifies the location of the data to be rendered. @param url this attribute specifies the location of the data to be rendered. */ public ObjectElement setData(String url) { addAttribute("data",url); return(this); } /** This attribute specifies the Internet Media Type for the data specified by data.
This should be a mime type. @param type a mime type for the data specifed by the data attribute. */ public ObjectElement setType(String type) { addAttribute("type",type); return(this); } /** Space seperated archive list. @param url Space seperate archive list. */ // Anyone know what the hell this is? the spec is rather vague in its definition. public ObjectElement setArchive(String url) { addAttribute("archive",url); return(this); } /** Message to show while the object is loading. @param cdata the message to show while the object is loading. */ public ObjectElement setStandBy(String cdata) { addAttribute("standby",cdata); return(this); } /** Suggested link border width. @param border suggested link border width. */ public ObjectElement setBorder(String border) { addAttribute("border",border); return(this); } /** Suggested link border width. @param border suggested link border width. */ public ObjectElement setBorder(int border) { addAttribute("border",Integer.toString(border)); return(this); } /** Suggested link border width. @param border suggested link border width. */ public ObjectElement setBorder(double border) { addAttribute("border",Double.toString(border)); return(this); } /** Suggested height of object. @param height suggested link height. */ public ObjectElement setHeight(String height) { addAttribute("height",height); return(this); } /** Suggested height of object. @param height suggested link height. */ public ObjectElement setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Suggested height of object. @param height suggested link height. */ public ObjectElement setHeight(double height) { addAttribute("height",Double.toString(height)); return(this); } /** Suggested width of object. @param height suggested link width. */ public ObjectElement setWidth(String width) { addAttribute("width",width); return(this); } /** Suggested width of object. @param height suggested link width. */ public ObjectElement setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Suggested width of object. @param height suggested link width. */ public ObjectElement setWidth(double width) { addAttribute("width",Double.toString(width)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public ObjectElement setHSpace(String hspace) { addAttribute("hspace",hspace); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public ObjectElement setHSpace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return(this); } /** Suggested horizontal gutter. @param hspace suggested horizontal gutter. */ public ObjectElement setHSpace(double hspace) { addAttribute("hspace",Double.toString(hspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public ObjectElement setVSpace(String vspace) { addAttribute("vspace",vspace); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public ObjectElement setVSpace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return(this); } /** Suggested vertical gutter. @param hspace suggested vertical gutter. */ public ObjectElement setVSpace(double vspace) { addAttribute("vspace",Double.toString(vspace)); return(this); } /** Set the horizontal or vertical alignment of this object.
Convience variables are in the AlignTypes interface. @param alignment Set the horizontal or vertical alignment of this object.
Convience variables are in the AlignTypes interface. */ public ObjectElement setAlign(String alignment) { addAttribute("align",alignment); return(this); } /** Location of image map to use. @param url location of image map to use. */ public ObjectElement setUseMap(String url) { addAttribute("usemap",url); return(this); } /** Object has shaped hypertext links. @param shape does the object have shaped hypertext links? */ public ObjectElement setShapes(boolean shape) { if(shape) addAttribute("shapes",NO_ATTRIBUTE_VALUE); else removeAttribute("shapes"); return(this); } /** Set the name of this object. @param name set the name of this object. */ public ObjectElement setName(String name) { addAttribute("name",name); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public ObjectElement setTabIndex(int number) { addAttribute("tabindex",Integer.toString(number)); return(this); } /** Set the elements position in the tabbing order. @param number set the elements position in the tabbing order. */ public ObjectElement setTabIndex(String number) { addAttribute("tabindex",number); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ObjectElement addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ObjectElement addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public ObjectElement addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public ObjectElement addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ObjectElement removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Blink.java0000644000175000017500000001161007703353440022375 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BLINK> tag. @version $Id: Blink.java,v 1.3 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Blink extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("blink"); } /** Basic constructor. */ public Blink() { } /** Basic constructor. @param element Adds an Element to the element. */ public Blink(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Blink(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Blink addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Blink addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Blink addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Blink addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Blink removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Link.java0000644000175000017500000002150607703353440022240 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Link> tag. @version $Id: Link.java,v 1.5 2003/04/27 09:22:43 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Link extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("link"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Link() { } public Link setHref(String href) { addAttribute("href",href); return this; } /** Sets the TARGET="" attribute @param target the TARGET="" attribute */ public Link setTarget(String target) { addAttribute("target",target); return this; } /** Sets the REL="" attribute @param rel the REL="" attribute */ public Link setRel(String rel) { addAttribute("rel",rel); return this; } /** Sets the REV="" attribute @param rev the REV="" attribute */ public Link setRev(String rev) { addAttribute("rev",rev); return this; } /** Sets the charset="" attribute @param charset the charset="" attribute */ public Link setCharset(String charset) { addAttribute("charset",charset); return this; } /** Sets the TYPE="" attribute @param type set the mime type of this link */ public Link setType(String type) { addAttribute("type",type); return this; } /** Sets the media="" attribute @param media the media="" attribute */ public Link setMedia(String media) { addAttribute("media",media); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Link addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Link addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Link addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Link addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Link removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Meta.java0000644000175000017500000001303107703353440022223 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <META> tag. @version $Id: Meta.java,v 1.3 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Meta extends SinglePartElement implements Printable { /** Private initialization routine. */ { setElementType("meta"); } /** This method creates a <META> tag. */ public Meta() { } /** Sets the CONTENT="" attribute. @param content the value that should go into the CONTENT attribute */ public Meta setContent(String content) { addAttribute("content",content); return this; } /** Sets the NAME="" attribute. @param content the value that should go into the NAME attribute */ public Meta setName(String name) { addAttribute("name",name); return this; } /** Sets the SCHEME="" attribute. @param content the value that should go into the SCHEME attribute */ public Meta setScheme(String scheme) { addAttribute("scheme",scheme); return this; } /** Sets the HTTP-EQUIV="" attribute. @param content the value that should go into the HTTP-EQUIV attribute */ public Meta setHttpEquiv(String http_equiv) { addAttribute("http-equiv",http_equiv); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Meta addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Meta addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Meta addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Meta addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Meta removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Select.java0000644000175000017500000004344107703353441022565 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; import java.util.Enumeration; /**

This class creates a <SELECT> tag.

Please note that the {@link Option} element now defaults to add a closing tag (as is now required by the specification).

@version $Id: Select.java,v 1.7 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Select extends MultiPartElement implements Printable, PageEvents, FormEvents, MouseEvents, KeyEvents, FocusEvents { /** Private initializer */ { setElementType("select"); } /** Basic constructor. Use the set* methods to set attributes. */ public Select() { } /** Constructor sets the name attribute. Use the set* methods to set the other attributes. @param name set the NAME="" attribute */ public Select(String name) { setName(name); } /** Constructor sets the name and size attribute. Use the set* methods to set the other attributes. @param name set the NAME="" attribute @param name set the SIZE="" attribute */ public Select(String name, String size) { setName(name); setSize(size); } /** Constructor sets the name and size attribute. Use the set* methods to set the other attributes. @param name set the NAME="" attribute @param name set the SIZE="" attribute */ public Select(String name, int size) { setName(name); setSize(size); } /** Constructor sets the name attribute and adds all the elements in the array. Use the set* methods to set the other attributes. @param name set the NAME="" attribute @param element provide a group of strings to be converted to options elements. */ public Select(String name, String[] element) { setName(name); addElement(element); } /** Constructor sets the name attribute and adds all the option elements in the array. Use the set* methods to set the other attributes. @param name set the NAME="" attribute @param element provide a group of strings to be converted to options elements. */ public Select(String name, Option[] element) { setName(name); addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Select addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Select addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Select addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds a group of elements to the select element. @param element adds a group of elements to the select element. */ public Select addElement(Option[] element) { for(int x = 0 ; x < element.length; x++) { addElementToRegistry(element[x]); } return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Select addElement(String element) { addElementToRegistry(element); return(this); } /** Creates a group of option elements and adds them to this select. @param element adds a group of option elements to this select. */ public Select addElement(String[] element) { Option[] option = new Option().addElement(element); addElement(option); return(this); } public Select selectOption(int option) { Enumeration enum = keys(); for(int x = 0; enum.hasMoreElements(); x++) { ConcreteElement element = (ConcreteElement)getElement((String)enum.nextElement()); if(x == option) { ((Option)element).setSelected(true); break; } } return this; } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(value)).

@param value creates an option with value attribute set. */ public Select appendOption(String value) { return addElement(new org.apache.ecs.html.Option(value)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. */ public Select appendOption(String label,String value) { return addElement(new org.apache.ecs.html.Option(label,value)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. */ public Select appendOption(String label,int value) { return addElement(new org.apache.ecs.html.Option(label,value)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. */ public Select appendOption(String label,double value) { return addElement(new org.apache.ecs.html.Option(label,value)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value,text)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. @param text added to the option as a text element. */ public Select appendOption(String label,String value,String text) { return addElement(new org.apache.ecs.html.Option(label,value,text)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value,text)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. @param text added to the option as a text element. */ public Select appendOption(String label,int value,String text) { return addElement(new org.apache.ecs.html.Option(label,value,text)); } /**

Creates and appends an option element.

Same as addElement(new org.apache.ecs.html.Option(label,value,text)).

@param label creates an option with label attribute set. @param value creates an option with value attribute set. @param text added to the option as a text element. */ public Select appendOption(String label,double value,String text) { return addElement(new org.apache.ecs.html.Option(label,value,text)); } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public Select setName(String name) { addAttribute("name",name); return this; } /** Sets the SIZE="" attribute @param size the SIZE="" attribute */ public Select setSize(String size) { addAttribute("size",size); return this; } /** Sets the SIZE="" attribute @param size the SIZE="" attribute */ public Select setSize(int size) { setSize(Integer.toString(size)); return this; } /** Sets the multiple value @param multiple true or false */ public Select setMultiple(boolean multiple) { if ( multiple == true ) addAttribute("multiple", NO_ATTRIBUTE_VALUE); else removeAttribute("multiple"); return(this); } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Select setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Select setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the disabled value @param disabled true or false */ public Select setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Select removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Address.java0000644000175000017500000002000007703353440022714 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <ADDRESS> tag. @version $Id: Address.java,v 1.4 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Address extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("address"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Address() { } /** Use the set* methods to set the values of the attributes. @param value set the value of <ADDRESS>value</ADDRESS> */ public Address(String value) { addElement(value); } /** Use the set* methods to set the values of the attributes. @param element set the value of <ADDRESS>value</ADDRESS> */ public Address(Span element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Address addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Address addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Address addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Address addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Address removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Map.java0000644000175000017500000002226507703353440022063 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <MAP> tag. @version $Id: Map.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Map extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("map"); } /** Basic constructor. */ public Map() { } /** Basic constructor. @param element Adds an Element to the element. */ public Map(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Map(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name sets the NAME="" attribute */ public Map(Element element, String name) { addElement(element); setName ( name ); } /** Basic constructor. @param element Adds an Element to the element. @param name sets the NAME="" attribute */ public Map(String element, String name) { addElement(element); setName ( name ); } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public Map setName(String name) { addAttribute("name",name); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Map addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Map addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Map addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Map addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Map removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Bdo.java0000644000175000017500000001140407703353440022043 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BODY></BODY> tag. @version $Id: Bdo.java,v 1.3 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Bdo extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("bdo"); } /** Basic Constructor use set* methods. */ public Bdo() { } /** Basic Constructor sets the direction for the element. @param dir the direction the element should flow LTR|RTL */ public Bdo(String dir) { setDir(dir); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Bdo addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Bdo addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Bdo addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Bdo addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Bdo removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/IMG.java0000644000175000017500000002715407703353440021764 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates an <IMG> tag. @version $Id: IMG.java,v 1.4 2003/04/27 09:20:29 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class IMG extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("img"); } /** Basic constructor. Use the set* methods to set the attibutes. */ public IMG() { } /** Creates an IMG tag @param src the SRC="" attribute */ public IMG(String src) { setSrc(src); } /** Creates an IMG tag @param src the SRC="" attribute @param border the BORDER="" attribute */ public IMG(String src, int border) { setSrc(src); setBorder(border); } /** Creates an IMG tag @param src the SRC="" attribute @param name the NAME="" attribute */ public IMG(String src, String name) { setSrc(src); setName(name); } /** Creates an IMG tag @param src the SRC="" attribute @param name the NAME="" attribute @param border the BORDER="" attribute */ public IMG(String src, String name, int border) { setSrc(src); setName(name); setBorder(border); } /** Sets the SRC="" attribute @param src the SRC="" attribute */ public IMG setSrc(String src) { addAttribute("src",src); return this; } /** Sets the BORDER="" attribute @param border the BORDER="" attribute */ public IMG setBorder(int border) { addAttribute("border",Integer.toString(border)); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public IMG setName(String name) { addAttribute("name",name); return this; } /** Sets the HEIGHT="" attribute @param height the HEIGHT="" attribute */ public IMG setHeight(String height) { addAttribute("height",height); return this; } /** Sets the HEIGHT="" attribute @param height the HEIGHT="" attribute */ public IMG setHeight(int height) { addAttribute("height",Integer.toString(height)); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public IMG setWidth(String width) { addAttribute("width",width); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public IMG setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the ALT="" attribute @param alt the ALT="" attribute */ public IMG setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the ISMAP attribute @param ismap the ISMAP attribute */ public IMG setIsMap(boolean ismap) { if(ismap == true) addAttribute("ismap",NO_ATTRIBUTE_VALUE); else removeAttribute("ismap"); return this; } /** Sets the USMAP="" attribute @param usemap the USMAP="" attribute */ public IMG setUseMap(String usemap) { addAttribute("usemap",usemap); return this; } /** Sets the ALIGN="" attribute @param align the ALIGN="" attribute */ public IMG setAlign(String align) { addAttribute("align",align); return this; } /** Sets the HSPACE="" attribute @param hspace the HSPACE="" attribute */ public IMG setHspace(String hspace) { addAttribute("hspace",hspace); return this; } /** Sets the HSPACE="" attribute @param hspace the HSPACE="" attribute */ public IMG setHspace(int hspace) { addAttribute("hspace",Integer.toString(hspace)); return this; } /** Sets the VSPACE="" attribute @param vspace the VSPACE="" attribute */ public IMG setVspace(String vspace) { addAttribute("vspace",vspace); return this; } /** Sets the VSPACE="" attribute @param vspace the VSPACE="" attribute */ public IMG setVspace(int vspace) { addAttribute("vspace",Integer.toString(vspace)); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public IMG addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public IMG addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public IMG addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public IMG addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public IMG removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Sub.java0000644000175000017500000001741107703353440022074 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Sub> tag. @version $Id: Sub.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Sub extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("sub"); } /** Basic constructor. */ public Sub() { } /** Basic constructor. @param element Adds an Element to the element. */ public Sub(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Sub(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Sub addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Sub addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Sub addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Sub addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Sub removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/LI.java0000644000175000017500000002054307703353440021647 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <LI> tag.

The LI tag defaults to not having a closing </LI> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: LI.java,v 1.4 2003/04/27 09:22:43 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class LI extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("li"); setNeedClosingTag(false); } /** Basic constructor. Use setValue() if needed. */ public LI() { } /** Sets the value after the <LI> tag @param value the value after the <LI> tag */ public LI(String value) { addElement(value); } /** Sets the value after the <LI> tag @param element the value after the <LI> tag */ public LI(Element element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public LI addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public LI addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Mechanism for taking a list of Strings and creating a list of LI objects. @param element[] list of Strings that need to be LI objects */ public LI[] addElement(String[] element) { LI[] li = new LI[element.length]; for(int x = 0; x < element.length; x++) { li[x] = new LI(element[x]); } return(li); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public LI addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public LI addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public LI removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Center.java0000644000175000017500000001745407703353440022572 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <CENTER> tag. @version $Id: Center.java,v 1.4 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Center extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("center"); } /** Basic constructor. */ public Center() { } /** Basic constructor. @param element Adds an Element to the element. */ public Center(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Center(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Center addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Center addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Center addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Center addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Center removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TextArea.java0000644000175000017500000003312407703353440023057 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TEXTAREA></TEXTAREA> tag. @version $Id: TextArea.java,v 1.7 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TextArea extends MultiPartElement implements PageEvents, FormEvents, MouseEvents, KeyEvents, FocusEvents { public final static String off = "off"; public final static String physical = "physical"; public final static String virtual = "virtual"; public final static String OFF = "OFF"; public final static String PHYSICAL = "PHYSICAL"; public final static String VIRTUAL = "VIRTUAL"; /** Private initializer. */ { setElementType("textarea"); } /** Basic Constructor use set* methods. */ public TextArea() { } /** Basic Constructor use set* methods. @param rows the ROWS="" attribute @param cols the COLS="" attribute */ public TextArea(int rows, int cols) { setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param rows the ROWS="" attribute @param cols the COLS="" attribute */ public TextArea(String rows, String cols) { setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param name the NAME="" attribute @param rows the ROWS="" attribute @param cols the COLS="" attribute */ public TextArea(String name, int rows, int cols) { setName(name); setRows(rows); setCols(cols); } /** Basic Constructor use set* methods. @param name the NAME="" attribute @param rows the ROWS="" attribute @param cols the COLS="" attribute */ public TextArea(String name, String rows, String cols) { setName(name); setRows(rows); setCols(cols); } /** Sets the ROWS="" attribute @param rows Sets the ROWS="" attribute */ public TextArea setRows(int rows) { setRows(Integer.toString(rows)); return(this); } /** Sets the ROWS="" attribute @param rows Sets the ROWS="" attribute */ public TextArea setRows(String rows) { addAttribute("rows",rows); return(this); } /** Sets the WRAP="" attribute @param wrap Sets the WRAP="" attribute */ public TextArea setWrap(String wrap) { addAttribute("wrap",wrap); return(this); } /** Sets the COLS="" attribute @param cols Sets the COLS="" attribute */ public TextArea setCols(int cols) { setCols(Integer.toString(cols)); return(this); } /** Sets the COLS="" attribute @param cols Sets the COLS="" attribute */ public TextArea setCols(String cols) { addAttribute("cols",cols); return(this); } /** Sets the NAME="" attribute @param name Sets the NAME="" attribute */ public TextArea setName(String name) { addAttribute("name",name); return(this); } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public TextArea setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public TextArea setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the readonly value @param readonly true or false */ public TextArea setReadOnly(boolean readonly) { if ( readonly == true ) addAttribute("readonly", NO_ATTRIBUTE_VALUE); else removeAttribute("readonly"); return(this); } /** Sets the disabled value @param disabled true or false */ public TextArea setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TextArea addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TextArea addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TextArea addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TextArea addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TextArea removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } /** The onFocus event occurs when a element is focussed. This attribute may be used with most elements. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onBlur event occurs when a element is blurred. This attribute may be used with most elements. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Table.java0000644000175000017500000002730407703353440022374 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TABLE> object. @version $Id: Table.java,v 1.6 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Table extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private iniitialization routine */ { setElementType("table"); } public Table() { } /** Allows one to set the border size. @param border sets the BORDER="" attribute. */ public Table(int border) { setBorder(border); } /** Allows one to set the border size. @param border sets the BORDER="" attribute. */ public Table(String border) { setBorder(border); } /** Set the SUMMARY="" attribue. @param summary sets the SUMMARY="" attribute. */ public Table setSummary(String summary) { addAttribute("summary",summary); return(this); } /** Sets the ALIGN="" attribute. @param align sets the ALIGN="" attribute. You can use the AlignType.* variables for convience. */ public Table setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the WIDTH="" attribute. @param width sets the WIDTH="" attribute. */ public Table setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the HEIGHT="" attribute. @param width sets the HEIGHT="" attribute. */ public Table setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the WIDTH="" attribute. @param width sets the WIDTH="" attribute. */ public Table setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Sets the HEIGHT="" attribute. @param width sets the HEIGHT="" attribute. */ public Table setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Sets the COLS="" attribute. @param width sets the COLS="" attribute. */ public Table setCols(int cols) { addAttribute("cols",Integer.toString(cols)); return(this); } /** Sets the COLS="" attribute. @param width sets the COLS="" attribute. */ public Table setCols(String cols) { addAttribute("cols",cols); return(this); } /** Sets the CELLPADING="" attribute. @param cellpadding sets the CELLPADING="" attribute. */ public Table setCellPadding(int cellpadding) { addAttribute("cellpadding",Integer.toString(cellpadding)); return(this); } /** Sets the CELLSPACING="" attribute. @param spacing sets the CELLSPACING="" attribute. */ public Table setCellSpacing(int cellspacing) { addAttribute("cellspacing",Integer.toString(cellspacing)); return(this); } /** Sets the CELLPADING="" attribute. @param cellpadding sets the CELLPADING="" attribute. */ public Table setCellPadding(String cellpadding) { addAttribute("cellpadding",cellpadding); return(this); } /** Sets the CELLSPACING="" attribute. @param spacing sets the CELLSPACING="" attribute. */ public Table setCellSpacing(String cellspacing) { addAttribute("cellspacing",cellspacing); return(this); } /** Sets the BORDER="" attribute. @param border sets the BORDER="" attribute. */ public Table setBorder(int border) { addAttribute("border",Integer.toString(border)); return(this); } /** Sets the BORDER="" attribute. @param border sets the BORDER="" attribute. */ public Table setBorder(String border) { addAttribute("border",border); return(this); } /** Sets the FRAME="" attribute. @param frame sets the FRAME="" attribute. */ public Table setFrame(String frame) { addAttribute("frame",frame); return(this); } /** Sets the RULES="" attribute. @param rules sets the RULES="" attribute. */ public Table setRules(String rules) { addAttribute("rules",rules); return(this); } /** Sets the BGCOLOR="" attribute @param color the BGCOLOR="" attribute */ public Table setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Table addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Table addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Table addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Table addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Table removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/A.java0000644000175000017500000003305607703353440021526 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <A> tag.

Please refer to the TestBed.java file for example code usage. @version $Id: A.java,v 1.6 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class A extends MultiPartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("a"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public A() { } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes */ public A(String href) { setHref(href); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param value what goes between <start_tag> <end_tag> */ public A(String href, String value) { setHref(href); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param value what goes between <start_tag> <end_tag> */ public A(String href, Element value) { setHref(href); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param value what goes between <start_tag> <end_tag> */ public A(String href, String name, String value) { setHref(href); setName(name); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param value what goes between <start_tag> <end_tag> */ public A(String href, String name, Element value) { setHref(href); setName(name); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param target the TARGET="" attribute @param value the value that goes between <start_tag> <end_tag> */ public A(String href, String name, String target, Element value) { setHref(href); setName(name); setTarget(target); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param target the TARGET="" attribute @param value the value that goes between <start_tag> <end_tag> */ public A(String href, String name, String target, String value) { setHref(href); setName(name); setTarget(target); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param target the TARGET="" attribute @param lang the LANG="" attribute @param value the value that goes between <start_tag> <end_tag> */ public A(String href, String name, String target, String lang, String value) { setHref(href); setName(name); setTarget(target); setLang(lang); addElement(value); } /** This constructor creates a <A> tag. @param href the URI that goes between double quotes @param name the NAME="" attribute @param target the TARGET="" attribute @param lang the LANG="" attribute @param value the value that goes between <start_tag> <end_tag> */ public A(String href, String name, String target, String lang, Element value) { setHref(href); setName(name); setTarget(target); setLang(lang); addElement(value); } /** Sets the FOLDER="" attribute @param folder the FOLDER="" attribute */ public A setFolder(String folder) { addAttribute("folder",folder); return this; } /** Sets the HREF="" attribute @param href the HREF="" attribute */ public A setHref(String href) { addAttribute("href",href); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public A setName(String name) { addAttribute("name",name); return this; } /** Sets the TARGET="" attribute @param target the TARGET="" attribute */ public A setTarget(String target) { addAttribute("target",target); return this; } /** Sets the REL="" attribute @param rel the REL="" attribute */ public A setRel(String rel) { addAttribute("rel",rel); return this; } /** Sets the REV="" attribute @param rev the REV="" attribute */ public A setRev(String rev) { addAttribute("rev",rev); return this; } /** Adds an Element to the element. @param element Adds an Element to the element. */ public A addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public A addElement(String element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public A addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public A addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public A removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } /** Determine if this element needs a line break, if pretty printing. */ public boolean getNeedLineBreak() { java.util.Enumeration enum = elements(); int i=0; int j=0; while(enum.hasMoreElements()) { j++; Object obj = enum.nextElement(); if( obj instanceof IMG ) i++; } if ( i==j) return false; return true; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Cite.java0000644000175000017500000001742207703353440022231 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <EM> tag. @version $Id: Cite.java,v 1.4 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Cite extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("cite"); } /** Basic constructor. */ public Cite() { } /** Basic constructor. @param element Adds an Element to the element. */ public Cite(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Cite(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Cite addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Cite addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Cite addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Cite addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Cite removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/DD.java0000644000175000017500000001751107703353441021634 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <DD> tag.

The DD tag defaults to not having a closing </DD> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: DD.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class DD extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dd"); setNeedClosingTag(false); } /** Basic constructor. Use setValue() if needed. */ public DD() { } /** Sets the value after the <DD> tag @param value the value after the <DD> tag */ public DD(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DD addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DD addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DD addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DD addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public DD removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Small.java0000644000175000017500000001744107703353440022416 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Small> tag. @version $Id: Small.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Small extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("small"); } /** Basic constructor. */ public Small() { } /** Basic constructor. @param element Adds an Element to the element. */ public Small(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Small(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Small addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Small addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Small addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Small addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Small removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/P.java0000644000175000017500000002055307703353440021543 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <P> tag.

The P tag defaults to not having a closing </P> because it is optional in the spec. This can be overridden by setNeedClosingTag(true) @version $Id: P.java,v 1.4 2003/04/27 09:22:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class P extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("p"); setNeedClosingTag(false); } /** Basic constructor. You need to set the attributes using the set* methods. */ public P() { } /** Use the set* methods to set the values of the attributes. @param align set the value of ALIGN="" */ public P(String align) { setAlign(align); } /** Use the set* methods to set the values of the attributes. @param align set the value of ALIGN="" @param value set the text after the <P> tag */ public P(String value, String align) { setAlign(align); addElement(value); } /** Sets the ALIGN="" attribute @param align the ALIGN="" attribute */ public P setAlign(String align) { addAttribute("align",align); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public P addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public P addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public P addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public P addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public P removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/NoFrames.java0000644000175000017500000001750507703353440023061 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <NoFrames> tag. @version $Id: NoFrames.java,v 1.4 2003/04/27 09:21:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class NoFrames extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("noframes"); } /** Basic constructor. */ public NoFrames() { } /** Basic constructor. @param element Adds an Element to the element. */ public NoFrames(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public NoFrames(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NoFrames addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NoFrames addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NoFrames addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NoFrames addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public NoFrames removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/OL.java0000644000175000017500000002054707703353440021661 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <OL> tag. @version $Id: OL.java,v 1.4 2003/04/27 09:22:12 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class OL extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("ol"); } /** Basic constructor, use set* methods. */ public OL() { } /** Basic constructor, use set* methods. @param list an array of LI objects to be added to the ol element. */ public OL(LI[] list) { addElement(list); } /** Basic constructor, use set* methods. @param list an array of strings to be made into li objects and
added to the ol element. */ public OL(String[] list) { addElement(list); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public OL addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public OL addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add a list to the UL @param list[] a list of LI objects. */ public OL addElement(LI[] list) { for(int x = 0; x < list.length; x++) { addElement(list[x]); } return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public OL addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public OL addElement(String element) { addElementToRegistry(element); return(this); } /** Add a list to the OL @param list a list of Strings to be converted to li objects. */ public OL addElement(String[] element) { LI[] li = new LI().addElement(element); addElement(li); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public OL removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Strong.java0000644000175000017500000001752407703353440022624 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <STRONG> tag. @version $Id: Strong.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Strong extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer */ { setElementType("strong"); } /** Basic constructor. Use the set* methods. */ public Strong() { } /** Basic Constructor. Creats a Strong object with its contents set. @param element set the content of the strong element */ public Strong(String element) { addElement(element); } /** Basic Constructor. Creats a Strong object with its contents set. @param element set the content of the strong element */ public Strong(Element element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Strong addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Strong addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Strong addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Strong addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Strong removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Legend.java0000644000175000017500000002113207703353440022534 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Legend> tag. @version $Id: Legend.java,v 1.4 2003/04/27 09:22:43 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Legend extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("legend"); } /** Basic constructor. Use set* methods. */ public Legend() { } /** Basic Constructor use set* methods. @param element sets the value */ public Legend(String value) { addElement(value); } /** Basic Constructor use set* methods. @param element sets the value */ public Legend(Element value) { addElement(value); } /** Basic Constructor use set* methods. @param element sets the value @param accesskey sets the ACCESSKEY="" attribute. */ public Legend(String value, String accesskey) { addElement(value); setAccessKey(accesskey); } /** Basic Constructor use set* methods. @param element sets the value @param accesskey sets the ACCESSKEY="" attribute. */ public Legend(Element value, String accesskey) { addElement(value); setAccessKey(accesskey); } /** Sets the ACCESSKEY="" attribute. @param accesskey sets the ACCESSKEY="" attribute. */ public Legend setAccessKey(String accesskey) { addAttribute("accesskey",accesskey); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Legend addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Legend addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Legend addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Legend addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Legend removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H3.java0000644000175000017500000001766107703353441021625 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H3> tag. @version $Id: H3.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H3 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h3"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H3() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H3>value</H3> */ public H3(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H3>value</H3> */ public H3(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H3 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H3 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H3 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H3 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H3 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TR.java0000644000175000017500000002301307703353440021663 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TR> object. @version $Id: TR.java,v 1.5 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TR extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("tr"); } /** Basic Constructor use set* methods. */ public TR() { } /** Basic Constructor use set* methods. */ public TR(Element element) { addElement(element); } /** Basic Constructor use set* methods. */ public TR(String element) { addElement(element); } /** Basic Constructor use set* methods. @param close. Print the closing tag or not. */ public TR(boolean close) { setNeedClosingTag(close); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TR setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TR setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public TR setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TR setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TR setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the BGCOLOR="" attribute @param color sets the background color of the cell. */ public TR setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TR addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TR addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TR addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TR addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TR removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Caption.java0000644000175000017500000001731607703353440022744 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Caption> tag. @version $Id: Caption.java,v 1.4 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Caption extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("caption"); } /** Basic construtor use set* methods. */ public Caption() { } /** Set the ALIGN="" attribute. @param align set the ALIGN="" attribute */ public Caption setAlign(String align) { addAttribute("align",align); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Caption addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Caption addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public Caption addElement(String element) { addElementToRegistry(Integer.toString(element.hashCode()),element); return(this); } /** Add an element to the element @param element an element to add */ public Caption addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Caption removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H6.java0000644000175000017500000001766607703353440021634 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H6> tag. @version $Id: H6.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H6 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h6"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H6() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H6>value</H6> */ public H6(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H6>value</H6> */ public H6(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H6 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H6 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H6 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H6 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H6 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Kbd.java0000644000175000017500000001741107703353440022043 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Kbd> tag. @version $Id: Kbd.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Kbd extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("kbd"); } /** Basic constructor. */ public Kbd() { } /** Basic constructor. @param element Adds an Element to the element. */ public Kbd(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Kbd(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Kbd addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Kbd addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Kbd addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Kbd addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Kbd removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Head.java0000644000175000017500000001246707703353440022212 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <HEAD></HEAD> tag. @version $Id: Head.java,v 1.3 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Head extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("head"); } /** Basic constructor. Use the set* methods to set the attibutes. */ public Head() { } /** This method creates a <HEAD> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public Head(String value) { addElement(value); } /** This method creates a <HEAD> tag and sets it value @param value the value that goes between <start_tag> <end_tag> */ public Head(Element value) { addElement(value); } /** Sets the PROFILE="" attribue @param profile the url to one or more meta data profiles seperated by whitespace */ public Head setProfile(String profile) { addAttribute("profile",profile); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Head addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Head addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Head addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Head addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Head removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/IFrame.java0000644000175000017500000002324207703353440022505 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <IFrame> tag. @version $Id: IFrame.java,v 1.3 2003/04/27 09:20:29 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class IFrame extends MultiPartElement implements Printable { public final static String YES = "YES"; public final static String NO = "NO"; public final static String AUTO = "AUTO"; public final static String yes = "yes"; public final static String no = "no"; public final static String auto = "auto"; /** Private initialization routine. */ { setElementType("iframe"); } /** Basic constructor. */ public IFrame() { } /** Basic constructor. @param element Adds an Element to the element. */ public IFrame(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public IFrame(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute */ public IFrame(Element element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute */ public IFrame(String element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute @param src the SRC="" attribute */ public IFrame(Element element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute @param src the SRC="" attribute */ public IFrame(String element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Sets the LONGDESC="" attribute @param longdesc the LONGDESC="" attribute */ public IFrame setLongDesc(String longdesc) { addAttribute("longdesc",longdesc); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public IFrame setName(String name) { addAttribute("name",name); return this; } /** Sets the SRC="" attribute @param src the SRC="" attribute */ public IFrame setSrc(String src) { addAttribute("src",src); return this; } /** Sets the FRAMEBORDER="" attribute @param frameborder the FRAMEBORDER="" attribute */ public IFrame setFrameBorder(boolean frameborder) { if (frameborder) addAttribute("frameborder",Integer.toString(1)); else addAttribute("frameborder",Integer.toString(0)); return this; } /** Sets the MARGINWIDTH="" attribute @param marginwidth the MARGINWIDTH="" attribute */ public IFrame setMarginWidth(int marginwidth) { setMarginWidth(Integer.toString(marginwidth)); return this; } /** Sets the MARGINWIDTH="" attribute @param marginwidth the MARGINWIDTH="" attribute */ public IFrame setMarginWidth(String marginwidth) { addAttribute("marginwidth",marginwidth); return this; } /** Sets the HEIGHT="" attribute @param height the HEIGHT="" attribute */ public IFrame setHeight(String height) { addAttribute("height",height); return this; } /** Sets the HEIGHT="" attribute @param height the HEIGHT="" attribute */ public IFrame setHeight(int height) { addAttribute("height",Integer.toString(height)); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public IFrame setWidth(String width) { addAttribute("width",width); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public IFrame setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the MARGINHEIGHT="" attribute @param marginheight the MARGINHEIGHT="" attribute */ public IFrame setMarginHeight(int marginheight) { setMarginHeight(Integer.toString(marginheight)); return this; } /** Sets the MARGINHEIGHT="" attribute @param marginheight the MARGINHEIGHT="" attribute */ public IFrame setMarginHeight(String marginheight) { addAttribute("marginheight",marginheight); return this; } /** Sets the SCROLLING="" attribute @param scrolling the SCROLLING="" attribute */ public IFrame setScrolling(String scrolling) { addAttribute("scrolling",scrolling); return this; } /** Sets the ALIGN="" attribute. @param align sets the ALIGN="" attribute. You can use the AlignType.* variables for convience. */ public IFrame setAlign(String align) { addAttribute("align",align); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public IFrame addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public IFrame addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public IFrame addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public IFrame addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public IFrame removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Ins.java0000644000175000017500000001767307703353440022106 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <INS> tag. @version $Id: Ins.java,v 1.4 2003/04/27 09:20:29 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Ins extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initializer. */ { setElementType("ins"); } /** Default constructor use set* methods. */ public Ins() { } /** Set the url that designates a source doument or message. @param url set the url that designates a source document or message. */ public Ins setCite(String url) { addAttribute("Cite",url); return(this); } /** Sets the date and time the change was made. @param datetime the date and time the change was made. */ public Ins setDateTime(String datetime) { addAttribute("datetime",datetime); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Ins addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Ins addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Ins addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Ins addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Ins removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Param.java0000644000175000017500000001350007703353440022376 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates an Param Element @version $Id: Param.java,v 1.3 2003/04/27 09:22:49 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Param extends SinglePartElement implements Printable { // Convience variables. public final static String REF = "ref"; public final static String DATA = "data"; public final static String OBJECT = "object"; public final static String ref = "ref"; public final static String data = "data"; public final static String object = "object"; /** private initializer. */ { setElementType("param"); } /** Default constructor. use set* methods. */ public Param() { } /** Sets the name of this parameter. @param name sets the name of this parameter. */ public Param setName(String name) { addAttribute("name",name); return(this); } /** Sets the value of this attribute. @param value sets the value attribute. */ public Param setValue(String value) { addAttribute("value",value); return(this); } /** Sets the valuetype of this parameter. @param valuetype sets the name of this parameter.
REF|DATA|OBJECT convience varaibles provided as Param.REF,Param.DATA,Param.OBJECT */ public Param setValueType(String valuetype) { addAttribute("value",valuetype); return(this); } /** Sets the mime type of this object @param the mime type of this object */ public Param setType(String cdata) { addAttribute("type",cdata); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Param addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Param addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Param addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Param addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Param removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Strike.java0000644000175000017500000001745007703353440022607 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <U> tag. @version $Id: Strike.java,v 1.4 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Strike extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("strike"); } /** Basic constructor. */ public Strike() { } /** Basic constructor. @param element Adds an Element to the element. */ public Strike(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Strike(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Strike addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Strike addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Strike addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Strike addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Strike removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/FrameSet.java0000644000175000017500000001652007703353441023052 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <FrameSet> tag. @version $Id: FrameSet.java,v 1.4 2003/04/27 09:21:50 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class FrameSet extends MultiPartElement implements Printable, PageEvents { /** Private initialization routine. */ { setElementType("frameset"); } /** Basic constructor. */ public FrameSet() { } /** Basic constructor. @param element Adds an Element to the element. */ public FrameSet(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public FrameSet(String element) { addElement(element); } /** Basic constructor. @param rows Sets the ROWS="" attribute @param cols Sets the COLS="" attribute */ public FrameSet(String rows, String cols) { setRows(rows); setCols(cols); } /** Basic constructor. @param rows Sets the ROWS="" attribute @param cols Sets the COLS="" attribute @param element Adds an Element to the element. */ public FrameSet(String rows, String cols, Element element) { addElement(element); setRows(rows); setCols(cols); } /** Basic constructor. @param rows Sets the ROWS="" attribute @param cols Sets the COLS="" attribute @param element Adds an Element to the element. */ public FrameSet(String rows, String cols, String element) { addElement(element); setRows(rows); setCols(cols); } /** Sets the ROWS="" attribute @param rows Sets the ROWS="" attribute */ public FrameSet setRows(int rows) { setRows(Integer.toString(rows)); return(this); } /** Sets the ROWS="" attribute @param rows Sets the ROWS="" attribute */ public FrameSet setRows(String rows) { addAttribute("rows",rows); return(this); } /** Sets the COLS="" attribute @param cols Sets the COLS="" attribute */ public FrameSet setCols(int cols) { setCols(Integer.toString(cols)); return(this); } /** Sets the COLS="" attribute @param cols Sets the COLS="" attribute */ public FrameSet setCols(String cols) { addAttribute("cols",cols); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FrameSet addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FrameSet addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FrameSet addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FrameSet addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public FrameSet removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/BaseFont.java0000644000175000017500000001535407703353440023050 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BASEFONT> object. @version $Id: BaseFont.java,v 1.3 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class BaseFont extends SinglePartElement implements Printable { /** Private initializer. */ { setElementType("basefont"); } /** Basic Constructor. use set* methods. */ public BaseFont() { } /** Basic constructor. @param face create new BaseFont object with this face. */ public BaseFont(String face) { setFace(face); } /** Basic constructor @param face @param color Create a new BaseFont object with the face abd color already set. Convience colors are defined in HtmlColor interface. */ public BaseFont(String face,String color) { setFace(face); setColor(color); } /** Basic constructor @param face @param color @param size Create a new BaseFont object with the face,color and size already set. Convience colors are defined in HtmlColor interface. */ public BaseFont(String face,String color,int size) { setFace(face); setColor(color); setSize(size); } /** Basic constructor @param size Create a new BaseFont object with the size already set. */ public BaseFont(int size,String face) { setSize(size); setFace(face); } /** Basic constructor @param color @param size Create a new BaseFont object with the size and color already set. */ public BaseFont(String color,int size) { setSize(size); setColor(color); } /** sets the FACE="" attribute. @param face sets the FACE="" attribute. */ public BaseFont setFace(String face) { addAttribute("face",face); return(this); } /** sets the COLOR="" attribute. @param color sets the COLOR="" attribute. Convience colors are defined in the HtmlColors interface. */ public BaseFont setColor(String color) { addAttribute("color",HtmlColor.convertColor(color)); return(this); } /** sets the SIZE="" attribute. @param size sets the SIZE="" attribute. */ public BaseFont setSize(int size) { addAttribute("size",Integer.toString(size)); return(this); } /** sets the SIZE="" attribute. @param size sets the SIZE="" attribute. */ public BaseFont setSize(String size) { addAttribute("size",size); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BaseFont addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BaseFont addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BaseFont addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BaseFont addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public BaseFont removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Area.java0000644000175000017500000002773107703353441022222 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Area> tag. @version $Id: Area.java,v 1.4 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Area extends SinglePartElement implements Printable, FocusEvents, MouseEvents, KeyEvents { public static final String DEFAULT = "DEFAULT"; public static final String RECT = "RECT"; public static final String CIRCLE = "CIRCLE"; public static final String POLY = "POLY"; public static final String rect = "rect"; public static final String circle = "circle"; public static final String poly = "poly"; /** Private initialization routine. */ { setElementType("area"); setNoHref(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Area() { } /** Use the set* methods to set the values of the attributes. @param shape the SHAPE="" attribute */ public Area(String shape) { setShape(shape); } /** Use the set* methods to set the values of the attributes. @param shape the SHAPE="" attribute @param coords the COORDS="" attribute */ public Area(String shape, String coords) { setShape(shape); setCoords(coords); } /** Use the set* methods to set the values of the attributes. @param shape the SHAPE="" attribute @param coords the COORDS="" attribute */ public Area(String shape, int[] coords) { setShape(shape); setCoords(coords); } /** Use the set* methods to set the values of the attributes. @param shape the SHAPE="" attribute @param coords the COORDS="" attribute @param href the HREF="" attribute */ public Area(String shape, String coords, String href) { setShape(shape); setCoords(coords); setHref(href); } /** Use the set* methods to set the values of the attributes. @param shape the SHAPE="" attribute @param coords the COORDS="" attribute @param href the HREF="" attribute */ public Area(String shape, int[] coords, String href) { setShape(shape); setCoords(coords); setHref(href); } /** Sets the SHAPE="" attribute @param shape the SHAPE="" attribute */ public Area setShape(String shape) { addAttribute("shape",shape); return this; } /** Sets the COORDS="" attribute @param coords the COORDS="" attribute */ public Area setCoords(String coords) { addAttribute("coords",coords); return this; } /** Sets the COORDS="" attribute @param coords the COORDS="" attribute */ public Area setCoords(int[] coords) { addAttribute("coords", coords[0] + "," + coords[1] + "," + coords[2] + "," + coords[3]); return this; } /** Sets the HREF="" attribute @param href the HREF="" attribute */ public Area setHref(String href) { addAttribute("href",href); setNoHref(false); return this; } /** Sets the ALT="" attribute @param alt the ALT="" attribute */ public Area setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Area setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Area setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the nohref @param href true or false */ public Area setNoHref(boolean href) { if ( href == true ) addAttribute("nohref", NO_ATTRIBUTE_VALUE); else removeAttribute("nohref"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Area addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Area addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Add an element to the element @param element a string representation of the element */ public Area addElement(String element) { addElementToRegistry(element); return(this); } /** Add an element to the element @param element an element to add */ public Area addElement(Element element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Area removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Code.java0000644000175000017500000001742407703353440022221 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Code> tag. @version $Id: Code.java,v 1.4 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Code extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("code"); } /** Basic constructor. */ public Code() { } /** Basic constructor. @param element Adds an Element to the element. */ public Code(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Code(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Code addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Code addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Code addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Code addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Code removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Dfn.java0000644000175000017500000001741007703353440022051 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Dfn> tag. @version $Id: Dfn.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Dfn extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dfn"); } /** Basic constructor. */ public Dfn() { } /** Basic constructor. @param element Adds an Element to the element. */ public Dfn(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Dfn(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Dfn addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Dfn addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Dfn addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Dfn addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Dfn removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Frame.java0000644000175000017500000002154707703353440022402 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Frame> tag. @version $Id: Frame.java,v 1.3 2003/04/27 09:21:50 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Frame extends MultiPartElement implements Printable { public final static String YES = "YES"; public final static String NO = "NO"; public final static String AUTO = "AUTO"; public final static String yes = "yes"; public final static String no = "no"; public final static String auto = "auto"; /** Private initialization routine. */ { setElementType("frame"); setNeedClosingTag(false); } /** Basic constructor. */ public Frame() { } /** Basic constructor. @param element Adds an Element to the element. */ public Frame(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Frame(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute */ public Frame(Element element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute */ public Frame(String element, String name) { addElement(element); setName(name); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute @param src the SRC="" attribute */ public Frame(Element element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param name the NAME="" attribute @param src the SRC="" attribute */ public Frame(String element, String name, String src) { addElement(element); setName(name); setSrc(src); } /** Sets the LONGDESC="" attribute @param longdesc the LONGDESC="" attribute */ public Frame setLongDesc(String longdesc) { addAttribute("longdesc",longdesc); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public Frame setName(String name) { addAttribute("name",name); return this; } /** Sets the SRC="" attribute @param src the SRC="" attribute */ public Frame setSrc(String src) { addAttribute("src",src); return this; } /** Sets the FRAMEBORDER="" attribute @param frameborder the FRAMEBORDER="" attribute */ public Frame setFrameBorder(boolean frameborder) { if (frameborder) addAttribute("frameborder",Integer.toString(1)); else addAttribute("frameborder",Integer.toString(0)); return this; } /** Sets the MARGINWIDTH="" attribute @param marginwidth the MARGINWIDTH="" attribute */ public Frame setMarginWidth(int marginwidth) { setMarginWidth(Integer.toString(marginwidth)); return this; } /** Sets the MARGINWIDTH="" attribute @param marginwidth the MARGINWIDTH="" attribute */ public Frame setMarginWidth(String marginwidth) { addAttribute("marginwidth",marginwidth); return this; } /** Sets the MARGINHEIGHT="" attribute @param marginheight the MARGINHEIGHT="" attribute */ public Frame setMarginHeight(int marginheight) { setMarginHeight(Integer.toString(marginheight)); return this; } /** Sets the MARGINHEIGHT="" attribute @param marginheight the MARGINHEIGHT="" attribute */ public Frame setMarginHeight(String marginheight) { addAttribute("marginheight",marginheight); return this; } /** Sets the SCROLLING="" attribute @param scrolling the SCROLLING="" attribute */ public Frame setScrolling(String scrolling) { addAttribute("scrolling",scrolling); return this; } /** Sets the noresize value @param noresize true or false */ public Frame setNoResize(boolean noresize) { if ( noresize == true ) addAttribute("noresize", NO_ATTRIBUTE_VALUE); else removeAttribute("noresize"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Frame addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Frame addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Frame addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Frame addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Frame removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/NOBR.java0000644000175000017500000001210107703353440022072 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <NOBR> tag. @version $Id: NOBR.java,v 1.3 2003/04/27 09:21:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class NOBR extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("nobr"); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public NOBR() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <NOBR>value</NOBR> */ public NOBR(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <NOBR>value</NOBR> */ public NOBR(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NOBR addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public NOBR addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NOBR addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public NOBR addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public NOBR removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/ColGroup.java0000644000175000017500000001570707703353440023103 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <COLGROUP> object. @version $Id: ColGroup.java,v 1.3 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class ColGroup extends MultiPartElement implements Printable { /** private initializer. */ { setElementType("colgroup"); setNeedClosingTag(false); } public ColGroup() { } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public ColGroup setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public ColGroup setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public ColGroup setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public ColGroup setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public ColGroup setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public ColGroup setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public ColGroup setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public ColGroup setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public ColGroup setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ColGroup addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public ColGroup addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ColGroup addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public ColGroup addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public ColGroup removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/BlockQuote.java0000644000175000017500000002246407703353441023420 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BlockQuote> tag. @version $Id: BlockQuote.java,v 1.4 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class BlockQuote extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("blockquote"); } /** Basic constructor. */ public BlockQuote() { } /** Basic constructor. @param element Adds an Element to the element. */ public BlockQuote(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public BlockQuote(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public BlockQuote(Element element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public BlockQuote(String element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public BlockQuote(Element element, Element cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public BlockQuote(String element, Element cite) { addElement(element); setCite(cite); } /** Sets the CITE="" attribute. @param cite sets the CITE="" attribute. */ public BlockQuote setCite(String cite) { addAttribute("cite",cite); return(this); } /** Sets the CITE="" attribute. @param cite sets the CITE="" attribute. */ public BlockQuote setCite(Element cite) { addAttribute("cite",cite); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BlockQuote addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public BlockQuote addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BlockQuote addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public BlockQuote addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public BlockQuote removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/DL.java0000644000175000017500000001665007703353440021646 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <DL> tag. @version $Id: DL.java,v 1.4 2003/04/27 09:20:19 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class DL extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("dl"); } /** Basic constructor. */ public DL() { } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DL addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public DL addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DL addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public DL addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public DL removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Col.java0000644000175000017500000001550307703353440022060 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <COL> object. @version $Id: Col.java,v 1.3 2003/04/27 09:21:31 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Col extends SinglePartElement implements Printable { /** private initializer. */ { setElementType("col"); } public Col() { } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public Col setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public Col setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public Col setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public Col setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public Col setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public Col setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public Col setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public Col setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public Col setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Col addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Col addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Col addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Col addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Col removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TBody.java0000644000175000017500000002340107703353440022360 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TBODY> object. @version $Id: TBody.java,v 1.4 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TBody extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("tbody"); } public TBody() { } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public TBody setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public TBody setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TBody setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TBody setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TBody setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public TBody setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public TBody setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TBody setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TBody setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TBody addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TBody addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TBody addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TBody addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TBody removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Q.java0000644000175000017500000002222207703353440021537 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Q> tag. @version $Id: Q.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Q extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("q"); } /** Basic constructor. */ public Q() { } /** Basic constructor. @param element Adds an Element to the element. */ public Q(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Q(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public Q(Element element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public Q(String element, String cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public Q(Element element, Element cite) { addElement(element); setCite(cite); } /** Basic constructor. @param element Adds an Element to the element. @param cite sets the CITE="" attribute. */ public Q(String element, Element cite) { addElement(element); setCite(cite); } /** Sets the CITE="" attribute. @param cite sets the CITE="" attribute. */ public Q setCite(String cite) { addAttribute("cite",cite); return(this); } /** Sets the CITE="" attribute. @param cite sets the CITE="" attribute. */ public Q setCite(Element cite) { addAttribute("cite",cite); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Q addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Q addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Q addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Q addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Q removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Body.java0000644000175000017500000002331007703353440022233 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <BODY></BODY> tag. @version $Id: Body.java,v 1.4 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Body extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("body"); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Body() { } /** Use the set* methods to set the values of the attributes. @param color the BGCOLOR="" attribute */ public Body(String color) { setBgColor(color); } /** Sets the BGCOLOR="" attribute @param color the BGCOLOR="" attribute */ public Body setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return this; } /** Sets the BACKGROUND="" attribute @param url the BACKGROUND="" attribute */ public Body setBackground(String url) { addAttribute("background",url); return this; } /** Sets the TEXT="" attribute @param text the TEXT="" attribute */ public Body setText(String text) { addAttribute("text",text); return this; } /** Sets the LINK="" attribute @param color the LINK="" attribute */ public Body setLink(String color) { addAttribute("link",HtmlColor.convertColor(color)); return this; } /** Sets the VLINK="" attribute @param color the VLINK="" attribute */ public Body setVlink(String color) { addAttribute("vlink",HtmlColor.convertColor(color)); return this; } /** Sets the ALINK="" attribute @param color the ALINK="" attribute */ public Body setAlink(String color) { addAttribute("alink",HtmlColor.convertColor(color)); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Body addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Body addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Body addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Body addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Body removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TFoot.java0000644000175000017500000002340507703353440022376 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TFOOT> object. @version $Id: TFoot.java,v 1.4 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TFoot extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("tfoot"); } public TFoot() { } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public TFoot setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public TFoot setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TFoot setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TFoot setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TFoot setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public TFoot setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public TFoot setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TFoot setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TFoot setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TFoot addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TFoot addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TFoot addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TFoot addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TFoot removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Script.java0000644000175000017500000002130607703353441022606 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <U> tag. @version $Id: Script.java,v 1.6 2003/05/02 09:54:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Script extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("script"); setLanguage("JavaScript"); } /** Basic constructor. */ public Script() { } /** Basic constructor. @param element Adds an Element to the element. */ public Script(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute */ public Script(Element element, String src) { addElement(element); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute @param type sets the TYPE="" attribute */ public Script(Element element, String src, String type) { addElement(element); setSrc(src); setType(type); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute @param type sets the TYPE="" attribute @param lang sets the LANGUAGE="" attribute */ public Script(Element element, String src, String type, String lang) { addElement(element); setSrc(src); setType(type); setLanguage(lang); } /** Basic constructor. @param element Adds an Element to the element. */ public Script(String element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute */ public Script(String element, String src) { addElement(element); setSrc(src); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute @param type sets the TYPE="" attribute */ public Script(String element, String src, String type) { addElement(element); setSrc(src); setType(type); } /** Basic constructor. @param element Adds an Element to the element. @param src sets the SRC="" attribute @param type sets the TYPE="" attribute @param lang sets the LANGUAGE="" attribute */ public Script(String element, String src, String type, String lang) { addElement(element); setSrc(src); setType(type); setLanguage(lang); } /** Sets the SRC="" attribute @param src the SRC="" attribute */ public Script setSrc(String src) { addAttribute("src",src); return this; } /** Sets the TYPE="" attribute @param type the TYPE="" attribute */ public Script setType(String type) { addAttribute("type", type); return this; } /** Sets the LANGUAGE="" attribute @param language the LANGUAGE="" attribute */ public Script setLanguage(String language) { addAttribute("language", language); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Script addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Script addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Script addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Script addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Script removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** We override this method here in order to create the Html comment code by default that protects scripts from older browsers. We put in hard returns here because we want to make sure that this code works even with PrettyPrint false. */ public String createStartTag() { StringBuffer out = new StringBuffer(); out.append(super.createStartTag()); if (!(hasAttribute("src"))) { out.append("\n"); out.append(""); out.append("\n"); } out.append(super.createEndTag()); return(out.toString()); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Style.java0000644000175000017500000001336707703353440022451 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Style> tag. @version $Id: Style.java,v 1.3 2003/04/27 09:03:51 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Style extends MultiPartElement implements Printable { /** type=text/css */ public static final String CSS = "text/css"; /** type=text/css */ public static final String css = "text/css"; /** Private initialization routine. */ { setElementType("style"); } /** Basic constructor. */ public Style() { } /** Basic constructor. @param type the TYPE="" attribute */ public Style(String type) { setType(type); } /** Basic constructor. @param type the TYPE="" attribute @param element Adds an Element to the element. */ public Style(String type, Element element) { setType(type); addElement(element); } /** Basic constructor. @param type the TYPE="" attribute @param element Adds an Element to the element. */ public Style(String type, String element) { setType(type); addElement(element); } /** Sets the TYPE="" attribute @param type the TYPE="" attribute */ public Style setType(String type) { addAttribute("type",type); return this; } /** Sets the MEDIA="" attribute @param media the MEDIA="" attribute */ public Style setMedia(String media) { addAttribute("media",media); return this; } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Style addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Style addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Style addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Style addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Style removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Input.java0000644000175000017500000004651607703353440022452 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Input> tag. @version $Id: Input.java,v 1.9 2003/04/27 09:20:29 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Input extends SinglePartElement implements Printable, FormEvents, PageEvents, FocusEvents, MouseEvents, KeyEvents { /**A type of <input>. Use this to set the type attribute.*/ public static final String TEXT = "TEXT"; /**A type of <input>. Use this to set the type attribute.*/ public static final String PASSWORD = "PASSWORD"; /**A type of <input>. Use this to set the type attribute.*/ public static final String CHECKBOX = "CHECKBOX"; /**A type of <input>. Use this to set the type attribute.*/ public static final String RADIO = "RADIO"; /**A type of <input>. Use this to set the type attribute.*/ public static final String FILE = "FILE"; /**A type of <input>. Use this to set the type attribute.*/ public static final String BUTTON = "BUTTON"; /**A type of <input>. Use this to set the type attribute.*/ public static final String IMAGE = "IMAGE"; /**A type of <input>. Use this to set the type attribute.*/ public static final String HIDDEN = "HIDDEN"; /**A type of <input>. Use this to set the type attribute.*/ public static final String SUBMIT = "SUBMIT"; /**A type of <input>. Use this to set the type attribute.*/ public static final String RESET = "RESET"; /**A type of <input>. Use this to set the type attribute.*/ public static final String text = "text"; /**A type of <input>. Use this to set the type attribute.*/ public static final String password = "password"; /**A type of <input>. Use this to set the type attribute.*/ public static final String checkbox = "checkbox"; /**A type of <input>. Use this to set the type attribute.*/ public static final String radio = "radio"; /**A type of <input>. Use this to set the type attribute.*/ public static final String file = "file"; /**A type of <input>. Use this to set the type attribute.*/ public static final String button = "button"; /**A type of <input>. Use this to set the type attribute.*/ public static final String image = "image"; /**A type of <input>. Use this to set the type attribute.*/ public static final String hidden = "hidden"; /**A type of <input>. Use this to set the type attribute.*/ public static final String submit = "submit"; /**A type of <input>. Use this to set the type attribute.*/ public static final String reset = "reset"; /** Private initialization routine. */ { setElementType("input"); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Input() { } /** Constructor sets the type attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute */ public Input(String type) { setType(type); } /** Constructor sets the type and name attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute @param name used to set name attribute */ public Input(String type, String name) { setType(type); setName(name); } /** Constructor sets the type, name and value attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute @param name used to set name attribute @param value used to set value attribute */ public Input(String type, String name, String value) { setType(type); setName(name); setValue(value); } /** Constructor sets the type, name and value attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute @param name used to set name attribute @param value used to set value attribute */ public Input(String type, String name, int value) { setType(type); setName(name); setValue(value); } /** Constructor sets the type, name and value attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute @param name used to set name attribute @param value used to set value attribute */ public Input(String type, String name, Integer value) { setType(type); setName(name); setValue(value); } /** Constructor sets the type, name and value attributes. Use the set* methods to set the values of the other attributes. @param type used to set type attribute @param name used to set name attribute @param value used to set value attribute */ public Input(String type, String name, double value) { setType(type); setName(name); setValue(value); } /** Sets the TYPE="" attribute @param type the TYPE="" attribute */ public Input setType(String type) { addAttribute("type",type); return this; } /** Sets the SRC="" attribute @param src the SRC="" attribute */ public Input setSrc(String src) { addAttribute("src",src); return this; } /** Sets the BORDER="" attribute @param border the BORDER="" attribute */ public Input setBorder(int border) { addAttribute("border", Integer.toString(border)); return this; } /** Sets the ALT="" attribute @param alt the ALT="" attribute */ public Input setAlt(String alt) { addAttribute("alt",alt); return this; } /** Sets the NAME="" attribute @param name the NAME="" attribute */ public Input setName(String name) { addAttribute("name",name); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Input setValue(String value) { addAttribute("value",value); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Input setValue(int value) { addAttribute("value",Integer.toString(value)); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Input setValue(Integer value) { addAttribute("value",value.toString()); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Input setValue(double value) { addAttribute("value",Double.toString(value)); return this; } /** Sets the ACCEPT="" attribute @param accept the ACCEPT="" attribute */ public Input setAccept(String accept) { addAttribute("accept",accept); return this; } /** Sets the SIZE="" attribute @param size the SIZE="" attribute */ public Input setSize(String size) { addAttribute("size",size); return this; } /** Sets the SIZE="" attribute @param size the SIZE="" attribute */ public Input setSize(int size) { setSize(Integer.toString(size)); return this; } /** Sets the MAXLENGTH="" attribute @param maxlength the MAXLENGTH="" attribute */ public Input setMaxlength(String maxlength) { addAttribute("maxlength",maxlength); return this; } /** Sets the MAXLENGTH="" attribute @param maxlength the MAXLENGTH="" attribute */ public Input setMaxlength(int maxlength) { setMaxlength(Integer.toString(maxlength)); return this; } /** Sets the USEMAP="" attribute @param usemap the USEMAP="" attribute */ public Input setUsemap(String usemap) { addAttribute("usemap",usemap); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Input setTabindex(String index) { addAttribute("tabindex",index); return this; } /** Sets the TABINDEX="" attribute @param alt the TABINDEX="" attribute */ public Input setTabindex(int index) { setTabindex(Integer.toString(index)); return this; } /** Sets the checked value @param checked true or false */ public Input setChecked(boolean checked) { if ( checked == true ) addAttribute("checked", NO_ATTRIBUTE_VALUE); else removeAttribute("checked"); return(this); } /** Sets the readonly value @param readonly true or false */ public Input setReadOnly(boolean readonly) { if ( readonly == true ) addAttribute("readonly", NO_ATTRIBUTE_VALUE); else removeAttribute("readonly"); return(this); } /** Sets the disabled value @param disabled true or false */ public Input setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Input addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Input addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Input addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Input addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Input removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Label.java0000644000175000017500000002173207703353440022363 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <LABEL> tag. @version $Id: Label.java,v 1.4 2003/04/27 09:22:43 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Label extends MultiPartElement implements Printable, PageEvents, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("label"); } /** Basic constructor. Use set* methods. */ public Label() { } /** Basic Constructor use set* methods. @param for Sets the FOR="" attribute */ public Label(String value) { setFor(value); } /** Basic Constructor use set* methods. @param for Sets the FOR="" attribute @param accesskey sets the ACCESSKEY="" attribute. */ public Label(String value, String accesskey) { setFor(value); } /** Sets the FOR="" attribute. @param for sets the FOR="" attribute. */ public Label setFor(String value) { addAttribute("for",value); return(this); } /** Sets the ACCESSKEY="" attribute. @param accesskey sets the ACCESSKEY="" attribute. */ public Label setAccessKey(String accesskey) { addAttribute("accesskey",accesskey); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Label addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Label addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Label addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Label addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Label removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onload event occurs when the user agent finishes loading a window or all frames within a FRAMESET. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnLoad(String script) { addAttribute ( "onLoad", script ); } /** The onunload event occurs when the user agent removes a document from a window or frame. This attribute may be used with BODY and FRAMESET elements. @param The script */ public void setOnUnload(String script) { addAttribute ( "onUnload", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TH.java0000644000175000017500000003054707703353440021663 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TH> object. @version $Id: TH.java,v 1.6 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TH extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("th"); } /** Basic constructor. Use set* methods. */ public TH() { } /** Basic Constructor use set* methods. */ public TH(Element element) { addElement(element); } /** Basic Constructor use set* methods. */ public TH(String element) { addElement(element); } /** Basic Constructor use set* methods. @param close. Print the closing tag or not. */ public TH(boolean close) { setNeedClosingTag(close); } /** Sets the ABBR="" attribute. @param cdata sets the ABBR="" attribute. */ public TH setAbbr(String cdata) { addAttribute("abbr",cdata); return(this); } /** Sets the AXIS="" attribute @param cdata sets the AXIS="" attribute */ public TH setAxis(String cdata) { addAttribute("axis",cdata); return(this); } /** Sets the AXES="" attribute @param id_refs list of id's for header cells */ public TH setAxes(String id_refs) { addAttribute("axes",id_refs); return(this); } /** Sets the ROWSPAN="" attribute @param span Number of rows spaned by cell */ public TH setRowSpan(int span) { addAttribute("rowspan",Integer.toString(span)); return(this); } /** Sets the ROWSPAN="" attribute @param span Number of rows spaned by cell */ public TH setRowSpan(String span) { addAttribute("rowspan",span); return(this); } /** Sets the COLSPAN="" attribute @param span Number of columns spanned by cell */ public TH setColSpan(int span) { addAttribute("colspan",Integer.toString(span)); return(this); } /** Sets the COLSPAN="" attribute @param span Number of columns spanned by cell */ public TH setColSpan(String span) { addAttribute("colspan",span); return(this); } /** Sets word wrap on or off. @param wrap turn word wrap on or off. */ public TH setNoWrap(boolean wrap) { if ( wrap == true ) addAttribute("nowrap", NO_ATTRIBUTE_VALUE); else removeAttribute("nowrap"); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TH setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public TH setWidth(String width) { addAttribute("width",width); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public TH setHeight(int height) { addAttribute("height",Integer.toString(height)); return(this); } /** Supplies user agents with a recommended cell height. (Pixel Values) @param height how many pixels to make cell */ public TH setHeight(String height) { addAttribute("height",height); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public TH setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public TH setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public TH setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TH setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public TH setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Sets the BGCOLOR="" attribute @param color sets the background color of the cell. */ public TH setBgColor(String color) { addAttribute("bgcolor",HtmlColor.convertColor(color)); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TH addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TH addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TH addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TH addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TH removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/FieldSet.java0000644000175000017500000001752207703353441023046 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <FieldSet> tag. @version $Id: FieldSet.java,v 1.4 2003/04/27 09:21:50 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class FieldSet extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("fieldset"); } /** Basic constructor. Use set* methods. */ public FieldSet() { } /** Basic Constructor use set* methods. @param element an element to add */ public FieldSet(Element element) { addElement(element); } /** Basic Constructor use set* methods. @param element an element to add */ public FieldSet(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FieldSet addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public FieldSet addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FieldSet addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public FieldSet addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public FieldSet removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Abbr.java0000644000175000017500000001772407703353440022220 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Abbr> tag.

Please refer to the TestBed.java file for example code usage. @version $Id: Abbr.java,v 1.4 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Abbr extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("abbr"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Abbr() { } /** This constructor creates a <Abbr> tag. @param element Adds an Element to the element. */ public Abbr(Element element) { addElement(element); } /** This constructor creates a <Abbr> tag. @param element Adds an Element to the element. */ public Abbr(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Abbr addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Abbr addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Abbr addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Abbr addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Abbr removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Title.java0000644000175000017500000001155107703353440022423 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TITLE></TITLE> tag. @version $Id: Title.java,v 1.3 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Title extends MultiPartElement implements Printable { /** Private initialization routine. */ { setElementType("title"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public Title() { } /** This method creates a <TITLE> tag and sets the Element value. @param value what goes between <start_tag> <end_tag> */ public Title(String title) { addElement(title); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Title addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Title addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Title addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Title addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Title removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/TT.java0000644000175000017500000001737607703353440021704 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <TT> tag. @version $Id: TT.java,v 1.4 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class TT extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("tt"); } /** Basic constructor. */ public TT() { } /** Basic constructor. @param element Adds an Element to the element. */ public TT(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public TT(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TT addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public TT addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TT addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public TT addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public TT removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/UL.java0000644000175000017500000002034707703353441021666 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <UL> tag. @version $Id: UL.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class UL extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("ul"); } /** Basic constructor, use the set* methods. */ public UL() { } /** Basic constructor, use the set* methods. @param list an array of LI elements. */ public UL(LI[] list) { addElement(list); } /** Basic constructor, use the set* methods. @param list an array of string elements to be converted to li. */ public UL(String[] list) { addElement(list); } /** Add a list to the UL @param list a list of LI objects. */ public UL addElement(LI[] list) { for(int x = 0; x < list.length; x++) { addElement(list[x]); } return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public UL addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public UL addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public UL addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public UL addElement(String element) { addElementToRegistry(element); return(this); } /** Add a list to the UL @param list a list of Strings to be converted to li objects. */ public UL addElement(String[] element) { LI[] li = new LI().addElement(element); addElement(li); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public UL removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Acronym.java0000644000175000017500000001750007703353440022752 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <Acronym> tag. @version $Id: Acronym.java,v 1.4 2003/04/27 09:21:59 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Acronym extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("acronym"); } /** Basic constructor. */ public Acronym() { } /** Basic constructor. @param element Adds an Element to the element. */ public Acronym(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Acronym(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Acronym addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Acronym addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Acronym addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Acronym addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Acronym removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/U.java0000644000175000017500000001736107703353441021554 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <U> tag. @version $Id: U.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class U extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("u"); } /** Basic constructor. */ public U() { } /** Basic constructor. @param element Adds an Element to the element. */ public U(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public U(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public U addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public U addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public U addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public U addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public U removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Font.java0000644000175000017500000001542707703353440022256 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <FONT> object. @version $Id: Font.java,v 1.3 2003/04/27 09:21:50 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Font extends MultiPartElement implements Printable { /** Private initializer. */ { setElementType("font"); } /** Basic Constructor. use set* methods. */ public Font() { } /** Basic constructor. @param face create new font object with this face. */ public Font(String face) { setFace(face); } /** Basic constructor @param face @param color Create a new font object with the face abd color already set. Convience colors are defined in HtmlColor interface. */ public Font(String face,String color) { setFace(face); setColor(color); } /** Basic constructor @param face @param color @param size Create a new font object with the face,color and size already set. Convience colors are defined in HtmlColor interface. */ public Font(String face,String color,int size) { setFace(face); setColor(color); setSize(size); } /** Basic constructor @param size Create a new font object with the size already set. */ public Font(int size) { setSize(size); } /** Basic constructor @param size @param face Create a new font object with the size and face already set. */ public Font(int size,String face) { setSize(size); setFace(face); } /** Basic constructor @param color @param size Create a new font object with the size and color already set. */ public Font(String color,int size) { setSize(size); setColor(color); } /** sets the FACE="" attribute. @param face sets the FACE="" attribute. */ public Font setFace(String face) { addAttribute("face",face); return(this); } /** sets the COLOR="" attribute. @param color sets the COLOR="" attribute. Convience colors are defined in the HtmlColors interface. */ public Font setColor(String color) { addAttribute("color",HtmlColor.convertColor(color)); return(this); } /** sets the SIZE="" attribute. @param size sets the SIZE="" attribute. */ public Font setSize(int size) { addAttribute("size",Integer.toString(size)); return(this); } /** sets the SIZE="" attribute. @param size sets the SIZE="" attribute. */ public Font setSize(String size) { addAttribute("size",size); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Font addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Font addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Font addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the Element. @param element adds and Element to the Element. */ public Font addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Font removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/THead.java0000644000175000017500000002340507703353440022330 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <THEAD> object. @version $Id: THead.java,v 1.4 2003/04/27 09:03:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class THead extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** private initializer. */ { setElementType("thead"); } public THead() { } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public THead setSpan(String span) { addAttribute("span",span); return(this); } /** Sets the SPAN="" attribute. @param span sets the SPAN="" attribute. */ public THead setSpan(int span) { addAttribute("span",Integer.toString(span)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public THead setWidth(int width) { addAttribute("width",Integer.toString(width)); return(this); } /** Supplies user agents with a recommended cell width. (Pixel Values) @param width how many pixels to make cell */ public THead setWidth(String width) { addAttribute("width",width); return(this); } /** Sets the ALIGN="" attribute convience variables are provided in the AlignType interface @param align Sets the ALIGN="" attribute */ public THead setAlign(String align) { addAttribute("align",align); return(this); } /** Sets the VALIGN="" attribute convience variables are provided in the AlignType interface @param valign Sets the ALIGN="" attribute */ public THead setVAlign(String valign) { addAttribute("valign",valign); return(this); } /** Sets the CHAR="" attribute. @param character the character to use for alignment. */ public THead setChar(String character) { addAttribute("char",character); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public THead setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the CHAROFF="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character on each line. */ public THead setCharOff(String char_off) { addAttribute("charoff",char_off); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public THead addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public THead addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public THead addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public THead addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public THead removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/B.java0000644000175000017500000001736007703353440021527 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <B> tag. @version $Id: B.java,v 1.4 2003/04/27 09:20:40 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class B extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("b"); } /** Basic constructor. */ public B() { } /** Basic constructor. @param element Adds an Element to the element. */ public B(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public B(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public B addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public B addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public B addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public B addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public B removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Option.java0000644000175000017500000003741407703353440022620 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /**

This class creates a <Option> tag.

The Option tag now defaults to having a closing </Option> (as is now required). This can be overridden by setNeedClosingTag(false).

This change means that you should construct select options element in the following manner:

    new org.apache.ecs.html.Select
        .addElement(new option("value1").addElement("text1"))
        .addElement(new option("value2").addElement("text2"))
rather than
    new org.apache.ecs.html.Select
        .addElement(new option("value1").addElement("text1")
        .addElement(new option("value2").addElement("text2")))
(this change should not break existing code too badly since browsers generally display the output from the above correctly).

Alternatively, you could use the new option constructor and do something like

    new org.apache.ecs.html.Select
        .addElement(new option("text1","value1","text1"))
        .addElement(new option("text2","value2","text2"))
or even
    new org.apache.ecs.html.Select
        .appendOption("text1","value1","text1")
        .appendOption("text2","value2","text2")

@version $Id: Option.java,v 1.6 2003/04/27 09:22:12 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Option extends MultiPartElement implements Printable, FocusEvents, FormEvents, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("option"); setNeedClosingTag(true); } /** Basic constructor. Use the set* methods to set the values of the attributes. */ public Option() { } /** Constructor sets the value attribute. Use the set* methods to set the values of the other attributes. @param value sets the attribute VALUE="" */ public Option(String value) { setValue(value); } /** Constructor sets the value and label attributes. Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" */ public Option(String label, String value) { setLabel(label); setValue(value); } /** Constructor sets the value and label attributes. Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" */ public Option(String label, int value) { setLabel(label); setValue(value); } /** Constructor sets the value and label attributes. Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" */ public Option(String label, double value) { setLabel(label); setValue(value); } /** Same as Option(label,value).addElement(text). Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" @param text is added as an element */ public Option(String label, String value, String text) { this(label,value); addElement(text); } /** Same as Option(label,value).addElement(text). Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" @param text is added as an element */ public Option(String label, int value, String text) { this(label,value); addElement(text); } /** Same as Option(label,value).addElement(text). Use the set* methods to set the values of the other attributes. @param label sets the attribute LABEL="" @param value sets the attribute VALUE="" @param text is added as an element */ public Option(String label, double value, String text) { this(label,value); addElement(text); } /** Sets the LABEL="" attribute @param label the LABEL="" attribute */ public Option setLabel(String label) { addAttribute("label",label); return this; } /** Gets the LABEL attribute. */ public String getLabel() { return getAttribute("label"); } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Option setValue(String value) { addAttribute("value",value); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Option setValue(int value) { addAttribute("value",Integer.toString(value)); return this; } /** Sets the VALUE="" attribute @param value the VALUE="" attribute */ public Option setValue(double value) { addAttribute("value",Double.toString(value)); return this; } /** Gets the VALUE attribute. */ public String getValue() { return getAttribute("value"); } /** Sets the selected value @param selected true or false */ public Option setSelected(boolean selected) { if ( selected == true ) addAttribute("selected", NO_ATTRIBUTE_VALUE); else removeAttribute("selected"); return(this); } /** Gets the SELECTED attribute. Of course, this return true is the attribute exists and false otherwise. */ public boolean getSelected() { if ( hasAttribute("selected")) { return true; } else { return false; } } /** Sets the disabled value @param disabled true or false */ public Option setDisabled(boolean disabled) { if ( disabled == true ) addAttribute("disabled", NO_ATTRIBUTE_VALUE); else removeAttribute("disabled"); return(this); } /** Gets the value of the disabled attribute. Of course, this return true is the attribute exists and false otherwise. */ public boolean getDisabled() { if ( hasAttribute("disabled")) { return true; } else { return false; } } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Option addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Option addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Option addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Option addElement(String element) { addElementToRegistry(element); return(this); } /** Creates a group of options. @param Creates a group of options. */ public Option[] addElement(String[] element) { Option[] option = new Option[element.length]; for(int x = 0; x < element.length; x++) { option[x]= new Option().addElement(element[x]); } return(option); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Option removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onfocus event occurs when an element receives focus either by the pointing device or by tabbing navigation. This attribute may be used with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and BUTTON. @param The script */ public void setOnFocus(String script) { addAttribute ( "onFocus", script ); } /** The onblur event occurs when an element loses focus either by the pointing device or by tabbing navigation. It may be used with the same elements as onfocus. @param The script */ public void setOnBlur(String script) { addAttribute ( "onBlur", script ); } /** The onsubmit event occurs when a form is submitted. It only applies to the FORM element. @param The script */ public void setOnSubmit(String script) { addAttribute ( "onSubmit", script ); } /** The onreset event occurs when a form is reset. It only applies to the FORM element. @param The script */ public void setOnReset(String script) { addAttribute ( "onReset", script ); } /** The onselect event occurs when a user selects some text in a text field. This attribute may be used with the INPUT and TEXTAREA elements. @param The script */ public void setOnSelect(String script) { addAttribute ( "onSelect", script ); } /** The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA. @param The script */ public void setOnChange(String script) { addAttribute ( "onChange", script ); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/HR.java0000644000175000017500000002532007703353441021653 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.Enumeration; /** This class creates an <HR> tag. @version $Id: HR.java,v 1.5 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class HR extends SinglePartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("hr"); } /** Basic constructor. Use the set* methods to set the attibutes. */ public HR() { } /** * Basic constructor * * @param width sets the WIDTH="" attribute */ public HR(String width) { setWidth(width); } /** * Basic constructor * * @param width sets the WIDTH="" attribute */ public HR(int width) { setWidth(width); } /** * Basic constructor * * @param width sets the WIDTH="" attribute * @param align sets the ALIGN="" attribute */ public HR(String width, String align) { setWidth(width); setAlign(align); } /** * Basic constructor * * @param width sets the WIDTH="" attribute * @param align sets the ALIGN="" attribute */ public HR(int width, String align) { setWidth(width); setAlign(align); } /** * Basic constructor * * @param width sets the WIDTH="" attribute * @param align sets the ALIGN="" attribute * @param size sets the SIZE="" attribute */ public HR(String width, String align, String size) { setWidth(width); setAlign(align); setSize(size); } /** * Basic constructor * * @param width sets the WIDTH="" attribute * @param align sets the ALIGN="" attribute * @param size sets the SIZE="" attribute */ public HR(String width, String align, int size) { setWidth(width); setAlign(align); setSize(size); } /** * Basic constructor * * @param width sets the WIDTH="" attribute * @param align sets the ALIGN="" attribute * @param size sets the SIZE="" attribute */ public HR(int width, String align, int size) { setWidth(width); setAlign(align); setSize(size); } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public HR setWidth(String width) { addAttribute("width",width); return this; } /** Sets the WIDTH="" attribute @param width the WIDTH="" attribute */ public HR setWidth(int width) { addAttribute("width",Integer.toString(width)); return this; } /** Sets the ALIGN="" attribute @param align the ALIGN="" attribute */ public HR setAlign(String align) { addAttribute("align",align); return this; } /** Sets the SIZE="" attribute @param hspace the SIZE="" attribute */ public HR setSize(String size) { addAttribute("size",size); return this; } /** Sets the SIZE="" attribute @param hspace the SIZE="" attribute */ public HR setSize(int size) { addAttribute("size",Integer.toString(size)); return this; } /** Sets the noshade @param shade true or false */ public HR setNoShade(boolean shade) { if ( shade == true ) addAttribute("noshade", NO_ATTRIBUTE_VALUE); else removeAttribute("noshade"); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public HR addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public HR addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public HR addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public HR addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public HR removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/Em.java0000644000175000017500000001737507703353441021716 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <EM> tag. @version $Id: Em.java,v 1.4 2003/04/27 09:22:57 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class Em extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("em"); } /** Basic constructor. */ public Em() { } /** Basic constructor. @param element Adds an Element to the element. */ public Em(Element element) { addElement(element); } /** Basic constructor. @param element Adds an Element to the element. */ public Em(String element) { addElement(element); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Em addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public Em addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Em addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public Em addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public Em removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/html/H1.java0000644000175000017500000001766107703353440021622 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.html; import org.apache.ecs.*; /** This class creates a <H1> tag. @version $Id: H1.java,v 1.4 2003/04/27 09:04:02 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public class H1 extends MultiPartElement implements Printable, MouseEvents, KeyEvents { /** Private initialization routine. */ { setElementType("h1"); } /** Basic constructor. You need to set the attributes using the set* methods. */ public H1() { } /** Use the set* methods to set the values of the attributes. @param element set the value of <H1>value</H1> */ public H1(Element element) { addElement(element); } /** Use the set* methods to set the values of the attributes. @param value set the value of <H1>value</H1> */ public H1(String value) { addElement(value); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H1 addElement(String hashcode,Element element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param hashcode name of element for hash table @param element Adds an Element to the element. */ public H1 addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H1 addElement(Element element) { addElementToRegistry(element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ public H1 addElement(String element) { addElementToRegistry(element); return(this); } /** Removes an Element from the element. @param hashcode the name of the element to be removed. */ public H1 removeElement(String hashcode) { removeElementFromRegistry(hashcode); return(this); } /** The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnClick(String script) { addAttribute ( "onClick", script ); } /** The ondblclick event occurs when the pointing device button is double clicked over an element. This attribute may be used with most elements. @param The script */ public void setOnDblClick(String script) { addAttribute ( "onDblClick", script ); } /** The onmousedown event occurs when the pointing device button is pressed over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseDown(String script) { addAttribute ( "onMouseDown", script ); } /** The onmouseup event occurs when the pointing device button is released over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseUp(String script) { addAttribute ( "onMouseUp", script ); } /** The onmouseover event occurs when the pointing device is moved onto an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOver(String script) { addAttribute ( "onMouseOver", script ); } /** The onmousemove event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. @param The script */ public void setOnMouseMove(String script) { addAttribute ( "onMouseMove", script ); } /** The onmouseout event occurs when the pointing device is moved away from an element. This attribute may be used with most elements. @param The script */ public void setOnMouseOut(String script) { addAttribute ( "onMouseOut", script ); } /** The onkeypress event occurs when a key is pressed and released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyPress(String script) { addAttribute ( "onKeyPress", script ); } /** The onkeydown event occurs when a key is pressed down over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyDown(String script) { addAttribute ( "onKeyDown", script ); } /** The onkeyup event occurs when a key is released over an element. This attribute may be used with most elements. @param The script */ public void setOnKeyUp(String script) { addAttribute ( "onKeyUp", script ); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/0000755000175000017500000000000011126246123020507 5ustar killerkillerjakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/VXMLDocument.java0000644000175000017500000000727207703353440023656 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; import java.io.Serializable; import java.io.OutputStream; import java.io.PrintWriter; import java.util.*; import org.apache.ecs.xml.XMLDocument; /** * VXMLDocument * * This is the container for XML elements that can be used similar to * org.apache.ecs.Document. However, it correctly handles XML elements * and doesn't have any notion of a head, body, etc., that is associated * with HTML documents. * * @author Carol Jones */ public class VXMLDocument extends XMLDocument { /** Default Version */ private static final float DEFAULT_VXML_VERSION = 1.0f; /** * This sets the document up. Since an XML document can be * pretty much anything you want, all it does is create an * XML Instruction for the default version and sets the * document to be standalone. */ public VXMLDocument() { super(DEFAULT_VXML_VERSION, true); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Block.java0000644000175000017500000001000407703353440022406 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the block element @author Written by Carol Jones */ public class Block extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Block() { super("block"); } /** This constructor creates a <block> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute */ public Block(String name, String expr, String cond) { this(); setName(name); setExpr(expr); setCond(cond); } /** This constructor creates a <block> tag. @param name the name="" attribute */ public Block(String name) { this(); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Block setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Block setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Block setCond(String cond) { addAttribute("cond", cond); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Submit.java0000644000175000017500000001403407703353440022626 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the submit element @author Written by Carol Jones */ public class Submit extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Submit() { super("submit"); } /** This constructor creates a <submit> tag. @param next the next="" attribute */ public Submit(String next) { this(); setNext(next); } /** This constructor creates a <submit> tag. @param next the next="" attribute @param namelist the namelist="" attribute */ public Submit(String next, String namelist) { this(); setNext(next); setNamelist(namelist); } /** This constructor creates a <submit> tag. @param next the next="" attribute @param method the method="" attribute @param namelist the namelist="" attribute */ public Submit(String next, String method, String namelist) { this(); setNext(next); setMethod(method); setNamelist(namelist); } /** This constructor creates a <submit> tag. @param next the next="" attribute @param method the method="" attribute @param namelist the namelist="" attribute @param fetchtimeout the fetchtimeout="" attribute @param fetchaudio the fetchaudio="" attribute */ public Submit(String next, String method, String namelist, String fetchtimeout, String fetchaudio) { this(); setNext(next); setMethod(method); setNamelist(namelist); setFetchtimeout(fetchtimeout); setFetchaudio(fetchaudio); } /** Sets the next="" attribute @param next the next="" attribute */ public Submit setNext(String next) { addAttribute("next", next); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Submit setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the namelist="" attribute @param namelist the namelist="" attribute */ public Submit setNamelist(String namelist) { addAttribute("namelist", namelist); return this; } /** Sets the method="" attribute @param method the method="" method */ public Submit setMethod(String method) { addAttribute("method", method); return this; } /** Sets the enctype="" attribute @param enctype the enctype="" method */ public Submit setEnctype(String enctype) { addAttribute("enctype", enctype); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Submit setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Submit setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Submit setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Submit setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Break.java0000644000175000017500000000710607703353440022411 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the break element @author Written by Carol Jones */ public class Break extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Break() { super("break"); } /** This constructor creates a <break> tag. @param size the size="" attribute */ public Break(String size) { this(); setSize(size); } /** Sets the msecs="" attribute @param msecs the msecs="" attribute */ public Break setMsecs(String msecs) { addAttribute("msecs", msecs); return this; } /** Sets the size="" attribute @param size the size="" attribute */ public Break setSize(String size) { addAttribute("size", size); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Property.java0000644000175000017500000001746407703353440023221 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the property element @author Written by Carol Jones */ public class Property extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Property() { super("property"); } /** Sets the confidencelevel="" attribute @param confidencelevel the confidencelevel="" attribute */ public Property setConfidencelevel(String confidencelevel) { addAttribute("name", "confidencelevel"); addAttribute("value", confidencelevel); return this; } /** Sets the sensitivity="" attribute @param sensitivity the sensitivity="" attribute */ public Property setSensitivity(String sensitivity) { addAttribute("name", "sensitivity"); addAttribute("value", sensitivity); return this; } /** Sets the speedvsaccuracy="" attribute @param speedvsaccuracy the speedvsaccuracy="" attribute */ public Property setSpeedvsaccuracy(String speedvsaccuracy) { addAttribute("name", "speedvsaccuracy"); addAttribute("value", speedvsaccuracy); return this; } /** Sets the completetimeout="" attribute @param completetimeout the completetimeout="" attribute */ public Property setCompletetimeout(String completetimeout) { addAttribute("name", "completetimeout"); addAttribute("value", completetimeout); return this; } /** Sets the incompletetimeout="" attribute @param incompletetimeout the incompletetimeout="" attribute */ public Property setIncompletetimeout(String incompletetimeout) { addAttribute("name", "incompletetimeout"); addAttribute("value", incompletetimeout); return this; } /** Sets the interdigittimeout="" attribute @param interdigittimeout the interdigittimeout="" attribute */ public Property setInterdigittimeout(String interdigittimeout) { addAttribute("name", "interdigittimeout"); addAttribute("value", interdigittimeout); return this; } /** Sets the termtimeout="" attribute @param termtimeout the termtimeout="" attribute */ public Property setTermtimeout(String termtimeout) { addAttribute("name", "termtimeout"); addAttribute("value", termtimeout); return this; } /** Sets the termchar="" attribute @param termchar the termchar="" attribute */ public Property setTermchar(String termchar) { addAttribute("name", "termchar"); addAttribute("value", termchar); return this; } /** Sets the bargein="" attribute @param bargein the bargein="" attribute */ public Property setBargein(String bargein) { addAttribute("name", "bargein"); addAttribute("value", bargein); return this; } /** Sets the timeout="" attribute @param timeout the timeout="" attribute */ public Property setTimeout(String timeout) { addAttribute("name", "timeout"); addAttribute("value", timeout); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Property setCaching(String caching) { addAttribute("name", "caching"); addAttribute("value", caching); return this; } /** Sets the audiofetchhint="" attribute @param audiofetchhint the audiofetchhint="" attribute */ public Property setAudiofetchhint(String audiofetchhint) { addAttribute("name", "audiofetchhint"); addAttribute("value", audiofetchhint); return this; } /** Sets the documentfetchhint="" attribute @param documentfetchhint the documentfetchhint="" attribute */ public Property setDocumentfetchhint(String documentfetchhint) { addAttribute("name", "documentfetchhint"); addAttribute("value", documentfetchhint); return this; } /** Sets the grammarfetchint="" attribute @param grammarfetchint the grammarfetchint="" attribute */ public Property setGrammarfetchint(String grammarfetchint) { addAttribute("name", "grammarfetchint"); addAttribute("value", grammarfetchint); return this; } /** Sets the objectfetchint="" attribute @param objectfetchint the objectfetchint="" attribute */ public Property setObjectfetchint(String objectfetchint) { addAttribute("name", "objectfetchint"); addAttribute("value", objectfetchint); return this; } /** Sets the scriptfetchhint="" attribute @param scriptfetchhint the scriptfetchhint="" attribute */ public Property setScriptfetchhint(String scriptfetchhint) { addAttribute("name", "scriptfetchhint"); addAttribute("value", scriptfetchhint); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Property setFetchaudio(String fetchaudio) { addAttribute("name", "fetchaudio"); addAttribute("value", fetchaudio); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Property setFetchtimeout(String fetchtimeout) { addAttribute("name", "fetchtimeout"); addAttribute("value", fetchtimeout); return this; } /** Sets the inputmodes="" attribute @param inputmodes the inputmodes="" attribute */ public Property setInputmodes(String inputmodes) { addAttribute("name", "inputmodes"); addAttribute("value", inputmodes); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Audio.java0000644000175000017500000001063207703353440022424 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the audio element @author Written by Carol Jones */ public class Audio extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Audio() { super("audio"); } /** This constructor creates a <audio> tag. @param src the src="" attribute @param caching the caching="" attribute @param fetchtimeout the fetchtimeout="" attribute @param fetchint the fetchint="" attribute */ public Audio(String src, String caching, String fetchtimeout, String fetchint) { this(); setSrc(src); setCaching(caching); setFetchtimeout(fetchtimeout); setFetchint(fetchint); } /** This constructor creates a <audio> tag. @param src the src="" attribute */ public Audio(String src) { this(); setSrc(src); } /** Sets the src="" attribute @param src the src="" attribute */ public Audio setSrc(String src) { addAttribute("src", src); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Audio setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Audio setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Audio setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Vxml.java0000644000175000017500000001121007703353440022302 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the vxml element @author Written by Carol Jones */ public class Vxml extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Vxml() { super("vxml"); } /** This constructor creates a <vxml> tag. @param version the version="" attribute @param base the base="" attribute @param lang the lang="" attribute @param application the application="" attribute */ public Vxml(String version, String base, String lang, String application) { this(); setVersion(version); setBase(base); set_Lang(lang); setApplication(application); } /** This constructor creates a <vxml> tag. @param version the version="" attribute */ public Vxml(String version) { this(); setVersion(version); } /** This constructor creates a <vxml> tag. @param version the version="" attribute @param application the application="" attribute */ public Vxml(String version, String application) { this(); setVersion(version); setApplication(application); } /** Sets the version="" attribute @param version the version="" attribute */ public Vxml setVersion(String version) { addAttribute("version", version); return this; } /** Sets the base="" attribute @param base the base="" attribute */ public Vxml setBase(String base) { addAttribute("base", base); return this; } /** Sets the lang="" attribute @param lang the lang="" attribute */ public Vxml set_Lang(String lang) { addAttribute("lang", lang); return this; } /** Sets the application="" attribute @param application the application="" attribute */ public Vxml setApplication(String application) { addAttribute("application", application); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Div.java0000644000175000017500000000654407703353440022114 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the div element @author Written by Carol Jones */ public class Div extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Div() { super("div"); } /** This constructor creates a <div> tag. @param t the type="" attribute */ public Div(String t) { this(); setType(t); } /** Sets the type="" attribute @param t the type="" attribute */ public Div setType(String t) { addAttribute("type", t); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Dtmf.java0000644000175000017500000001207307703353440022256 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the dtmf element @author Written by Carol Jones */ public class Dtmf extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Dtmf() { super("dtmf"); } /** This constructor creates a <dtmf> tag. @param src the src="" attribute @param scope the scope="" attribute @param t the type="" attribute @param caching the caching="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Dtmf(String src, String scope, String t, String caching, String fetchint, String fetchtimeout) { this(); setSrc(src); setScope(scope); setType(t); setCaching(caching); setFetchint(fetchint); setFetchtimeout(fetchtimeout); } /** This constructor creates a <dtmf> tag. @param t the type="" attribute */ public Dtmf(String t) { this(); setType(t); } /** This constructor creates a <dtmf> tag. @param src the src="" attribute @param t the type="" attribute */ public Dtmf(String src, String t) { this(); setSrc(src); setType(t); } /** Sets the src="" attribute @param src the src="" attribute */ public Dtmf setSrc(String src) { addAttribute("src", src); return this; } /** Sets the scope="" attribute @param scope the scope="" attribute */ public Dtmf setScope(String scope) { addAttribute("scope", scope); return this; } /** Sets the type="" attribute @param t the type="" attribute */ public Dtmf setType(String t) { addAttribute("type", t); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Dtmf setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Dtmf setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Dtmf setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Elseif.java0000644000175000017500000000662307703353441022600 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the elseif element @author Written by Carol Jones */ public class Elseif extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Elseif() { super("elseif"); } /** This constructor creates a <elseif> tag. @param cond the cond="" attribute */ public Elseif(String cond) { this(); setCond(cond); } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Elseif setCond(String cond) { addAttribute("cond", cond); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Var.java0000644000175000017500000000741107703353440022114 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the var element @author Written by Carol Jones */ public class Var extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Var() { super("var"); } /** This constructor creates a <var> tag. @param name the name="" attribute @param expr the expr="" attribute */ public Var(String name, String expr) { this(); setName(name); setExpr(expr); } /** This constructor creates a <var> tag. @param name the name="" attribute */ public Var(String name) { this(); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Var setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Var setExpr(String expr) { addAttribute("expr", expr); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Else.java0000644000175000017500000000604207703353440022253 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the else element @author Written by Carol Jones */ public class Else extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Else() { super("else"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Throw.java0000644000175000017500000000662707703353440022477 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the throw element @author Written by Carol Jones */ public class Throw extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Throw() { super("throw"); } /** This constructor creates a <throw> tag. @param event the event="" attribute */ public Throw(String event) { this(); setEvent(event); } /** Sets the event="" attribute @param event the name="" attribute */ public Throw setEvent(String event) { addAttribute("event", event); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/TestBed1.java0000644000175000017500000001710207703353440022775 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class contains some simple tests of the vxml generation package @author Written by Carol Jones */ public class TestBed1 { public void HelloWorldTest() { System.out.println("\nHelloWorld.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form(); Block block = new Block(); block.addElement("Hello World!"); form.addElement(block); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void DrinkTest() { System.out.println("\nDrink.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form(); Field field = new Field("drink"); Prompt prompt = new Prompt(); prompt.addElement("Would you like coffee, tea, milk, or nothing?"); Grammar grammar = new Grammar("drink.gram", "application/x-jsgf"); Block block = new Block(); block.addElement(new Submit("http://www.drink.example/drink2.asp")); field.addElement(prompt); field.addElement(grammar); form.addElement(field); form.addElement(block); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void MetaTest() { System.out.println("\nMeta.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); vxml.addElement(new Meta().setAuthor("John Doe")); vxml.addElement(new Meta().setMaintainer("hello-support@hi.example")); vxml.addElement(new Var("hi", "'Hello World!'")); Form form = new Form(); Block block = new Block(); block.addElement(new Value("hi")); block.addElement(new Goto("#say_goodbye")); form.addElement(block); vxml.addElement(form); Form form2 = new Form("say_goodbye"); Block block2 = new Block(); block2.addElement("Goodbye!"); form2.addElement(block2); vxml.addElement(form2); doc.addElement(vxml); System.out.println(doc.toString()); } public void LinkTest() { System.out.println("\nLink.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Var var = new Var("bye", "'Ciao'"); Link link = new Link(); link.setNext("operator_xfer.vxml"); Grammar grammar = new Grammar(); grammar.addElement(" operator "); link.addElement(grammar); vxml.addElement(var); vxml.addElement(link); doc.addElement(vxml); System.out.println(doc.toString()); } public void ExitTest() { System.out.println("\nExit.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form("say_goodbye"); Field field = new Field("answer", "boolean"); Prompt prompt = new Prompt(); prompt.addElement("Shall we say "); prompt.addElement(new Value("application.bye")); Filled filled = new Filled(); If iftag = new If("answer"); iftag.addElement(new Exit()); filled.addElement(iftag); filled.addElement(new Clear("answer")); field.addElement(prompt); field.addElement(filled); form.addElement(field); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void FilledTest() { System.out.println("\nFilled.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form("billing_adjustment"); Var var1 = new Var("account_number"); Var var2 = new Var("home_phone"); Subdialog sub = new Subdialog(); sub.setName("accountinfo"); sub.setSrc("acct_info.vxml#basic"); Filled filled = new Filled(); filled.addElement (new Assign("account_number", "accountinfo.acctnum")); filled.addElement (new Assign("home_phone", "accountinfo.acctphone")); sub.addElement(filled); Field field = new Field(); field.setName("adjustment_amount"); field.setType("currency"); Prompt prompt = new Prompt(" What is the value of your account adjustment?"); Filled filled2 = new Filled(); filled2.addElement(new Submit("/cgi-bin/updateaccount")); field.addElement(prompt); field.addElement(filled2); form.addElement(var1); form.addElement(var2); form.addElement(sub); form.addElement(field); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void ReturnTest() { System.out.println("\nReturn.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form("basic"); form.addElement( new Field("acctnum", "digits").addElement( new Prompt(" What is your account number?"))); Field field = new Field("acctphone", "phone"); field.addElement(new Prompt(" What is your home telephone number?")); Filled filled = new Filled(); filled.addElement(new Return("acctnum acctphone")); field.addElement(filled); form.addElement(field); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public static void main(String[] args) { TestBed1 tb = new TestBed1(); tb.HelloWorldTest(); tb.DrinkTest(); tb.MetaTest(); tb.LinkTest(); tb.ExitTest(); tb.FilledTest(); tb.ReturnTest(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Form.java0000644000175000017500000000736507703353441022300 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the form element @author Written by Carol Jones */ public class Form extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Form() { super("form"); } /** This constructor creates a <form> tag. @param name the id="" attribute @param expr the scope"" attribute */ public Form(String id, String scope) { this(); setId(id); setScope(scope); } /** This constructor creates a <form> tag. @param name the id="" attribute */ public Form(String id) { this(); setId(id); } /** Sets the id="" attribute @param id the id="" attribute */ public Form setId(String id) { addAttribute("id", id); return this; } /** Sets the scope="" attribute @param scope the scope="" attribute */ public Form setScope(String scope) { addAttribute("scope", scope); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Grammar.java0000644000175000017500000001214607703353441022754 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the grammar element @author Written by Carol Jones */ public class Grammar extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Grammar() { super("grammar"); } /** This constructor creates a <grammar> tag. @param src the src="" attribute @param scope the scope="" attribute @param t the type="" attribute @param caching the caching="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Grammar(String src, String scope, String t, String caching, String fetchint, String fetchtimeout) { this(); setSrc(src); setScope(scope); setType(t); setCaching(caching); setFetchint(fetchint); setFetchtimeout(fetchtimeout); } /** This constructor creates a <grammar> tag. @param t the type="" attribute */ public Grammar(String t) { this(); setType(t); } /** This constructor creates a <grammar> tag. @param src the src="" attribute @param t the type="" attribute */ public Grammar(String src, String t) { this(); setSrc(src); setType(t); } /** Sets the src="" attribute @param src the src="" attribute */ public Grammar setSrc(String src) { addAttribute("src", src); return this; } /** Sets the scope="" attribute @param scope the scope="" attribute */ public Grammar setScope(String scope) { addAttribute("scope", scope); return this; } /** Sets the type="" attribute @param t the type="" attribute */ public Grammar setType(String t) { addAttribute("type", t); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Grammar setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Grammar setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Grammar setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Sayas.java0000644000175000017500000000744107703353441022450 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the sayas element @author Written by Carol Jones */ public class Sayas extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Sayas() { super("sayas"); } /** This constructor creates a <sayas> tag. @param c the class="" attribute @param thePhrase the phrase to say */ public Sayas(String c, String thePhrase) { this(); set_Class(c); addElement(thePhrase); } /** Sets the phon="" attribute @param phon the phon="" attribute */ public Sayas setPhon(String phon) { addAttribute("phon", phon); return this; } /** Sets the sub="" attribute @param sub the sub="" attribute */ public Sayas setSub(String sub) { addAttribute("sub", sub); return this; } /** Sets the class="" attribute @param class the class="" attribute */ public Sayas set_Class(String c) { addAttribute("class", c); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Record.java0000644000175000017500000001173607703353440022607 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the record element @author Written by Carol Jones */ public class Record extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Record() { super("record"); } /** This constructor creates a <record> tag. @param name the name="" attribute @param expr the expr="" attribute */ public Record(String name, String expr) { this(); setName(name); setExpr(expr); } /** This constructor creates a <record> tag. @param name the name="" attribute */ public Record(String name) { this(); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Record setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Record setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Record setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the modal="" attribute @param modal the modal="" attribute */ public Record setModal(String modal) { addAttribute("modal", modal); return this; } /** Sets the beep="" attribute @param beep the beep="" attribute */ public Record setBeep(String beep) { addAttribute("beep", beep); return this; } /** Sets the maxtime="" attribute @param maxtime the maxtime="" attribute */ public Record setMaxtime(String maxtime) { addAttribute("maxtime", maxtime); return this; } /** Sets the finalsilence="" attribute @param finalsilence the finalsilence="" attribute */ public Record setFinalsilence(String finalsilence) { addAttribute("finalsilence", finalsilence); return this; } /** Sets the dtmfterm="" attribute @param dtmfterm the dtmfterm="" attribute */ public Record setDtmfterm(String dtmfterm) { addAttribute("dtmfterm", dtmfterm); return this; } /** Sets the type="" attribute @param type the type="" attribute */ public Record setType(String t) { addAttribute("type", t); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Link.java0000644000175000017500000001056607703353440022266 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the link element @author Written by Carol Jones */ public class Link extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Link() { super("link"); } /** Sets the next="" attribute @param next the next="" attribute */ public Link setNext(String next) { addAttribute("next", next); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Link setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the event="" attribute @param event the event="" attribute */ public Link setEvent(String event) { addAttribute("event", event); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Link setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Link setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Link setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Link setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Meta.java0000644000175000017500000001034407703353440022251 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the meta element @author Written by Carol Jones */ public class Meta extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Meta() { super("meta"); } /** Sets the author="" attribute @param author the author="" attribute */ public Meta setAuthor(String author) { addAttribute("author", author); return this; } /** Sets the copyright="" attribute @param copyright the copyright="" attribute */ public Meta setCopyright(String copyright) { addAttribute("copyright", copyright); return this; } /** Sets the description="" attribute @param description the description="" attribute */ public Meta setDescription(String description) { addAttribute("description", description); return this; } /** Sets the keywords="" attribute @param keywords the keywords="" attribute */ public Meta setKeywords(String keywords) { addAttribute("keywords", keywords); return this; } /** Sets the maintainer="" attribute @param maintainer the maintainer="" attribute */ public Meta setMaintainer(String maintainer) { addAttribute("maintainer", maintainer); return this; } /** Sets the robots="" attribute @param robots the robots="" attribute */ public Meta setRobots(String robots) { addAttribute("robots", robots); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Noinput.java0000644000175000017500000000635507703353440023026 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the noinput element @author Written by Carol Jones */ public class Noinput extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Noinput() { super("noinput"); } /** This constructor creates a <noinput> tag. @param theMessage the message to say */ public Noinput(String theMessage) { this(); addElement(theMessage); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Goto.java0000644000175000017500000001137007703353440022273 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the goto element @author Written by Carol Jones */ public class Goto extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Goto() { super("goto"); } /** This constructor creates a <goto> tag. @param next the next="" attribute */ public Goto(String next) { this(); setNext(next); } /** Sets the next="" attribute @param next the next="" attribute */ public Goto setNext(String next) { addAttribute("next", next); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Goto setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the nextitem="" attribute @param nextitem the nextitem="" attribute */ public Goto setNextitem(String nextitem) { addAttribute("nextitem", nextitem); return this; } /** Sets the expritem="" attribute @param expritem the expritem="" attribute */ public Goto setExpritem(String expritem) { addAttribute("expritem", expritem); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Goto setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Goto setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Goto setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Goto setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Menu.java0000644000175000017500000000776007703353440022277 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the menu element @author Written by Carol Jones */ public class Menu extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Menu() { super("menu"); } /** This constructor creates a <menu> tag. @param name the id="" attribute @param expr the scope="" attribute @param expr the dtmf="" attribute */ public Menu(String id, String scope, String dtmf) { this(); setId(id); setScope(scope); setDtmf(dtmf); } /** This constructor creates a <menu> tag. @param dtmf the dtmf="" attribute */ public Menu(String dtmf) { this(); setDtmf(dtmf); } /** Sets the id="" attribute @param id the name="" attribute */ public Menu setId(String id) { addAttribute("id", id); return this; } /** Sets the scope="" attribute @param scope the scope="" attribute */ public Menu setScope(String scope) { addAttribute("scope", scope); return this; } /** Sets the dtmf="" attribute @param dtmf the dtmf="" attribute */ public Menu setDtmf(String dtmf) { addAttribute("dtmf", dtmf); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Initial.java0000644000175000017500000001004007703353441022746 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the initial element @author Written by Carol Jones */ public class Initial extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Initial() { super("initial"); } /** This constructor creates a <initial> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute */ public Initial(String name, String expr, String cond) { this(); setName(name); setExpr(expr); setCond(cond); } /** This constructor creates a <initial> tag. @param name the name="" attribute */ public Initial(String name) { this(); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Initial setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Initial setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Initial setCond(String cond) { addAttribute("cond", cond); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Subdialog.java0000644000175000017500000001537007703353440023300 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the subdialog element @author Written by Carol Jones */ public class Subdialog extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Subdialog() { super("subdialog"); } /** This constructor creates a <subdialog> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute @param modal the modal="" attribute @param namelist the namelist="" attribute @param src the src="" attribute @param method the method="" attribute @param enctype the enctype="" attribute @param caching the caching="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute @param fetchaudio the fetchaudio="" attribute */ public Subdialog(String name, String expr, String cond, String modal, String namelist, String src, String method, String enctype, String caching, String fetchint, String fetchtimeout, String fetchaudio) { this(); setName(name); setExpr(expr); setCond(cond); setModal(modal); setNamelist(namelist); setSrc(src); setMethod(method); setEnctype(enctype); setCaching(caching); setFetchint(fetchint); setFetchtimeout(fetchtimeout); setFetchaudio(fetchaudio); } /** This constructor creates a <subdialog> tag. @param name the name="" attribute @param namelist the namelist="" attribute @param src the src="" attribute @param method the method="" attribute */ public Subdialog(String name, String namelist, String src, String method) { this(); setName(name); setNamelist(namelist); setSrc(src); setMethod(method); } /** Sets the name="" attribute @param name the name="" attribute */ public Subdialog setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Subdialog setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Subdialog setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the modal="" attribute @param modal the modal="" attribute */ public Subdialog setModal(String modal) { addAttribute("modal", modal); return this; } /** Sets the namelist="" attribute @param namelist the namelist="" attribute */ public Subdialog setNamelist(String namelist) { addAttribute("namelist", namelist); return this; } /** Sets the src="" attribute @param src the src="" method */ public Subdialog setSrc(String src) { addAttribute("src", src); return this; } /** Sets the method="" attribute @param method the method="" method */ public Subdialog setMethod(String method) { addAttribute("method", method); return this; } /** Sets the enctype="" attribute @param enctype the enctype="" method */ public Subdialog setEnctype(String enctype) { addAttribute("enctype", enctype); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Subdialog setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Subdialog setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Subdialog setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Subdialog setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Prompt.java0000644000175000017500000001054207703353440022644 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the prompt element @author Written by Carol Jones */ public class Prompt extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Prompt() { super("prompt"); } /** This constructor creates a <prompt> tag. @param bargein the bargein="" attribute @param cond the cond="" attribute @param count the count="" attribute @param timeout the timeout="" attribute */ public Prompt(String bargein, String cond, String count, String timeout) { this(); setBargein(bargein); setCond(cond); setCount(count); setTimeout(timeout); } /** This constructor creates a <prompt> tag. @param thePrompt the prompt expression */ public Prompt(String thePrompt) { this(); addElement(thePrompt); } /** Sets the bargein="" attribute @param bargein the bargein="" attribute */ public Prompt setBargein(String bargein) { addAttribute("bargein", bargein); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Prompt setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the count="" attribute @param count the count="" attribute */ public Prompt setCount(String count) { addAttribute("count", count); return this; } /** Sets the timeout="" attribute @param timeout the timeout="" attribute */ public Prompt setTimeout(String timeout) { addAttribute("timeout", timeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Value.java0000644000175000017500000001040007703353441022431 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the value element @author Written by Carol Jones */ public class Value extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Value() { super("value"); } /** This constructor creates a <value> tag. @param expr the expr="" attribute @param c the class="" attribute @param mode the mode="" attribute @param recsrc the recsrc="" attribute */ public Value(String expr, String c, String mode, String recsrc) { this(); setExpr(expr); set_Class(c); setMode(mode); setRecsrc(recsrc); } /** This constructor creates a <value> tag. @param expr the expr="" attribute */ public Value(String expr) { this(); setExpr(expr); } /** Sets the class="" attribute @param c the class="" attribute */ public Value set_Class(String c) { addAttribute("class", c); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Value setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the mode="" attribute @param mode the mode="" attribute */ public Value setMode(String mode) { addAttribute("mode", mode); return this; } /** Sets the recsrc="" attribute @param recsrc the recsrc="" attribute */ public Value setRecsrc(String recsrc) { addAttribute("recsrc", recsrc); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Choice.java0000644000175000017500000001326107703353440022556 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the choice element @author Written by Carol Jones */ public class Choice extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Choice() { super("choice"); } /** This constructor creates a <choice> tag. @param dtmf the dtmf="" attribute @param next the next="" attribute @param event the event="" attribute @param expr the expr="" attribute @param caching the caching="" attribute @param fetchaudio the fetchaudio="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Choice(String dtmf, String next, String event, String expr, String caching, String fetchaudio, String fetchint, String fetchtimeout) { this(); setDtmf(dtmf); setNext(next); setEvent(event); setExpr(expr); setCaching(caching); setFetchaudio(fetchaudio); setFetchint(fetchint); setFetchtimeout(fetchtimeout); } /** This constructor creates a <choice> tag. @param next the next="" attribute */ public Choice(String next) { this(); setNext(next); } /** This constructor creates a <choice> tag. @param dtmf the dtmf="" attribute @param next the next="" attribute */ public Choice(String dtmf, String next) { this(); setDtmf(dtmf); setNext(next); } /** Sets the dtmf="" attribute @param dtmf the dtmf="" attribute */ public Choice setDtmf(String dtmf) { addAttribute("dtmf", dtmf); return this; } /** Sets the next="" attribute @param next the next="" attribute */ public Choice setNext(String next) { addAttribute("next", next); return this; } /** Sets the event="" attribute @param event the event="" attribute */ public Choice setEvent(String event) { addAttribute("event", event); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Choice setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Choice setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public Choice setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Choice setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Choice setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/TestBed3.java0000644000175000017500000001265607703353441023011 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class contains some simple tests of the vxml generation package @author Written by Carol Jones */ public class TestBed3 { public void EmptyElements() { System.out.println("\nEmptyElements.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); vxml.addElement(new Block()); vxml.addElement(new Reprompt()); vxml.addElement(new Disconnect()); doc.addElement(vxml); System.out.println(doc.toString()); } public void MiscElements() { System.out.println("\nMiscElements.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Initial init = new Initial("bypass_init"); init.addElement(new Audio("hello.wav")); init.addElement(new Break("medium")); vxml.addElement(init); Dtmf dtmf = new Dtmf("application/x-jsgf"); dtmf.addElement("1 {van} | 2 {choc} | 3 {straw}"); vxml.addElement(dtmf); vxml.addElement(new Div("sentence")); vxml.addElement(new Emp("Hello!")); vxml.addElement(new Sayas("currency", "$123.50")); vxml.addElement(new Noinput("I didn't hear anything, please try again")); vxml.addElement(new Nomatch("Nothing matched, try again.", "1")); vxml.addElement(new Error("An Error has occurred")); vxml.addElement(new Throw("nomatch")); org.apache.ecs.vxml.Object obj = new org.apache.ecs.vxml.Object(); obj.setName("debit"); obj.setClassid("method://credit_card/gather_and_debit"); obj.setData("http://www.recordings.example/prompts/credit/jesse.jar"); obj.addElement (new Param("amount", "document.amt")); obj.addElement (new Param("vendor", "vendor_num")); vxml.addElement(obj); doc.addElement(vxml); System.out.println(doc.toString()); } public void IfTest() { System.out.println("\nIfTest.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); If iftag = new If("city == 'LA'"); iftag.addElement(new Assign("city", "Los Angeles")); iftag.addElement(new Elseif("city == 'Philly'")); iftag.addElement(new Assign("city", "Philadelphia")); iftag.addElement(new Else()); iftag.addElement(new Assign("city", "Unknown")); vxml.addElement(iftag); doc.addElement(vxml); System.out.println(doc.toString()); } public void ScriptTest() { System.out.println("\nScript.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Script script = new Script(); script.addElement(""); vxml.addElement(script); doc.addElement(vxml); doc.output(System.out); } public static void main(String[] args) { TestBed3 tb = new TestBed3(); tb.EmptyElements(); tb.MiscElements(); tb.IfTest(); tb.ScriptTest(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Pros.java0000644000175000017500000000777207703353440022321 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the pros element @author Written by Carol Jones */ public class Pros extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Pros() { super("pros"); } /** This constructor creates a <pros> tag. @param rate the rate="" attribute @param vol the vol="" attribute */ public Pros(String rate, String vol, String pitch, String range) { this(); setRate(rate); setVol(vol); setPitch(pitch); setRange(range); } /** Sets the rate="" attribute @param rate the rate="" attribute */ public Pros setRate(String rate) { addAttribute("rate", rate); return this; } /** Sets the vol="" attribute @param vol the vol="" attribute */ public Pros setVol(String vol) { addAttribute("vol", vol); return this; } /** Sets the pitch="" attribute @param pitch the pitch="" attribute */ public Pros setPitch(String pitch) { addAttribute("pitch", pitch); return this; } /** Sets the range="" attribute @param range the range="" attribute */ public Pros setRange(String range) { addAttribute("range", range); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Param.java0000644000175000017500000001024107703353441022420 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the param element @author Written by Carol Jones */ public class Param extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Param() { super("param"); } /** This constructor creates a <param> tag. @param name the name="" attribute @param expr the expr="" attribute */ public Param(String name, String expr) { this(); setName(name); setExpr(expr); } /** Sets the name="" attribute @param name the name="" attribute */ public Param setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Param setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the value="" attribute @param value the value="" attribute */ public Param setValue(String value) { addAttribute("value", value); return this; } /** Sets the valuetype="" attribute @param valuetype the valuetype="" attribute */ public Param setValuetype(String valuetype) { addAttribute("valuetype", valuetype); return this; } /** Sets the type="" attribute @param t the type="" attribute */ public Param setType(String t) { addAttribute("type", t); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Exit.java0000644000175000017500000000605107703353440022274 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the exit element @author Written by Carol Jones */ public class Exit extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Exit() { super("exit"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Emp.java0000644000175000017500000000662507703353440022113 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the emp element @author Written by Carol Jones */ public class Emp extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Emp() { super("emp"); } /** This constructor creates a <emp> tag. @param name the phrase to emphasize */ public Emp(String thePhrase) { this(); addElement(thePhrase); } /** Sets the level="" attribute @param level the level="" attribute */ public Emp setLevel(String level) { addAttribute("level", level); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Help.java0000644000175000017500000000633407703353440022257 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the help element @author Written by Carol Jones */ public class Help extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Help() { super("help"); } /** This constructor creates a <help> tag. @param thePrompt the help expression */ public Help(String thePrompt) { this(); addElement(thePrompt); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Catch.java0000644000175000017500000001041607703353440022405 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the catch element @author Written by Carol Jones */ public class Catch extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Catch() { super("catch"); } /** This constructor creates a <catch> tag. @param event the event="" attribute @param count the count="" attribute @param cond the cond="" attribute */ public Catch(String event, String count, String cond) { this(); setEvent(event); setCount(count); setCond(cond); } /** This constructor creates a <catch> tag. @param event the event="" attribute */ public Catch(String event) { this(); setEvent(event); } /** This constructor creates a <catch> tag. @param event the event="" attribute @param count the count="" attribute */ public Catch(String event, String count) { this(); setEvent(event); setCount(count); } /** Sets the event="" attribute @param event the event="" attribute */ public Catch setEvent(String event) { addAttribute("event", event); return this; } /** Sets the count="" attribute @param count the count="" attribute */ public Catch setCount(String count) { addAttribute("count", count); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Catch setCond(String cond) { addAttribute("cond", cond); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Return.java0000644000175000017500000000760207703353440022645 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the return element @author Written by Carol Jones */ public class Return extends org.apache.ecs.xml.XML { /** Basic constructor. You need to set the attributes using the set* methods. */ public Return() { super("return"); } /** This constructor creates a <return> tag. @param event the event="" attribute @param namelist the namelist="" attribute */ public Return(String event, String namelist) { this(); setNamelist(namelist); setEvent(event); } /** This constructor creates a <return> tag. @param namelist the namelist="" attribute */ public Return(String namelist) { this(); setNamelist(namelist); } /** Sets the namelist="" attribute @param namelist the namelist="" attribute */ public Return setNamelist(String namelist) { addAttribute("namelist", namelist); return this; } /** Sets the event="" attribute @param event the event="" attribute */ public Return setEvent(String event) { addAttribute("event", event); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/VXMLElement.java0000644000175000017500000000647407703353440023474 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; import org.apache.ecs.xml.XML; /** This class creates a generic <> tag. @author Carol Jones */ public class VXMLElement extends XML { /** Default constructor */ public VXMLElement() { super("", true); } /** Construct a new XML element with this name. @param element_type The name of this element. */ public VXMLElement(String element_type) { super(element_type, true); } public boolean getNeedClosingTag() { return elements().hasMoreElements(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Clear.java0000644000175000017500000000667407703353440022424 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the clear element @author Written by Carol Jones */ public class Clear extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Clear() { super("clear"); } /** This constructor creates a <clear> tag. @param namelist the namelist="" attribute */ public Clear(String namelist) { this(); setNamelist(namelist); } /** Sets the namelist="" attribute @param namelist the namelist="" attribute */ public Clear setNamelist(String namelist) { addAttribute("namelist", namelist); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Transfer.java0000644000175000017500000001304207703353440023145 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the transfer element @author Written by Carol Jones */ public class Transfer extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Transfer() { super("transfer"); } /** This constructor creates a <transfer> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute @param dest the dest="" attribute @param destexpr the destexpr="" attribute @param bridge the bridge="" attribute @param connecttime the connecttime="" attribute @param maxtime the maxtime="" attribute */ public Transfer(String name, String expr, String cond, String dest, String destexpr, String bridge, String connecttime, String maxtime) { this(); setName(name); setExpr(expr); setCond(cond); setDest(dest); setDestexpr(destexpr); setBridge(bridge); setConnecttime(connecttime); setMaxtime(maxtime); } /** This constructor creates a <transfer> tag. @param name the name="" attribute @param dest the dest="" attribute @param bridge the bridge="" attribute */ public Transfer(String name, String dest, String bridge) { this(); setName(name); setDest(dest); setBridge(bridge); } /** Sets the name="" attribute @param name the name="" attribute */ public Transfer setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Transfer setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Transfer setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the dest="" attribute @param dest the dest="" attribute */ public Transfer setDest(String dest) { addAttribute("dest", dest); return this; } /** Sets the destexpr="" attribute @param destexpr the destexpr="" attribute */ public Transfer setDestexpr(String destexpr) { addAttribute("destexpr", destexpr); return this; } /** Sets the bridge="" attribute @param cond the bridge="" attribute */ public Transfer setBridge(String bridge) { addAttribute("bridge", bridge); return this; } /** Sets the connecttime="" attribute @param cond the connecttime="" attribute */ public Transfer setConnecttime(String connecttime) { addAttribute("connecttime", connecttime); return this; } /** Sets the maxtime="" attribute @param cond the maxtime="" attribute */ public Transfer setMaxtime(String maxtime) { addAttribute("maxtime", maxtime); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Nomatch.java0000644000175000017500000000723107703353440022755 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the nomatch element @author Written by Carol Jones */ public class Nomatch extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Nomatch() { super("nomatch"); } /** This constructor creates a <nomatch> tag. @param theMessage the message to say */ public Nomatch(String theMessage) { this(); addElement(theMessage); } /** This constructor creates a <nomatch> tag. @param theMessage the message to say @param count the count */ public Nomatch(String theMessage, String count) { this(); addElement(theMessage); setCount(count); } /** Sets the count="" attribute @param count the count="" attribute */ public Nomatch setCount(String count) { addAttribute("count", count); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/TestBed2.java0000644000175000017500000001571107703353440023002 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class contains some simple tests of the vxml generation package @author Written by Carol Jones */ public class TestBed2 { public void WeatherTest() { System.out.println("\nWeather.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form("weather_info"); Block block = new Block(); block.addElement("Welcome to the weather information service."); Field field = new Field("city"); Prompt prompt = new Prompt("What city?"); Grammar grammar = new Grammar("city.gram","application/x-jsgf"); Catch catchtag = new Catch("help"); catchtag.addElement("Please speak the city for which you want the weather."); field.addElement(prompt); field.addElement(grammar); field.addElement(catchtag); form.addElement(block); form.addElement(field); form.addElement(new Block().addElement(new Submit("/servlet/weather", "city"))); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void CreditCard() { System.out.println("\nCreditCard.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Form form = new Form("get_card_info"); Block block = new Block(); block.addElement("We now need your credit card type, number, and expiration date."); form.addElement(block); Field field = new Field("card_type"); Prompt prompt1 = new Prompt("What kind of credit card do you have?"); Prompt prompt2 = new Prompt("Type of card?"); prompt1.setBargein("false"); prompt1.setCount("1"); prompt2.setCount("2"); Grammar grammar = new Grammar(); grammar.addElement("visa {visa}"); grammar.addElement("| master [card] {mastercard}"); grammar.addElement("| amex {amex}"); grammar.addElement("| american [express] {amex}"); Help help = new Help("Please say Visa, Mastercard, or American Express."); field.addElement(prompt1); field.addElement(prompt2); field.addElement(grammar); field.addElement(help); form.addElement(field); vxml.addElement(form); doc.addElement(vxml); System.out.println(doc.toString()); } public void MenuTest() { System.out.println("\nMenuTest.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); Menu menu1 = new Menu(); Property prop = new Property(); prop.setInputmodes("dtmf"); menu1.addElement(prop); Prompt prompt = new Prompt("For sports press 1, For weather press 2, For Stargazer astrophysics press 3."); menu1.addElement(prompt); menu1.addElement(new Choice("1","http://www.sports.example/vxml/start.vxml")); menu1.addElement(new Choice("2","http://www.weather.example/intro.vxml")); menu1.addElement(new Choice("3","http://www.stargazer.example/voice/astronews.vxml")); vxml.addElement(menu1); Menu menu2 = new Menu("true"); menu2.addElement(prop); menu2.addElement(prompt); menu2.addElement(new Choice("http://www.sports.example/vxml/start.vxml")); menu2.addElement(new Choice("http://www.weather.example/intro.vxml")); menu2.addElement(new Choice("http://www.stargazer.example/voice/astronews.vxml")); vxml.addElement(menu2); Menu menu3 = new Menu("true"); Prompt prompt2 = new Prompt("Welcome Home"); Enumerate enum = new Enumerate(); enum.addElement("For "); enum.addElement(new Value("_prompt")); enum.addElement(", press "); enum.addElement(new Value("_dtmf")); prompt2.addElement(enum); menu3.addElement(prompt2); Choice choice1 = new Choice("http://www.sports.example/vxml/start.vxml"); Choice choice2 = new Choice("http://www.weather.example/intro.vxml"); Choice choice3 = new Choice("http://www.stargazer.example/voice/astronews.vxml"); choice1.addElement("sports"); choice2.addElement("weather"); choice3.addElement("Stargazer astrophysics news"); menu3.addElement(choice1); menu3.addElement(choice2); menu3.addElement(choice3); vxml.addElement(menu3); System.out.println(vxml.toString()); } public void RepromptTest() { System.out.println("\nRepromptTest.vxml"); VXMLDocument doc = new VXMLDocument(); Vxml vxml = new Vxml("1.0"); vxml.addElement(new Reprompt()); doc.addElement(vxml); System.out.println(doc.toString()); } public static void main(String[] args) { TestBed2 tb = new TestBed2(); tb.WeatherTest(); tb.CreditCard(); tb.MenuTest(); tb.RepromptTest(); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Filled.java0000644000175000017500000000725107703353440022565 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the filled element @author Written by Carol Jones */ public class Filled extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Filled() { super("filled"); } /** This constructor creates a <filled> tag. @param name the namelist="" attribute @param expr the mode="" attribute */ public Filled(String namelist, String mode) { this(); setNamelist(namelist); setMode(mode); } /** Sets the namelist="" attribute @param namelist the namelist="" attribute */ public Filled setNamelist(String namelist) { addAttribute("namelist", namelist); return this; } /** Sets the mode="" attribute @param mode the mode="" attribute */ public Filled setMode(String mode) { addAttribute("mode", mode); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Field.java0000644000175000017500000001166507703353440022415 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the field element @author Written by Carol Jones */ public class Field extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Field() { super("field"); } /** This constructor creates a <field> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute @param t the type="" attribute @param slot the slot="" attribute @param modal the modal="" attribute */ public Field(String name, String expr, String cond, String t, String slot, String modal) { this(); setName(name); setExpr(expr); setCond(cond); setType(t); setSlot(slot); setModal(modal); } /** This constructor creates a <field> tag. @param name the name="" attribute */ public Field(String name) { this(); setName(name); } /** This constructor creates a <field> tag. @param name the name="" attribute @param t the type="" attribute */ public Field(String name, String t) { this(); setName(name); setType(t); } /** Sets the name="" attribute @param name the name="" attribute */ public Field setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Field setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public Field setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the type="" attribute @param t the type="" attribute */ public Field setType(String type) { addAttribute("type", type); return this; } /** Sets the slot="" attribute @param slot the slot="" attribute */ public Field setSlot(String slot) { addAttribute("slot", slot); return this; } /** Sets the modal="" attribute @param modal the modal="" attribute */ public Field setModal(String modal) { addAttribute("modal", modal); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Script.java0000644000175000017500000001102207703353441022622 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the script element @author Written by Carol Jones */ public class Script extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Script() { super("script"); } /** This constructor creates a <script> tag. @param src the src="" attribute @param charset the charset="" attribute @param caching the caching="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Script(String src, String charset, String caching, String fetchint, String fetchtimeout) { this(); setSrc(src); setCharset(charset); setCaching(caching); setFetchint(fetchint); setFetchtimeout(fetchtimeout); } /** Sets the src="" attribute @param src the src="" attribute */ public Script setSrc(String src) { addAttribute("src", src); return this; } /** Sets the charset="" attribute @param charset the charset="" attribute */ public Script setCharset(String charset) { addAttribute("charset", charset); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public Script setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public Script setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Script setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Enumerate.java0000644000175000017500000000607207703353440023313 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the enumerate element @author Written by Carol Jones */ public class Enumerate extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Enumerate() { super("enumerate"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Object.java0000644000175000017500000001660607703353440022600 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the object element @author Written by Carol Jones */ public class Object extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Object() { super("object"); } /** This constructor creates a <object> tag. @param name the name="" attribute @param expr the expr="" attribute @param cond the cond="" attribute @param classid the classid="" attribute @param codebase the codebase="" attribute @param codetype the codetype="" attribute @param data the data="" attribute @param t the type="" attribute @param archive the archive="" attribute @param caching the caching="" attribute @param fetchaudio the fetchaudio="" attribute @param fetchint the fetchint="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public Object(String name, String expr, String cond, String classid, String codebase, String codetype, String data, String t, String archive, String caching, String fetchaudio, String fetchint, String fetchtimeout) { this(); setName(name); setExpr(expr); setCond(cond); setClassid(classid); setCodebase(codebase); setCodetype(codetype); setData(data); setType(t); setArchive(archive); setCaching(caching); setFetchaudio(fetchaudio); setFetchint(fetchint); setFetchtimeout(fetchtimeout); } /** This constructor creates a <object> tag. @param name the name="" attribute @param classid the classid="" attribute @param data the data="" attribute */ public Object(String name, String classid, String data) { this(); setName(name); setClassid(classid); setData(data); } /** This constructor creates a <object> tag. @param name the name="" attribute @param classid the classid="" attribute */ public Object(String name, String classid) { this(); setName(name); setClassid(classid); } /** Sets the name="" attribute @param name the name="" attribute */ public org.apache.ecs.vxml.Object setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public org.apache.ecs.vxml.Object setExpr(String expr) { addAttribute("expr", expr); return this; } /** Sets the cond="" attribute @param cond the cond="" attribute */ public org.apache.ecs.vxml.Object setCond(String cond) { addAttribute("cond", cond); return this; } /** Sets the classid="" attribute @param classid the classid="" attribute */ public org.apache.ecs.vxml.Object setClassid(String classid) { addAttribute("classid", classid); return this; } /** Sets the codebase="" attribute @param codebase the codebase="" attribute */ public org.apache.ecs.vxml.Object setCodebase(String codebase) { addAttribute("codebase", codebase); return this; } /** Sets the codetype="" attribute @param codetype the codetype="" attribute */ public org.apache.ecs.vxml.Object setCodetype(String codetype) { addAttribute("codetype", codetype); return this; } /** Sets the data="" attribute @param data the data="" attribute */ public org.apache.ecs.vxml.Object setData(String data) { addAttribute("data", data); return this; } /** Sets the type="" attribute @param type the type="" attribute */ public org.apache.ecs.vxml.Object setType(String type) { addAttribute("type", type); return this; } /** Sets the archive="" attribute @param archive the archive="" attribute */ public org.apache.ecs.vxml.Object setArchive(String archive) { addAttribute("archive", archive); return this; } /** Sets the caching="" attribute @param caching the caching="" attribute */ public org.apache.ecs.vxml.Object setCaching(String caching) { addAttribute("caching", caching); return this; } /** Sets the fetchaudio="" attribute @param fetchaudio the fetchaudio="" attribute */ public org.apache.ecs.vxml.Object setFetchaudio(String fetchaudio) { addAttribute("fetchaudio", fetchaudio); return this; } /** Sets the fetchint="" attribute @param fetchint the fetchint="" attribute */ public org.apache.ecs.vxml.Object setFetchint(String fetchint) { addAttribute("fetchint", fetchint); return this; } /** Sets the fetchtimeout="" attribute @param fetchtimeout the fetchtimeout="" attribute */ public org.apache.ecs.vxml.Object setFetchtimeout(String fetchtimeout) { addAttribute("fetchtimeout", fetchtimeout); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Assign.java0000644000175000017500000000744407703353440022616 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the assign element @author Written by Carol Jones */ public class Assign extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Assign() { super("assign"); } /** This constructor creates a <assign> tag. @param name the name="" attribute @param expr the expr="" attribute */ public Assign(String name, String expr) { this(); setName(name); setExpr(expr); } /** This constructor creates a <assign> tag. @param name the name="" attribute */ public Assign(String name) { this(); setName(name); } /** Sets the name="" attribute @param name the name="" attribute */ public Assign setName(String name) { addAttribute("name", name); return this; } /** Sets the expr="" attribute @param expr the expr="" attribute */ public Assign setExpr(String expr) { addAttribute("expr", expr); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Error.java0000644000175000017500000000635207703353440022460 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the error element @author Written by Carol Jones */ public class Error extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Error() { super("error"); } /** This constructor creates a <error> tag. @param theMessage the error message */ public Error(String theMessage) { this(); addElement(theMessage); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Disconnect.java0000644000175000017500000000607307703353441023461 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the disconnect element @author Written by Carol Jones */ public class Disconnect extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Disconnect() { super("disconnect"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Reprompt.java0000644000175000017500000000607107703353440023175 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the reprompt element @author Written by Carol Jones */ public class Reprompt extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Reprompt() { super("reprompt"); } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/If.java0000644000175000017500000000656707703353440021735 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the if element @author Written by Carol Jones */ public class If extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public If() { super("if"); } /** This constructor creates a <if> tag. @param cond the cond="" attribute */ public If(String cond) { this(); setCond(cond); } /** Sets the cond="" attribute @param cond the cond="" attribute */ public If setCond(String cond) { addAttribute("cond", cond); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/vxml/Option.java0000644000175000017500000000720407703353440022634 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs.vxml; /** This class implements the option element @author Written by Carol Jones */ public class Option extends VXMLElement { /** Basic constructor. You need to set the attributes using the set* methods. */ public Option() { super("option"); } /** This constructor creates a <option> tag. @param dtmf the dtmf="" attribute @param value the value="" attribute */ public Option(String dtmf, String value) { this(); setDtmf(dtmf); setValue(value); } /** Sets the value="" attribute @param value the value="" attribute */ public Option setValue(String value) { addAttribute("value", value); return this; } /** Sets the dtmf="" attribute @param dtmf the dtmf="" attribute */ public Option setDtmf(String dtmf) { addAttribute("dtmf", dtmf); return this; } } jakarta-ecs-1.4.2/src/java/org/apache/ecs/Attributes.java0000644000175000017500000001330307703353440022521 0ustar killerkiller/* * ==================================================================== * * The Apache Software License, Version 1.1 * * Copyright (c) 1999-2003 The Apache Software Foundation. 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. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Jakarta Element Construction Set", * "Jakarta ECS" , and "Apache Software Foundation" must not be used * to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Jakarta Element Construction Set" nor "Jakarta ECS" nor may "Apache" * appear in their names without prior written permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``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 APACHE SOFTWARE FOUNDATION 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 Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ package org.apache.ecs; /** This interface describes the attributes within an element. It is implemented by ElementAttributes. @version $Id: Attributes.java,v 1.5 2003/04/27 09:44:39 rdonkin Exp $ @author Stephan Nagy @author Jon S. Stevens */ public interface Attributes { /** Does this element attribute value need a =""? */ public static final String NO_ATTRIBUTE_VALUE = "ECS_NO_ATTRIBUTE_VALUE"; /** Set the state of the attribute filter. @param filter_attribute_state do we need to filter attributes? */ public Element setAttributeFilterState(boolean filter_attribute_state); /** Set the AttributeFilter that should be used. @param attribute_filter set the attribute filter to be used. */ public Element setAttributeFilter(Filter attribute_filter); /** Get the AttributeFilter that is in use. */ public Filter getAttributeFilter(); /** Add an attribute to the Element. @param name name of the attribute @param element value of the attribute. */ public Element addAttribute(String name,Object element); /** Add an attribute to the Element. @param name name of the attribute @param element value of the attribute. */ public Element addAttribute(String name, int element); /** Add an attribute to the Element. @param name name of the attribute @param element value of the attribute. */ public Element addAttribute(String name, String element); /** Add an attribute to the Element. @param name name of the attribute @param element value of the attribute. */ public Element addAttribute(String name, Integer element); /** Remove an attribute from the element. @param name remove the attribute of this name */ public Element removeAttribute(String name); /** Does the element have an attribute. @param name of the attribute to ask the element for. */ public boolean hasAttribute(String name); /** Set the character used to quote attributes. @param quote_char character used to quote attributes */ public Element setAttributeQuoteChar(char quote_char); /** Get the character used to quote attributes. */ public char getAttributeQuoteChar(); /** Set the equality sign for an attribute. @param equality_sign The equality sign used for attributes. */ public Element setAttributeEqualitySign(char equality_sign); /** Get the equality sign for an attribute. */ public char getAttributeEqualitySign(); /** Do we surround attributes with qoutes? */ public boolean getAttributeQuote(); /** Set wether or not we surround the attributes with quotes. */ public Element setAttributeQuote(boolean attribute_quote); } jakarta-ecs-1.4.2/RELEASE_NOTES.txt0000644000175000017500000000572607703353450016042 0ustar killerkiller$Id: RELEASE_NOTES.txt,v 1.1 2003/06/04 21:58:33 rdonkin Exp $ Jakarta ECS Version 1.4.2 Release Notes INTRODUCTION: ============ This document contains the release notes for this version of the Jakarta ECS package, and highlights changes since the previous version. This is a maintenance release aimed at existing users who required a released version containing all the fixes made since the last release. NEW FEATURES: ============ General ------- * Changed scope of createStartTag and createEndTag so they can be called externally from other packages. * New examples of ecs-in-use to src/java/org/apache/ecs/examples. * Also documentation enhancements. ConcreteElement --------------- * Added overloaded method to ConcreteElement.output * added isEmpty() method and lineSeparator stuff Doctype ------- * Added Doctype support for DTD HTML 4.01 ECSDefaults ----------- * The property file can now be overridden by setting the ecs.properties property. XhtmlFrameSetDocument --------------------- * Adding missing get/setDoctype() Input ----- * Added more constuctors Option ------ * Added methods to make things a little easier with options and selects. * Make option default to having a closing tag Select ------ * Added methods to make things a little easier with options and selects. * Added appendOption methods org.apache.ecs.wml.P -------------------- * Added align type constructor DEPRECATED ========== CHANGES: ======== ElementAttributes ----------------- * Change the way keyword/value pair is delimited with quotes. BUG REPORTS ADDRESSED: ===================== ConcreteElement --------------- * Changed output so that the current element encoding type is used when the element is outputted to an OutputStream. * Fixed potential problem with PrintWriter not flushing. * Fixed end of line handling while pretty printing, so that it is correctly uses the line.separator system property to determine end of line, instead of using a hard coded '\n'. Document -------- * There are some errors in the code of this class. They are the same kind of errors that I found in org.apache.ecs.Document. The problem is mainly in the setXXX methods (setBody for example), which forgets to update the local reference AND the reference in the Hashtable. * Fixed NPE on null doctype ElementAttributes ----------------- * Fixed bug when addAttribute is used with an int, Integer or Object as an attribute value. FrameSetDocument ---------------- * Fixed some errors in the code of this class. The problem was mainly in the setXXX methods (setBody for example), which forgets to update the local reference AND the reference in the Hashtable. GenericElement -------------- * International character set bug fix DOMFactory ---------- * Change DOMFactory so that it doesn't use Piped*Streams to prevent potential deadlocks. Script ------ * Changed script so that the body is not outputted when the src attribute is set. jakarta-ecs-1.4.2/xdocs/0000755000175000017500000000000011126246123014347 5ustar killerkillerjakarta-ecs-1.4.2/xdocs/index.xml0000644000175000017500000001013707703353447016220 0ustar killerkiller Jon S. Stevens Element Construction Set

The Element Construction Set is a Java API for generating elements for various markup languages it directly supports HTML 4.0 and XML, but can easily be extended to create tags for any markup language. It is designed and implemented by Stephan Nagy and Jon S. Stevens.

The Element Construction Set allows you to use Java Objects to generate markup code. Gone is the need for writing code that looks like the following:

out.println("<HTML>"); out.println("<HEAD><TITLE>Demo<TITLE><HEAD>"); out.println("<BODY>"); out.println("<H1>Demo Header<H1>"); out.println("<H3>Sub Header:<H3>"); out.println("<FONT SIZE=\"+1\" FACE=\"Times\" COLOR=\"#FFFFFF">); out.println("The big dog &amp; the little cat chased each other."); out.println("<FONT>"); out.println("<BODY>"); out.println("<HTML>");

You can do this instead:

Html html = new Html() .addElement(new Head() .addElement(new Title("Demo"))) .addElement(new Body() .addElement(new H1("Demo Header")) .addElement(new H3("Sub Header:")) .addElement(new Font().setSize("+1") .setColor(HtmlColor.WHITE) .setFace("Times") .addElement("The big dog & the little cat chased each other."))); out.println(html.toString()); // or write to the outputstream directly output(out);

This creates the HTML:

<html><head><title>Demo</title></head><body><h1>Demo Header</h1><h3>Sub Header:</h3> <font size="+1" color="#FFFFFF" face="Times">The big dog &#38; the little cat chased each other.</font></body></html>

Or even easier, use the Document object:

Document doc = (Document) new Document() .appendTitle("Demo") .appendBody(new H1("Demo Header")) .appendBody(new H3("Sub Header:")) .appendBody(new Font().setSize("+1") .setColor(HtmlColor.WHITE) .setFace("Times") .addElement("The big dog & the little cat chased each other.")); out.println(doc.toString()); // or write to the outputstream directly output(out);

This creates the same HTML as above.

There are some subtleties in the above code that are worth commenting on.

  1. You don't need to know the Hex value of the color you want. HtmlColor is an interface that defines more than 200 colors.
  2. You don't need to replace & ' " with their entity counterparts, it is done for you (this is configurable of course). ECS gives you the ability to define filters that are applied to the element when you call the addElement() methods.
  3. You can write directly to an elements output stream. output() is a method that can be overridden to provide custom rendering of elements.

ECS also gives you the ability to create your own elements on the fly using the XML element. So you can do the following:

XML my_element = new XML("my_element"); produces: <my_element></my_element>

The javadoc documentation and a TestBed.java file comes with the distribution download. Both resources combined give example code usage that covers every single element. The TestBed.java file is located in the ecs/example directory.

ECS uses the Turbine coding conventions.

jakarta-ecs-1.4.2/xdocs/images/0000755000175000017500000000000011126246123015614 5ustar killerkillerjakarta-ecs-1.4.2/xdocs/images/ecs.jpg0000644000175000017500000006100607703353447017111 0ustar killerkillerJFIFddAdobe ImageReadyDucky<Adobed          !1AQ"a2qBRb#r3CSc$s4U҃DT%6t5F7'w !1AQaq"2B#3brR ?@P( @P( @P( @P( @)A FI<[ݞ3T&P6!NUZe5i1\~Œ1O=oVVyƉgJ7&{!˘bdeV1(Z56 ]]:TxdL˿Գj -?}kP.ImƇI c،d6}WXȌ̫dw`یLR).MSNK IB}tsR1Osw#"̌ժG{ܲiA>bu<-A[5Ӎ Ő3Ͳ^5ABIv>G PN)P.zg;- lr.r XxGܳjAh5Nnn'Ҝ3{Ňӑ>m4!)G",2Րevg%1EAm$YedAVpn63/bg1>nFV=:a.IO@q`r&9}ف)sH;&bmQIu q} v'hCH[eL:\VۯkV9[mQd9aR1x.5"a1TP5WUh,ws/0dqB`-T )N˥<P[8͝ 0M L!~"\M-kPlΜm4#x,+Ckl2ө%.)fͷ>4J##N\yU$&,Si-m^庡\M2Rؗs*F9M M%֔yHJ DkF4M܇72,d^:C%yrV\-$yde}rHaNvJxp`ÝLh,9FO/-0#OI}AHOi_,uobv ^3|.]Mwm_IR]4T0ظi+l+ZbG ;6NMɶ[eM!iQ)6;AڋpM<>+OJZk'S8ΉqT6\"LU-RU״uKa{}`G9~dtyz&=t;t!_Wy9ŭk. (w;oeeәLUNAWyqZ 5@P( @P(z\yFiɑBY+BTAeFʷ: 4m}Po HqiкprBR,q2iL2Ymjm:@H~4}  ;lm! "F9!)sJ8T`=xK8l>>τPr^YDιcQ8CD [ 4`g',]l>)UsKo%dHrm~)>s4ZK {!X]%myi+=V5[WXɗ bBZ8J÷;_>ɗfαcV)u *GRO`-ƫSNۢ?_?CS]zJ|ǝH.#GeP( @P( @P( u-ɟ8 ҧu 4^*&t昉AhJO˃-S~Z[A)TjZtZohXmm.6RREsb@P( @P( @PS&4XIJy! HRl/ٕ=4 KV)qȦ eb,%(!S*o_(%|h+$=gYlpi MzQe}\ҾoG tKiV{(22IJOE5cEmLxkՖlAv%m B7:k.b,TOD7:Tv_M콵p= $DjR5$ WuȒP( @P( @P( =dj&el&Vk$ZrRT-mbPZ9-LlV}y^뚇?LvPkMَM9ήGA'7d\hjb[}v%?DJGlا ]^Ϳ `J2Z]H*aj;YiLqΛGǸyxYrj%GC=)  7[n1d|akF%@P( @P(  II4tߥ{>[س_^>zBܽ$*ߟiZ}Jʜp2> >WGuFmAן-B莎)+> YpHxEZO`4A\NAel)r\,uԔ3 we<(:ckmLõGq>%]4)#LIM%ebZ4*Lez}զǦL[d%,8pj-}=9¡T^^ " OH:?hl  +RT-gRֲ\9Ԍ@P( @P( AYe8*AGfOb.ܟcm?[;/73nYWyd?_Ys~֭@P( @P( u!\^G/%">Flr<50H(:} tB8`'Ik[Ynxń] W;娛VoxMɆ"BcˌC[qvR#[i:ym6(!V⍀&/~e9bbT!d|.As}P(X">݄j PA ~nnK~Fo*KqSIAD-gIZ}A+XJ&[+{ʻAo+ac2ʖ䲐!R_ZIԵ*o5btDnFdS<| ZT?-vckzؽNvIdb ЗRw=Te|ui8M%Xk'>NA ڤWZ{r/6Ku[]^߹eNίeLD|<4%Au@wjq5iXgމ#1ɱOs-`^AJ|EKJ^cHxWTX~ OSscVYhqcN@*( @P( 5`2ڃOIyA)H$rU~#3=EF] nx[?G* <XlhE씤]JQq$^½-Iw -sn<.yP_a,#f#[~/jǻ09fCRr EɲU$X9LPd$% kZ%7*RH=9KotGIJ Kv}+B!!(H JR,P}P(9 C iZs![Fa'UmA?P( @P( #wj3FC~Jn. l#Ecde!2YLYlQZtT^Lh]-#,f1xPΟ>a.€~czy ,ڠ7 3NܔɚZ2T4gY`Mt'(I3-֮ XHi7PP|5($Ae9,MV*+ hЙZOZ Ӷ}=3rM(Jѥ):TY:PO ەFzT@PsP[xsr+yoBm :|KfƸOj @P( @P( ^-sv q<~ 4{l2YEA-6P /mi(OʧKes<Ґ 8PEm~KREv_ARЍ׉S5 vU͠I"GDZ \ b6@`eZa7<,O}Bٻ}W 0w1c_~rm> Lv)[eC*&BW@(O~Z m@P(Ԟu9DX92A3/n+vRыXJf( @P( _? t UOJl8TBlz(.hn$,-$Px+V>:j@?? kx΍'vc:PA+"͐`VޘrjJm:L>av"jc]ss8ܷC +zѬJ3R-?t JGVhp 7WdIiPbd@ %A)H$;M}n峯9ێhaDm߲i_[Pnt-0X1XN#2)H$_P( @;o*Xw15D3)Jv KsAh @P( A (PJsV x\P("Pu)9EiRQ+IH|&?,Ǒ5 B (3 x^m) z-ʂém_m#zweaŵ1'3s@gzinOH?2%A,P(Ϫ]e<> w2ԅ!IUZOq#b6VG%{/G-#ic)3.k_%+ߔPqcSF[(@QV5ұ,wnБpȢs }h$GˆO V*_/DpLĀH^5e6vDTp$$XJJ@I< ~Knm3旦$WjZ9@P( @猣𕜜{䠠opUK堚nOQX,NRQ~*>CT @P( @ۤ;hvPjly ?Fr3`\wW蠻dY?5_6_Ac=@G}ʐYת( cJiG%C¡JEs8 L#o!k0XӫBZ9KaAdc;;%( ۙJGRںnO17"?rj.b*!;Cn( @az MrHU+ڮ; y,@wpV0{Y2>[s訲]ŸpPs͘ߓ(e(<k>3~tm|DgѾs{C>Ndk ZPRf k vLrTBDqhjSJwOE7i1GjLgRwyBRT8G* @P( -}"ݩ@*WރRO&J ?hrs)+jF~A>("KѲn >gVq5A>o V}'^v}ۅy/Dkgŭ N8 ]KQs$G^"~~,1|x_;6~{;,ۊd{}}[3Q#4,H\Ӭβ!m4\:IA#VYf[5;][ʹ#ٟ8Wl8ga8k=-{')$2d>Ggl}'5Lh @P(76?\c6>lk8RVvy{MrNr`ؗp%8l+Y)*Uԛ_Q5^lM^EYL7mTj n@q;zb89ݚo{J_g4Cp\5!% w 햵=('S+:[#JF.&|ZIR@P( A%n8f첣(4{zJ@APD:QlŒJwyuAH*]?PCR]13#ZֳZ̰lZR@PgzZN@Kvԣn7D Rڳgw ylEIR^zOs`j>LHSټspdՕK2Pxl7rʮj&F**2e5#^-WBGj]Fc ߖr Bdq x,w{#θb=O"@U^EFC{.bL:ҵ5Grٷ[3<*?\=QiKW^el×(vr^슿6+\SpHRKO \ޘXa3oV( @P(cԈYͭ 9X9Y RB-aD)IJJBRu(2MoIsj YD&(ybG{ǍsgE8G40bGזtJJKZ(dי{ͧY]Z$TF5"`pfXHZkXlomV ,ZKV,@'h}חrU, ("]}+q(XF>Lxֵ&Qf;}ͮC]J#A6+v)Vr{l+dŸ{;_FL0[.32OLr2#EZc#JƐe1@P( A;7oaq4ˣuBG㎯cwL3sYX取H#oh\s-}'r { (`Fň{qh?w-Kqmd6\kgפ%:EF.\ k&̒yVբ&ZgyjR[m:/d\o}e}__e'ʪBP$~`ssJޡ/O\fχ{:n&\%+o0Rpo2+BPm @P( @Jeb``b2/Ef5sQHԠ4[b5Ԇt#+2ӗbS ޝQ-4& 呧>lֈ/~l>%Ukgeqi}u6mo}-Ad1jZc+PǍ{Lۢ@P( @P(5 aΌq e Ozh3 /,ƒ19&]@0Ǡ#^nm߇(i\R%텺HBPGPJ=­Z̋|f2;_l})a}ۨi6=8~Dl-ōxψ<.LBASJ xHMy;~VuLOVP($p5j`sYX苗5tpxJ<*QXUgWHsme.cv!{h.ORMЃ}>˷؛?]P'bc6kHa(J9>9a n2J[ o72, 'JS`'iYS*.+:rF׃z,{ǿ fKm%"AFV@P( @P(!]ldM6' _Pq,u=((:`WsNAP~tA*PCX48ɴtB]L+~RtGϼRX[-~jJ1%bnFKqbSzOT.gf.NK _I,$ip\ۨ+EXPbB`1C2{O}&m:T)2+ 6J~{LX_됱 q}ڤ+ Jo/_Hڣ?ً3,P9"\'1<i%Oy!P,|x׉9Of}^6kyfpNp=¾;\ԒV'S^~856 ǴGEPBSEE@P( @Pyy.)hp.ױ#Clۋsd%0 Bk[kgmS* o~ (gZOA[sR"ܻ~Qֆo "l[W+]=jH XUz Z#M\6\mҴWT @P( Ahs+HRN*gaFd7PHh":YһԪ|±:/3Leqr81/\I58VuzVSϾsBmZef569xO*r޸[^ⶓ.v/CC9[-`qr:GvٲcE炙]tԚ?M: a\mo%>|9*ku5,%H|Nv=kԍ k ާ0j K*7y4<֬.vs_]xmx~EHPVBBm_iilZTP( @P( {f7^\VLLRnpP;E?۲0ε7l[wjy/DFE1BUώk iVI=Pbt 9 Ke9 L+TxZiIk"e+R@P( @P("TxzmfTmþ)V+-aA$PZeO ˟4ac< fyBC"Dx.D N:I4euBǞ ɭ6yB>ڽT53'P=B]Fk51ɒ+Ҝ>KSR[JNAS8b\tvP#5Dog/mj;v8f9KZ<1-b;#":ҝKǺnSGee5xâ-oK3V= Y@ Ji7ڹ-竢9 ;ޠIkPH%_ԋ*O:w/zͫ5 c-OG3n=8d!)_oH 66YHG} 2VmDiQ2H.([Z?ΪnOLׇ}- [_uDvf3ÞKV!ZO.6P4:an&ܼ6s$r W`eE_έe X2I8\NS=Fj[Tx:Itٳ t], /Z^ pNwQ86;"9PGi׷V8d g᫐BP&OI-n3QR/֡'E﨎tO/fFyu>b&}q|+Gի+ 33QjA>Аmj'PTFK5˼"$%H|>Sj]Z5o^1”ۀ{*PXewf3eha>åo<18p1HL!bݩP4TyrCD(S3 *^{J/Ax/gl&1K>@T}bxPI#J*;rb㼐iAhZO%%I#䠩@{KPˉ%)l P~t`XV TRh,sӅ{_al<#1Ƕ%l{)MkdeVeAA%/"; .cⰝK py(ڢezc3weS0y*4ˍn.AG[VfJO Oa/\gCM>i~c%k.9W *'Ā@Ww}>[~?r9)YO׵H8Ma\y&qd/>pMx6<#.51IC#Fee4kOdGk2WT)mgdЋ7b[#*@)渶x2Fn~3]u&7^5 =/kfq BQid,@__84\}TB| ȝ1Գ+kzC6JA23w^Aۀc_61͛GlCƯIߨe{m`&=%!Ѭ !e(Z-A;O|F?'#޲0c[B%R,< mn﷜$sRjvR{%ITPvV)l\94c6`aHޞt[M(9lEɯhYa=mޭʲ߾0n:~Bxh3;/Ib2&85 o,O +>z ^6v6ޝ/#%b`\Z W|˛sIADö%RI32ab+oaa)*b}Lpy+ Ǔxt}NA@QfX\E%EV4HGvdT-m$%:G.h4?+ccG݉CYvJl)YmA[" CMM(Iy-IB\x~Nc7'SUec$%|m`z']In=ӝcF9̄j~($::Bl-m*+vs?/6ymxPH8@c0ӘAZH,=ͼ):GA8_x:Rb |] \ kb*AujHsAp]@o|ߏtؠ$+q.0H)W(.NkeF_׎6G?BNZPIB"uRADW7(I$  ƭpp̙mȺD#-;ɸ%Ka`}D$F{dN@F"R8PzV5jɖu`4T"QYQ̪**h/G-7:dVomN/bR.TF*{G2d ?nC-MG/kHʱ}jai,R%m/ 1Ti+E<).bZbotGWABiHZK{[75/; %+6Bl22SO_/NZR1/ TNV:,̎9>+8nBL !GR~6])^ե8_NM޸qZæ-mDAH$5P5'xƌXFj;KldR;(4Įt`1.2D yH>gJ>KB0eHKM$%`g:f@Պ}2OvMiC 9s0AxY-'/Ƃ' ߓ Ɗʴ4lƃRGkݹ5S(ZE.skBҥ#X)$sHįyf܋ CS"*ģY(%2bmF#g"يKIR׫ykHvPak+!#  K_r_)g+jX߇SDٗɷ8-uRa@mB z!Xm爇2Cq7;! 7 ,|5^W]qr+ˑa-@n  {kڹ;([%_oɒ{^%.mj y/]7q+c:zrorvP%EjD^ ÞcL)YVDfVKZ>,ٟ"Te-յvVLP#qt%1%A\,h% ,yvcaӤYSkljR]җ;(#|78;%NVnY6}h<9ѲW\rDebH<ѣ=rӷ$YV r@u& d^c"^L ZwK!m #^9ٴc+/+0mKeAԡIl#I} ;Z,,vw;su=VԹ*S|A .`C1gg/ /4|% ^UϦ/>6~,V|ӌ=ĒC.JØؼK;\.rV:5BJ.7me+g_MK1$},Me -hBOh sfG㙟+\V85=ZbG  q }*}ٰʥ6汱Z 8#t\Jע|nm om,3ñ/Fm_IOm#w#ln lU䮟-?$mr1/ɔa-Ch:HW9ڳyΐڷDMaۘPpѳ kIjյf5ԾaYв_@iĨA6+ƫ}cRZl,DMkY3ꎅ ]k昱=n,<1϶+%I%J潸cBv >)8˒-y)H n\ ^1cGIuH%uȵ9n5|s˺t/j2y.1RT 66TfN !%TRjn+ڰ_+rf9̼ڞaXSzƁuj4ʀH$-ܽZd(,+:l8wes4ꄟ{u@"3L,6m̩d 6ˁp!Rr2AWGJ~@P( @P( @P( @P( Q5#z핑ջ!.L+~RҌSH=ɗ##<Λ؆PIo$ aJUF/Wܻ6=z_$E#kn'-#O̞˯5[߁©r֢][B|tǧ͘9#յNY~w?1ZLxM4vXliB"Wr[&:c211 .b_m ARw1sA &\i,(wm^8 Rܛ+*K;uS>+ 4TueGu`R xwQ͑3 eyYi)-&4ZCR^ц<_r:ڡօ&By(RJA2Gixk-0e%cr'Iې8nSezm Ws=5!?U&;Kx綺ZQ#udC K+$#Jr'а1cvx}>;(VȊeH];Ƀw! *yCiJ,.cM8IФcf( @P( @P( @P( @P(4 j-r0 k%q&9ᖙQQo.WAAԬYc 0#ZNkW]=cK|1ϱvݴ{ntkvߓĠxjUJ>v<=:{~=G Y䌾c$:l,Erpkkq:F|kk<ظr2&]Lf t'SJ W[ERxk<% v4ͬ\8߭$9mrFki'&nc8=ɀ%4Pܵ6>қe&x\x11{7CAd@pꎥCjg?z_L{d;^dŞ ]J tkr?#F%yJ*jQ"ON{8z&FCN^sɰˎCo?fNt*ǂ;C 4`Pz/6bUo/Id(9M*(XO?wR(1L'".A(RPl*7"6/Pn~.\j $i$2yW2T8U( @P( @P( @P( @P(5wĎ?KO)1\>B% Xq-țZ5CC Jh<8#̠bؙ"jc^6"nϣZ*䔤[Q5Ȼ5+Y{s-Sx+xHJe* hOl5s)_eg ? ;3s[ ) |m];=f\EV9p}'Tt˖Y:ctB/k& JiJ@ Pxv,goۗT(- VpRWc͚2eOYcOkծh)qQ*Ҕx5C"V>f'~\_v2[ұR x.o\q @P( @P( @P( @P( !3#ž`I#6Siz΋R鶞+9c2| *$kIW%fyƯ= cgJj:%xWJ幀amU閑jK̆I͋n~duUF|^S0)-B &+ #SDG1Wm~I?$ls2(q|ȠiV>dP42(c0"μW|oH-[ͯBWRPh>'LX>m˹|+6epyN2n܊UvU*<ȉgP Z),7D J:1U-*"%t77IcoR@P( @P( @P( @P( wn`3W9fdYu 5jΒ=z0 XZA9&Y.:T= LD\)aa1Driy|Sڬ>CUkDJx@ ˵T7nJzϜ}a$\mO̒Y?{ DGm|Vlca$<2LxBe)T讲sD<8mPChKZH$D/`lW0&?7$#umBejrKMu*P( @P( @P( @P( @PEwWK>28)凿ļz(Lj9^F1$4-I[@hhbAɎ̧SE&SZΐ|_ܼ ѽv.b$IZ\6twDDve+[ ;8o5lv g͟%R1ҤFN}:JԯWudѳ蒁@P( @P( @P( @P( @!i(ZB*h"yޒ:KnAqFKMϖ"~6ihe 7Z_sd.H/ cPXSO1_)rR-J}3dd@T0O̗4(S}Pd`I0Bse$IڵÃOn۬8$L|EG#%{Fͅ^2i rm&֙\e:yxmK쭶9Z<)9bbfQWN:rnǏX?BKEďoUmצxoffPoR?$̇,{JĬ;0CQ%V.YךBscjoiy_kIH%̉4%7}rjdILį3#ǵb9"dHcQz_X_imfY-Ў@3ZSX%vShK%@i犅EoLh6>.dyΊ >GlլyZ UfuiR4A~ޏ~nnW@)17angji3):(KKk`SBƅ#yДޡvV@P( @P( @P( @P( @P( @P( @P( @P( @P( @P( @P( Ajakarta-ecs-1.4.2/xdocs/images/ecs-small.jpg0000644000175000017500000002662307703353447020225 0ustar killerkillerJFIFHHPhotoshop 3.08BIMHH8BIM x8BIM8BIM 8BIM' 8BIMH/fflff/ff2Z5-8BIMp8BIM@@8BIM8BIM8BIM BpIP_&JFIFHH&File written by Adobe Photoshop 5.2Adobed            Ip"?   3!1AQa"q2B#$Rb34rC%Scs5&DTdE£t6UeuF'Vfv7GWgw5!1AQaq"2B#R3$brCScs4%&5DTdEU6teuFVfv'7GWgw ?>z-ٛYhse`lnnK\[n)꺶Yg_ [}s=G~ޟW_/fdV j9wKM/?nw!UZ=;Ec#}ͱzm]eE\}Kpl݅k[`SLckclfxg.4IM5"d(LqG.M]g9蓵ԑZԾ'zSwVhkedNƺenIi/nt:2M0`{O?tec]H.in9:v?Ufu߬]/}>=c}ֹ{EC]ߢoԳޒ^mk: mgwwYSYS?/>۫u{݉j^ uZ7?k˩{_MLu~Ծ;غM^@zSiKS}N]&ʞKym<׾gB{^U)^հ\soUmV2ơmKQ}6%[k+sWc{?&c]"ݔI'пU9n(h,Qεv, )ū!l!Z}G@x۽̭c K#v~ֹ: {^ܫ^VDgwoS>]yfVS}G 2zUETϫ]fzwQq}Fecnn}_还nC- nml2]FT$swĿj@JQX]3yn\kYcqz֎2φm3c]Cɥۘ2y#dD߭ =47;X񩪗ͽ[vIO?Yu ne\Z1sIX~lWn Xʽհ{ZsOEe WKZo?Sz>̲ܮAݑʃ8mwgEbq-B r}Mz`]mF5r*U῝@uﱵSSK5h{kZ=)}lxs^kޕOֿ{"oRCctMI;q"*Y]C͟N[\ZwՐ׻9 ·΍~{>>8y9ecZ*CY^ejʬgKOSO`_Oes-^0WTߦeU.rW@vSwڮmv;.dl]gٮ~]](`^mnNc&cDc2$.K9X#/f3+ulc]h=(Hcgbe[h{j9iV{?~ZD?ҥ Y:@fSI VPcv~v+2i[n[1zBzߣ"YYXw~1vGW~ߞNVUnskcG)ʶos[~O{?q}bLĥUwn/c\4n.#?n9yV`uui'v.swm~K~%NQYkYg5i;oilekcNztȐ \Ax?]rz6e< }h]{U޺/n?mNW/3}׎f]}%?POb3zau=jOkF&,moKmU_S鹍[eosNckwՎuXrꤲXʜmƹߞRI.#>}ZcN{]U{LW[c,ۺC6Sgz9YŮJq?Cö uOa=vns"TknCX7kik*s,/lZ$-Vz#2Yh8> vl߳mnǧX٪mFmh;Yc:I)mV}i.hpo+NʿGmzKNaۦʽ2~noԔ}Z}#qY]2ZǼHn"@7L:U@pnVn[]$u־[G,ߵXjѴ_=o+ݕ^=/ϵ]{Z{*deu͇ӋZRI$RI$I$$I)8BIM&File written by Adobe Photoshop 5.2Adobed         ""     !"12#3AQBRbCScarq‘s$4%Tt&6!1A"2QaBR3qbrCc#$ ? @P( @P( v_(8YpB#s韻n|Ⱥ\v(Ɯ[i(W"vZ $~ny (v΋6ټ4 ޢAϪY+W49<Zb3.[\@P.-eqA f귕Go׼ɺ d-@DmfMK)h5A3:~%jD(yT<5;V=NMo ^)RUHZ^ݠrn z%ܣ0B teV )9N6[ܣL_"B ɢ+3vyTYPCطGLnYی ]9vdM@(D`m DЂDh1ھkDaX̢i!"([/gX76`\86l>2:omۓe%;/+F21mp~'z47EyZЏ?3xoo0%wX |*"8@J\||ADtûh5=3,ۂ4柛vYQ CLߧ:ÒA|ec5uюHtrẽ%g~%,;DfUN_{#~bGx$"N}zߠw}9_HLE SEmPs[ݰmCu5*'[Q1KwoRV .|t1O US.=m?ïﻮߖl6م֑K$}#@P(   Fdߐi5AOP`v\3 xj#FW2'FjbcR@P( $R%DLUW"%53;pp^tb"pu((1m%D☋넪KĈ̹7PM2qi\k[UWJ ztj 9VsfݝDOzIܝɉ6ql17 8ٝoM~?;Vc>_;ߌq,Vخ eB؉ RU#@P(  {+q̊ķQdɴ΂$閚s^Uz>Mm\s8ĥ.,_Jt^2sAs.=y[D}OK|gdLnVk M#Xˍ+=tJ1@P( NVlv= 눘-"/Aw/i^iri#lLzΓ#~Y8cZT] A:<b!*r$ u~cqm~JJ-g $\LQzZ`WsPh|/ۯ4lP<|3{3m=iO;,ʹ˂ cX@#<@P(?Ӷ|6EV4L=0AŶt̹srPs[W|M)Jt1E4[_s~<8ۀ`[.Z ,̨C,U\T,WÎokjb4䱎:ouћ=J :1. ,4N:j")$5_AۄQqGnj\4(r߿>䠠EǘZ%ĉqj%sytmGb#i"` ntUbڅprbxQ^tߧԠ6-jB+c:M))Ff&* *[| CT62BsTWXXA1@P( ճn"to=AA 'OfJlsdiI9QTx8cAKq!)fp*U](%ct<{9LOk*}f5ցAM[q Z q+a<E97Vns$H:l +L65¾-hD$17:rƶؠP( ױiq1qr &8=ʉڠi:LQ~PBi**(H6T#D-x (zE /]dÖo! -HHPyy΢ֈȅK)dMfuT>?ͳo[џyLySO}{+Sk ̼Lˉ̫ٶm+=˜ en6cČתcV^qKL>"T8s4" S>tϩ?;W ҩ@P(+[l=mW'D%r:"*CiP/:,ˍlǞ9cí(dC>~Jǻ]sZ'u& \0WfM8"**lS3IYkv;#mdBa^%@P(?|X(!L1E흠|4l{ٵ7tlPU1*PY(4 &\zUA:n]|a&bJ[:W;슦!fO⛋p^$5֛J̰.rCys\pt<f>ᆴ/5b?Zalf;1[DDDALQ0DO%yi%2|ni_I9A_[!:Mx ӣM6«u{eři n Q-h>anR]mś,lfϗg(fJP( U>yծߦ3#&Gh}o2hm"cf,8tR[+va&*L 28&3=5剌r] P( p6~˿*4TE4҂At@lUx7r>Z#+q \ k{Dsuf셢22)piN+G}x"6q9 CrϻWV&ҷ_tc#miq {.atuS71f&=ef;mϧw~YDbOm74T $jZs\Ûkwu_ż^Fi& k%mqҗ<цUh5p`\iץ8pQnCg厂0ӄXzOWD AST^‚+KiCKU؎[$HyEde&Ln\ɒgȲö~\+sm7 !'%]:Fw*lV @P7w#e/!h~%7qOP}!'\Wt'Azuvs6$Ok1`>&Q@DS ?x9_(<K6jM!ܛ]̂C&1d>`h+:ygR[f^ȟŎo-$wIpeώQs(%cQ}=yz;>b)ޘq/v 7=!ǚ7EPyXdYl W3WNsm񲝳˩6c#]Dm׭]iX|g˞w={^c6Ӭd̺Naډ "ؐiڱ(t! 8J @ fSVmấ,h67bAq"^;rܬln($4;Bfłhf\zn<و$80(;=3K] ,A4on5*KY&#Odx_FpWM6Oݷ[#j`ʆ!G5nAD->l"d|ƽ(C>CjGOI9?wyj%PmFdu@;qƒ30wKv4#efTV|"Uk0ODzA폘weh_3yl^q\ydoSV9a0 h\/9yl?0&\K,RWAIQr4ἁxzh1oߘs+@HpťH:͹z j4pVv!f t"m#hӿ-I=NB, # fg1̛ V+[`. 0[W׼hੈR׊ms7#Eħ,_{USA$Ϊ+Ib,k*62m ќ \RU4E%?* (PQx(ux{ysU]84ćc3"emw*u5Usy1up϶V"S(%.U'B Tknɱ^ٚ^ދk4T eT #h.P,{ӭn|ĺ;AGQ$dp]%攣In7 v2€*FUs~ KPxulxƍMD!$^!.Ap{Eш  GLrӏva1fَwU!uT'0WemuuӇ4EDT4PTv.6ٲ8mK>'6[R7uyw|>+j Z!%E.+:}9/ru(3;n975LHs^WFʃ콬p'u0^]uPf,P-nX|ϧly qv̿m=. .#ɡÏCm+IW0)(eVk0FoaE3<˫6>.)o OpV}O Yjv_ɶnˀrXs_hU޿^uh_OS5[sT#>r G"r׵ZV'ZՋlsLܸ"<*NJ Isz#fF #o4-},[?K,,&6̱ j]b ?:MADkQ8(ezIk0#Q( g Fۏts5dH0Y髭6 @7PuM퓕qCHhD#l }!* @P( @P( "饾ZlQ6/71R摴ُf>ELN^oh9囖P$;r}|v8l̔ճ5]0>|뜍Xoٮ+wbѣ686ʒ"*gk6Hu3(Ch#-H1d1 .&W2!'sQ-w̴Ka}zڇ'a**2hOӔRuN)~Ur_sW1 rh|ju2}9N{>9Ŋ59N#͎%iu'ܙϺ٥&Se( DI$k&lY0왞v( @P( @׽ͧ&5Ƃ[-/4* ͪ8Ӎu^' ^ТViu`ƝL7˝|v`u~hfFL͚¨VpxbDyM2Hb>11:ji*F)CĄ|;DPUTa[E,FS«){0CaS"<<ijHVmQPd3ٓ&u|r˜z8+IGoĸђwiL"sݥ  C"XuDԓ.ZLZR'"m_Ȩ A47L~-v˶"5Qqi_**m J+W< Jakarta ECS Element Construction Set jakarta-ecs-1.4.2/ChangeLog0000644000175000017500000001323507703353447015023 0ustar killerkillerVersion 1.4.1 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - Added missing ecs.properties file. Jeff Brekke Version 1.4 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - A.setFolder() thanks to Dan Diephouse - Fixed bug in GenericElement. The output(OutputStream) method did not take into account the current codeset specified in the properties file. - RegexpFilter() added by Krzysztof Zelazowski - WML Timer() class added by Krzysztof Zelazowski - WML Img() class added by Krzysztof Zelazowski - XHTML support added by Bojan Smojver - Upgraded to Ant 1.2 (JSS) - Website now built with Anakia and Jakarta-Site2 module dependency (JSS) - Moved site to the Jakarta Project Version 1.3.3 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - Fixed bug in Document class that was causing NPE's. - added some methods to make things easier to add attributes - Doctype: updated to allow a visibiity other than PUBLIC Version 1.3.2 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - This version actually has the stuff mentioned in 1.3.1. Due to a screwup on my part, stuff in 1.3.1 was not included properly. Version 1.3.1 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - Moved the Doctype tag up out of the Html directory because of additions by Bruce.Durling@equifax.com to make it less Html specific - PI tag now implements Printable - Added the Doctype tag to the Document element (John Mcnally, Jon Stevens) Version 1.3 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - Fixed OpenXML requirement issues. Now, we distribute xerces from the xml.apache.org project. Updated the classes to take advantage of xerces now. - Re-worked the build system to use the latest version of Ant - Added elements() method to ElementContainer Suggestion by greg barnes gsbarnes@u.washington.edu - ElementAttributes - Add getAttribute(String) method for fetching attribute values. - CharacterFilter - Made the javadoc match up with reality - NullFilter - added support for a Clear ECS element that doesn't change characters thanks to Kevin Burton - TH - fixed rowspan bug - RTF - added more elements - Added support for WML thanks to Orjan Petersson Version 1.2 (Stephan Nagy, Jon S. Stevens, People on the ECS mailing list) - Fixed bug where we were using a JDK 1.2 method - Fixed bug where elements would come out out of order - Speed/Memory improvement by making initial size of hashtables and vectors smaller - Added some defensive programming in StringElement - Some pretty print fixes - Allow the addition of multiple targets to a PI (process instruction). This allows things like Jon S. Stevens Contributions: Vadim Tkachenko People of the ECS mailing list