move branch adempire311 to trunk
This commit is contained in:
parent
0145080dfc
commit
0429dfc79f
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry including="org/apache/" kind="src" path="src"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jstl.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/Verisign.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/standard.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/log4j.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/activation.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/mail.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/j2ee.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/bsh-1.3.0.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/xdoclet-1.2.3.jar"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/jpayment.jar"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>tools</name>
|
||||
<comment>Tools Project</comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.ibm.etools.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,3 @@
|
|||
#Thu Sep 29 20:01:11 PDT 2005
|
||||
eclipse.preferences.version=1
|
||||
xdoclet.build.policy=automatic
|
|
@ -0,0 +1,3 @@
|
|||
#Thu Sep 29 20:01:11 PDT 2005
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/>
|
|
@ -0,0 +1,19 @@
|
|||
@Title Build Tools
|
||||
@Rem $Header: /cvsroot/adempiere/tools/RUN_build.bat,v 1.16 2005/09/11 02:28:11 jjanke Exp $
|
||||
|
||||
@CALL ..\utils_dev\myDevEnv.bat
|
||||
@IF NOT %ADEMPIERE_ENV%==Y GOTO NOBUILD
|
||||
|
||||
@echo Cleanup ...
|
||||
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.launch.Launcher clean
|
||||
|
||||
@echo Building ...
|
||||
@"%JAVA_HOME%\bin\java" -Dant.home="." %ANT_PROPERTIES% org.apache.tools.ant.launch.Launcher toolsDistribution
|
||||
|
||||
@Echo Done ...
|
||||
@sleep 60
|
||||
@exit
|
||||
|
||||
:NOBUILD
|
||||
@Echo Check myDevEnv.bat (copy from myDevEnvTemplate.bat)
|
||||
@Pause
|
|
@ -0,0 +1,18 @@
|
|||
# Module compiling script
|
||||
# Ported from Windows script Marek Mosiewicz<marek.mosiewicz@jotel.com.pl>
|
||||
|
||||
|
||||
SAVED_DIR=`pwd` #save current dir
|
||||
cd `dirname $0`/../utils_dev #change dir to place where script resides - doesn not work with sym links
|
||||
UTILS_DEV=`pwd` #this is adempiere source
|
||||
cd $SAVED_DIR #back to the saved directory
|
||||
|
||||
. $UTILS_DEV/myDevEnv.sh #call environment
|
||||
echo done
|
||||
if [ ! $ADEMPIERE_ENV==Y ] ; then
|
||||
echo "Can't set developemeent environemnt - check myDevEnv.sh"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo running Ant
|
||||
$JAVA_HOME/bin/java -Dant.home="." $ANT_PROPERTIES org.apache.tools.ant.Main
|
|
@ -0,0 +1,26 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
||||
<TITLE>Project Tools.jpx</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Project Notes</H1>
|
||||
<HR>
|
||||
<FONT SIZE=+1>
|
||||
<STRONG>Project: </STRONG>Tools<BR>
|
||||
<STRONG>Author: </STRONG>Jorg Janke<BR>
|
||||
<STRONG>Version: </STRONG>$Id: Tools.html,v 1.1 2006/04/21 18:06:25 jjanke Exp $<BR>
|
||||
<HR>
|
||||
<STRONG>Description:</STRONG>
|
||||
<p>
|
||||
Tools, libraries and utilities used for Adempiere
|
||||
</p>
|
||||
Tools is the basic container available for clients and servers. See /lib/libraries.txt.
|
||||
<HR>
|
||||
<STRONG>Things to do... </STRONG><BR>
|
||||
</FONT>
|
||||
<UL>
|
||||
<LI>.
|
||||
</UL>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -0,0 +1,379 @@
|
|||
<!-- ============================================= -->
|
||||
<!-- Tools -->
|
||||
<!-- ============================================= -->
|
||||
<!-- $Header: /cvs/adempiere/tools/build.xml,v 1.4 2006/07/03 23:23:31 jjanke Exp $ -->
|
||||
|
||||
<project name="tools" default="toolsDistribution" basedir=".">
|
||||
|
||||
<description>
|
||||
The resulting CCTools.jar and CSTools.jar
|
||||
repackage all third party libraries
|
||||
in a single jar for simplified start and version control.
|
||||
The resuling Server CSTools.jar is added to EARs
|
||||
</description>
|
||||
|
||||
<!-- set global properties for this build -->
|
||||
<property name="src" value="src"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="buildClient.dir" value="build/Client"/>
|
||||
<property name="buildServer.dir" value="build/Server"/>
|
||||
<property name="buildJBoss.dir" value="build/JBoss"/>
|
||||
<property name="buildOracle.dir" value="build/Oracle"/>
|
||||
<property name="buildDB2.dir" value="build/DB2"/>
|
||||
<property name="buildDerby.dir" value="build/Derby"/>
|
||||
<property name="buildTDS.dir" value="build/MSSQL"/>
|
||||
<property name="buildPostgreSQL.dir" value="build/PostgreSQL"/>
|
||||
<property name="jboss.dir" value="../jboss"/>
|
||||
<property name="dist.dir" value="../lib"/>
|
||||
<property environment="env"/>
|
||||
|
||||
<!-- set path to include the necessary jar files for javac -->
|
||||
<path id="project.class.path">
|
||||
<pathelement path="${classpath}"/>
|
||||
<pathelement path="lib/jstl.jar"/>
|
||||
<pathelement path="lib/jsp-api.jar"/>
|
||||
<pathelement path="lib/servlet-api.jar"/>
|
||||
<pathelement path="lib/standard.jar"/>
|
||||
</path>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Init -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsInit"
|
||||
description="initialization target">
|
||||
<echo message="=========== Build Tools ${env.ADEMPIERE_VERSION}"/>
|
||||
<!-- create the time stamp -->
|
||||
<tstamp/>
|
||||
<!-- create the build directory structure used by compile -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${buildClient.dir}"/>
|
||||
<mkdir dir="${buildServer.dir}"/>
|
||||
<mkdir dir="${buildJBoss.dir}"/>
|
||||
<mkdir dir="${buildOracle.dir}"/>
|
||||
<mkdir dir="${buildDB2.dir}"/>
|
||||
<mkdir dir="${buildDerby.dir}"/>
|
||||
<mkdir dir="${buildTDS.dir}"/>
|
||||
<mkdir dir="${buildPostgreSQL.dir}"/>
|
||||
<!-- check for the distribution directory -->
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
|
||||
<uptodate property="jars.uptodate" targetfile="${dist.dir}/CCTools.jar">
|
||||
<srcfiles dir="${src}" includes="**/*.java"/>
|
||||
</uptodate>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Compile ECS -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsCompile" depends="toolsInit" unless="jars.uptodate">
|
||||
<!-- compile the java code from ${src} into ${build.dir}S -->
|
||||
<javac srcdir="${src}"
|
||||
destdir="${build.dir}" deprecation="on" debug="on">
|
||||
<classpath refid="project.class.path"/>
|
||||
</javac>
|
||||
<!-- copy all image & sound files from src to the build directory -->
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src}">
|
||||
<include name="**/images/*"/>
|
||||
<include name="**/*.gif"/>
|
||||
<include name="**/*.jpg"/>
|
||||
<include name="**/*.wav"/>
|
||||
<include name="**/*.htm"/>
|
||||
<include name="**/*.html"/>
|
||||
<include name="**/*.properties"/>
|
||||
<exclude name="**/package.html"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Buld Apps Server Client Jars -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsAppsServer" depends="toolsCompile"
|
||||
unless="jars.uptodate"
|
||||
description="Create JBoss Client jar">
|
||||
|
||||
<!-- JBoss Client -->
|
||||
<unjar src="${jboss.dir}/client/jboss-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jboss-common-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jboss-j2ee.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jbosssx-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jnp-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jmx-invoker-adaptor-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<unjar src="${jboss.dir}/client/jboss-transaction-client.jar" dest="${buildJBoss.dir}" overwrite="no"/>
|
||||
<!-- Clean up -->
|
||||
<delete>
|
||||
<fileset dir="${buildJBoss.dir}" includes="build.xml"/>
|
||||
<fileset dir="${buildJBoss.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
||||
</delete>
|
||||
|
||||
<!-- Create jboss.jar file -->
|
||||
<jar jarfile="${dist.dir}/jboss.jar">
|
||||
<fileset dir="${buildJBoss.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="Adempiere JBoss Client"/>
|
||||
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Specification-Vendor" value="(C) 2006 ComPiere, Inc."/>
|
||||
<attribute name="Implementation-Title" value="jboss ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.com"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Buld Database Jars -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsDatabase" depends="toolsCompile"
|
||||
unless="jars.uptodate"
|
||||
description="Create db jars">
|
||||
|
||||
<!-- Oracle Lib -->
|
||||
<unjar src="lib/ojdbc14.jar" dest="${buildOracle.dir}"/>
|
||||
<unjar src="lib/ocrs12.jar" dest="${buildOracle.dir}"/>
|
||||
<!-- Clean up -->
|
||||
<delete>
|
||||
<fileset dir="${buildOracle.dir}" includes="build.xml"/>
|
||||
<fileset dir="${buildOracle.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
||||
</delete>
|
||||
|
||||
<!-- Create oracle.jar file -->
|
||||
<jar jarfile="${dist.dir}/oracle.jar">
|
||||
<fileset dir="${buildOracle.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="Oracle JDBC"/>
|
||||
<attribute name="Specification-Version" value="10g"/>
|
||||
<attribute name="Specification-Vendor" value="Oracle"/>
|
||||
<attribute name="Implementation-Title" value="oracle ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
<!-- DB/2 Lib -->
|
||||
<unjar src="lib/db2jcc.jar" dest="${buildDB2.dir}">
|
||||
<patternset>
|
||||
<exclude name="COM/**"/>
|
||||
</patternset>
|
||||
</unjar>
|
||||
<unjar src="lib/db2jcc_license_cu.jar" dest="${buildDB2.dir}"/>
|
||||
<!-- Clean up -->
|
||||
<delete>
|
||||
<fileset dir="${buildDB2.dir}" includes="build.xml"/>
|
||||
<fileset dir="${buildDB2.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
||||
</delete>
|
||||
|
||||
<!-- Create ibm.jar file -->
|
||||
<jar jarfile="${dist.dir}/db2.jar">
|
||||
<fileset dir="${buildDB2.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="DB/2 JDBC"/>
|
||||
<attribute name="Specification-Version" value="8.2"/>
|
||||
<attribute name="Specification-Vendor" value="IBM"/>
|
||||
<attribute name="Implementation-Title" value="ibm ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
|
||||
<!-- Derby Lib -->
|
||||
<unjar src="../derby/derbyclient.jar" dest="${buildDerby.dir}"/>
|
||||
|
||||
<!-- Clean up -->
|
||||
|
||||
<!-- Create derby.jar file -->
|
||||
<jar jarfile="${dist.dir}/derby.jar">
|
||||
<fileset dir="${buildDerby.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="Derby DB - IBM"/>
|
||||
<attribute name="Specification-Version" value="10.1.2.1"/>
|
||||
<attribute name="Specification-Vendor" value="IBM"/>
|
||||
<attribute name="Implementation-Title" value="Derby ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
<!-- Microsoft Lib -->
|
||||
<unjar src="lib/jtds-1.0.jar" dest="${buildTDS.dir}"/>
|
||||
|
||||
<!-- Clean up -->
|
||||
|
||||
<!-- Create sqlServer file -->
|
||||
<jar jarfile="${dist.dir}/sqlServer.jar">
|
||||
<fileset dir="${buildTDS.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="jTDS for MS SQL JDBC"/>
|
||||
<attribute name="Specification-Version" value="jTDS 1.0"/>
|
||||
<attribute name="Specification-Vendor" value="jTDS"/>
|
||||
<attribute name="Implementation-Title" value="sqlServer ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
<!-- PostgreSQL Lib -->
|
||||
<unjar src="lib/postgresql.jar" dest="${buildPostgreSQL.dir}"/>
|
||||
|
||||
<!-- Clean up -->
|
||||
|
||||
<!-- Create postgresql.jar file -->
|
||||
<jar jarfile="${dist.dir}/postgresql.jar">
|
||||
<fileset dir="${buildPostgreSQL.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="PostgreSQL JDBC"/>
|
||||
<attribute name="Specification-Version" value="postgresql"/>
|
||||
<attribute name="Specification-Vendor" value="postgresql"/>
|
||||
<attribute name="Implementation-Title" value="postgresql ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Buld Server Jar -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsServer" depends="toolsCompile"
|
||||
unless="jars.uptodate"
|
||||
description="Create CSTools.jar">
|
||||
|
||||
<!-- Unjar libraries for CSTools ***** -->
|
||||
<!-- JSTL -->
|
||||
<unjar src="lib/jstl.jar" dest="${buildServer.dir}" />
|
||||
<unjar src="lib/standard.jar" dest="${buildServer.dir}" />
|
||||
<!-- ECS, etc -->
|
||||
<copy todir="${buildServer.dir}/org/apache/ecs">
|
||||
<fileset dir="${build.dir}/org/apache/ecs" />
|
||||
</copy>
|
||||
<!-- Payment Processors -->
|
||||
<unjar src="lib/Verisign.jar" dest="${buildServer.dir}" />
|
||||
<unjar src="lib/jpayment.jar" dest="${buildServer.dir}" />
|
||||
<!-- Log4J, jnlp -->
|
||||
<unjar src="lib/log4j.jar" dest="${buildServer.dir}"/>
|
||||
<unjar src="lib/jnlp.jar" dest="${buildServer.dir}"/>
|
||||
<!-- Barcode, ftp -->
|
||||
<unjar src="lib/barbecue-1.0.6d.jar" dest="${buildServer.dir}"/>
|
||||
<unjar src="lib/commons-net-1.4.0.jar" dest="${buildServer.dir}"/>
|
||||
|
||||
<!-- Derby Server -->
|
||||
<unjar src="../derby/derby.jar" dest="${buildServer.dir}"/>
|
||||
<unjar src="../derby/derbynet.jar" dest="${buildServer.dir}"/>
|
||||
<unjar src="../derby/derbytools.jar" dest="${buildServer.dir}"/>
|
||||
<!-- Adempiere look and feel -->
|
||||
<unjar src="lib/looks-2.0.4.jar" dest="${buildServer.dir}"/>
|
||||
|
||||
|
||||
|
||||
<!-- Clean up -->
|
||||
<delete file="${buildServer.dir}/META-INF/MANIFEST.MF" failonerror="false"/>
|
||||
|
||||
<!-- Create CSTools jar -->
|
||||
<jar jarfile="${dist.dir}/CSTools.jar">
|
||||
<fileset dir="${buildServer.dir}" />
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="Adempiere Server Tools"/>
|
||||
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Specification-Vendor" value="(C) 2006 ComPiere, Inc."/>
|
||||
<attribute name="Implementation-Title" value="CSTools ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Buld Client Jar -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsClient" depends="toolsCompile"
|
||||
unless="jars.uptodate"
|
||||
description="Create CCTools.jar">
|
||||
|
||||
<!-- Unjar libraries for CCTools ***** -->
|
||||
<!-- Mail -->
|
||||
<unjar src="lib/activation.jar" dest="${buildClient.dir}" />
|
||||
<unjar src="lib/mail.jar" dest="${buildClient.dir}" />
|
||||
<!-- Bean Shell -->
|
||||
<unjar src="lib/bsh-1.3.0.jar" dest="${buildClient.dir}" />
|
||||
<!-- Payment Processors -->
|
||||
<unjar src="lib/Verisign.jar" dest="${buildClient.dir}" />
|
||||
<unjar src="lib/jpayment.jar" dest="${buildClient.dir}" />
|
||||
<!-- Log4J, jnlp -->
|
||||
<unjar src="lib/log4j.jar" dest="${buildClient.dir}"/>
|
||||
<unjar src="lib/jnlp.jar" dest="${buildClient.dir}"/>
|
||||
<!-- Barcode, ftp -->
|
||||
<unjar src="lib/barbecue-1.0.6d.jar" dest="${buildClient.dir}"/>
|
||||
<unjar src="lib/commons-net-1.4.0.jar" dest="${buildClient.dir}"/>
|
||||
<!-- JFreeChart -->
|
||||
<unjar src="lib/jfreechart-1.0.2.jar" dest="${buildClient.dir}"/>
|
||||
<unjar src="lib/jcommon-1.0.5.jar" dest="${buildClient.dir}"/>
|
||||
<!-- Graph -->
|
||||
<unjar src="lib/jgraph.jar" dest="${buildClient.dir}"/>
|
||||
<!-- Adempeire Look and Feal -->
|
||||
<unjar src="lib/looks-2.0.4.jar" dest="${buildClient.dir}"/>
|
||||
|
||||
<!-- Clean up -->
|
||||
<delete>
|
||||
<fileset dir="${buildClient.dir}" includes="build.xml"/>
|
||||
<fileset dir="${buildClient.dir}/META-INF" casesensitive="no" includes="*.mf,*.sf,*.rsa,*.dsa"/>
|
||||
</delete>
|
||||
|
||||
<!-- Create CCTools.jar file -->
|
||||
<jar jarfile="${dist.dir}/CCTools.jar">
|
||||
<fileset dir="${build.dir}" includes="**/ecs/**" />
|
||||
<fileset dir="${buildClient.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Specification-Title" value="Adempiere Client Tools"/>
|
||||
<attribute name="Specification-Version" value="${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Specification-Vendor" value="(C) 2006 ComPiere, Inc."/>
|
||||
<attribute name="Implementation-Title" value="CCTools ${env.ADEMPIERE_VERSION}"/>
|
||||
<attribute name="Implementation-Version" value="${env.ADEMPIERE_VERSION} ${DSTAMP}-${TSTAMP}"/>
|
||||
<attribute name="Implementation-Vendor" value="${env.ADEMPIERE_VENDOR}"/>
|
||||
<attribute name="Implementation-URL" value="http://www.adempiere.org"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Buld Jars -->
|
||||
<!-- ============================================= -->
|
||||
<target name="toolsDistribution"
|
||||
depends="toolsServer, toolsClient, toolsAppsServer, toolsDatabase"
|
||||
unless="jars.uptodate"
|
||||
description="Create jars">
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<!-- ============================================= -->
|
||||
<!-- Clean up -->
|
||||
<!-- ============================================= -->
|
||||
<target name="clean">
|
||||
<!-- Delete the ${build.dir} directory trees -->
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete file="${dist.dir}/CCTools.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/CSTools.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/jboss.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/oracle.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/db2.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/derby.jar" failonerror="false"/>
|
||||
<delete file="${dist.dir}/sqlServer.jar" failonerror="false"/>
|
||||
</target>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,5 @@
|
|||
@Rem API Documentation for Base
|
||||
|
||||
call ..\doc\documentation.bat src doc -private
|
||||
|
||||
@pause
|
Binary file not shown.
|
@ -0,0 +1,27 @@
|
|||
@Title Copy Libraries from Source
|
||||
|
||||
@Echo Log4j http://jakarta.apache.org/log4j
|
||||
@xcopy C:\Sources\jakarta-log4j-1.2.8\dist\lib\log4j-1.2.8.jar log4j.jar /V /D
|
||||
|
||||
|
||||
@Echo Mail
|
||||
@xcopy C:\Sources\jaf-1.0.2\activation.jar /V /D
|
||||
@xcopy C:\Sources\javamail-1.3\mail.jar /V /D
|
||||
|
||||
|
||||
@Echo JSTL http://jakarta.apache.org/taglibs
|
||||
@xcopy C:\Sources\jakarta-taglibs\standard-1.0.3\lib\jstl.jar /V /D
|
||||
@xcopy C:\Sources\jakarta-taglibs\standard-1.0.3\lib\standard.jar /V /D
|
||||
@xcopy C:\Sources\jakarta-taglibs\standard-1.0.3\lib\saxpath.jar /V /D
|
||||
|
||||
|
||||
@Echo OracleRowSet ocrs12.jar
|
||||
|
||||
|
||||
@Echo JUnit http://www.junit.org
|
||||
@xcopy C:\Sources\junit3.8.1\junit.jar /V /D
|
||||
|
||||
@Echo Ant in distribution http://ant.apache.org
|
||||
@xcopy C:\Sources\apache-ant-1.6.2\lib\ant.jar /V /D
|
||||
|
||||
@pause
|
|
@ -0,0 +1,55 @@
|
|||
External Libraries
|
||||
==================
|
||||
|
||||
$Id: libraries.txt,v 1.1 2006/04/21 18:06:25 jjanke Exp $
|
||||
|
||||
For CTools.jar
|
||||
==============
|
||||
|
||||
mail.jar
|
||||
Java Mail 1.3 C:\Sources\javamail-1.3
|
||||
|
||||
activation.jar
|
||||
Java Activation 1.0.2 C:\Sources\jaf-1.0.2
|
||||
|
||||
bsh-core-2.0b1.jar
|
||||
Bean Shell http://www.beanshell.org/download.html
|
||||
|
||||
Verisign.jar
|
||||
PayFlowPro 3.06
|
||||
|
||||
xdoclet.jar
|
||||
XDoclet 1.1.2 http://xdoclet.sourceforge.net/
|
||||
|
||||
standard.jar
|
||||
jstl.jar
|
||||
JSTL Version 1.1 http://jakarta.apache.org/taglibs/index.html
|
||||
|
||||
log4j.jar
|
||||
Log4J 1.2.9 http://logging.apache.org/site/binindex.html
|
||||
|
||||
--------
|
||||
|
||||
ojdbc14.jar Oracle JDBC 9.2.0.3 - also lib/oracle.jar
|
||||
ojdbc14_g.jar Oracle JDBC 9.2.0.3 debug
|
||||
ocrs12.jar Oracle JDBC 9.2.0.3 RowSet
|
||||
|
||||
--------
|
||||
|
||||
Build
|
||||
-----
|
||||
ant.jar
|
||||
ant-launcher.jar
|
||||
ant-commons-net.jar
|
||||
Ant 1.6.2 http://ant.apache.org/bindownload.cgi
|
||||
commons-net.jar
|
||||
Commons Net 1.1.0 http://jakarta.apache.org/site/binindex.cgi
|
||||
jakarta-oro.jar
|
||||
ORO 2.0.8
|
||||
|
||||
|
||||
servlet.jar
|
||||
javax.servlet
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
org.apache.ecs.filter
|
||||
org.apache.ecs.html
|
||||
org.apache.ecs.storage
|
||||
org.apache.ecs.xhtml
|
||||
org.apache.ecs.xml
|
|
@ -0,0 +1,48 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
This interface is intended to be implemented by elements that require
|
||||
alignment attributes.
|
||||
|
||||
@version $Id: AlignType.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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";
|
||||
|
||||
/** 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);
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
This interface describes the attributes within an element. It is
|
||||
implemented by ElementAttributes.
|
||||
|
||||
@version $Id: Attributes.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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() );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,440 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public class ConcreteElement extends ElementAttributes implements Cloneable
|
||||
{
|
||||
/** HTML nbsp */
|
||||
public static final String NBSP = " ";
|
||||
|
||||
/**
|
||||
* keep a list of elements that need to be added to the element
|
||||
* @serial registry registry */
|
||||
private Hashtable<String,Element> registry = new Hashtable<String,Element>(4);
|
||||
/** Maintain an ordered list of elements */
|
||||
private Vector<String> registryList = new Vector<String>(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);
|
||||
int hc = element.hashCode(); // causes error when compiles in 1.4 ??
|
||||
String s = Integer.toString(hc);
|
||||
addElementToRegistry(s, 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 value 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 value 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 value 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 value 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 hashcode find out if this element is in the registry
|
||||
*/
|
||||
public boolean registryHasElement(String hashcode)
|
||||
{
|
||||
return(registry.containsKey(hashcode));
|
||||
}
|
||||
|
||||
/**
|
||||
Override output(OutputStream) incase any elements are in the registry.
|
||||
@param out OutputStream to write to.
|
||||
*/
|
||||
public void output(OutputStream out)
|
||||
{
|
||||
boolean prettyPrint = getPrettyPrint();
|
||||
int tabLevel = getTabLevel();
|
||||
try
|
||||
{
|
||||
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().getBytes());
|
||||
|
||||
// If this is a StringElement that has ChildElements still print the TagText
|
||||
if(getTagText() != null)
|
||||
out.write(getTagText().getBytes());
|
||||
|
||||
Enumeration en = registryList.elements();
|
||||
|
||||
while(en.hasMoreElements())
|
||||
{
|
||||
Object obj = registry.get(en.nextElement());
|
||||
if(obj instanceof GenericElement)
|
||||
{
|
||||
Element e = (Element)obj;
|
||||
if (prettyPrint && this instanceof Printable)
|
||||
{
|
||||
if ( getNeedLineBreak() )
|
||||
{
|
||||
out.write('\n');
|
||||
e.setTabLevel(tabLevel + 1);
|
||||
}
|
||||
}
|
||||
e.output(out);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prettyPrint && this instanceof Printable)
|
||||
{
|
||||
if ( getNeedLineBreak() )
|
||||
{
|
||||
out.write('\n');
|
||||
putTabs(tabLevel + 1, out);
|
||||
}
|
||||
}
|
||||
String string = obj.toString();
|
||||
out.write(string.getBytes());
|
||||
}
|
||||
}
|
||||
if (getNeedClosingTag())
|
||||
{
|
||||
if (prettyPrint && this instanceof Printable)
|
||||
{
|
||||
if ( getNeedLineBreak() )
|
||||
{
|
||||
out.write('\n');
|
||||
if (tabLevel > 0)
|
||||
putTabs(tabLevel, out);
|
||||
}
|
||||
}
|
||||
out.write(createEndTag().getBytes());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(IOException ioe)
|
||||
{
|
||||
ioe.printStackTrace(new PrintWriter(out));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Writer version of this method.
|
||||
*/
|
||||
public void output(Writer out)
|
||||
{
|
||||
output ( new PrintWriter(out) );
|
||||
}
|
||||
|
||||
/**
|
||||
Override output(BufferedWriter) incase any elements are in the registry.
|
||||
@param out 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 en = registryList.elements();
|
||||
while(en.hasMoreElements())
|
||||
{
|
||||
Object obj = registry.get(en.nextElement());
|
||||
if(obj instanceof GenericElement)
|
||||
{
|
||||
Element e = (Element)obj;
|
||||
if (prettyPrint && this instanceof Printable)
|
||||
{
|
||||
if (getNeedLineBreak()) {
|
||||
out.write('\n');
|
||||
e.setTabLevel(tabLevel + 1);
|
||||
}
|
||||
}
|
||||
e.output(out);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prettyPrint && this instanceof Printable)
|
||||
{
|
||||
if (getNeedLineBreak()) {
|
||||
out.write('\n');
|
||||
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('\n');
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,398 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 The Java Apache Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. All advertising materials mentioning features or use of this
|
||||
* software must display the following acknowledgment:
|
||||
* "This product includes software developed by the Java Apache
|
||||
* Project. <http://java.apache.org/>"
|
||||
*
|
||||
* 4. The names "Java Apache Element Construction Set", "Java Apache ECS" and
|
||||
* "Java Apache Project" must not be used to endorse or promote products
|
||||
* derived from this software without prior written permission.
|
||||
*
|
||||
* 5. Products derived from this software may not be called
|
||||
* "Java Apache Element Construction Set" nor "Java Apache ECS" appear
|
||||
* in their names without prior written permission of the
|
||||
* Java Apache Project.
|
||||
*
|
||||
* 6. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by the Java Apache
|
||||
* Project. <http://java.apache.org/>"
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE JAVA APACHE PROJECT "AS IS" AND ANY
|
||||
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JAVA APACHE PROJECT OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Java Apache Project. For more information
|
||||
* on the Java Apache Project please see <http://java.apache.org/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This class creates a <!DOCTYPE> tag.<p>
|
||||
*
|
||||
* Format:<br>
|
||||
<!DOCTYPE [name] [visibility] [identifier] [uri]><p>
|
||||
<p>
|
||||
usage:<br>
|
||||
Document d = new Document()<br>
|
||||
.setDoctype(new Doctype.Html40Strict())<br>
|
||||
<p> or <p>
|
||||
XMLDocument d = new XMLDocument()<br>
|
||||
.addToProlog( new Doctype( "foo", "\"--/bar/baz/en\"", "\"http://qoz.net/foo.dtd\"" );<br>
|
||||
* .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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
* @author <a href="mailto:heuermh@shore.net">Michael Heuer</a>
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:brucedu@netscape.net">Bruce Durling</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 visibility visibility
|
||||
* @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.
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/REC-html40/sgml/dtd.html">
|
||||
* http://www.w3.org/TR/REC-html40/sgml/dtd.html</a>
|
||||
*/
|
||||
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).
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/REC-html40/sgml/loosedtd.html">
|
||||
* http://www.w3.org/TR/REC-html40/sgml/loosedtd.html</a>
|
||||
*/
|
||||
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.
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html">
|
||||
* http://www.w3.org/TR/REC-html40/sgml/framesetdtd.html</a>
|
||||
*/
|
||||
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 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.
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/xhtml1">
|
||||
* http://www.w3.org/TR/xhtml1</a>
|
||||
*/
|
||||
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.
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/xhtml1">
|
||||
* http://www.w3.org/TR/xhtml1</a>
|
||||
*/
|
||||
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.
|
||||
* <p>
|
||||
* See: <a href="http://www.w3.org/TR/xhtml1">
|
||||
* http://www.w3.org/TR/xhtml1</a>
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
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.
|
||||
|
||||
@version $Id: ECSDefaults.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
*/
|
||||
public class ECSDefaults
|
||||
{
|
||||
protected static ResourceBundle resource;
|
||||
|
||||
// private initializer.
|
||||
static {
|
||||
try
|
||||
{
|
||||
resource = ResourceBundle.getBundle("org.apache.ecs.ecs");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.err.println("Cannot find org.apache.ecs.ecs.properties.");
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean filter_state = new Boolean(resource.getString("filter_state")).booleanValue();
|
||||
|
||||
private static boolean filter_attribute_state = new Boolean(resource.getString("filter_attribute_state")).booleanValue();
|
||||
|
||||
private static char attribute_equality_sign = resource.getString("attribute_equality_sign").charAt(1);
|
||||
|
||||
private static char begin_start_modifier = resource.getString("begin_start_modifier").charAt(1);
|
||||
|
||||
private static char end_start_modifier = resource.getString("end_start_modifier").charAt(1);
|
||||
|
||||
private static char begin_end_modifier = resource.getString("begin_end_modifier").charAt(1);
|
||||
|
||||
private static char end_end_modifier = resource.getString("end_end_modifier").charAt(1);
|
||||
|
||||
private static char attribute_quote_char = resource.getString("attribute_quote_char").charAt(0);
|
||||
|
||||
private static boolean attribute_quote = new Boolean(resource.getString("attribute_quote")).booleanValue();
|
||||
|
||||
private static boolean end_element = new Boolean(resource.getString("end_element")).booleanValue();
|
||||
|
||||
private static String codeset = resource.getString("codeset");
|
||||
|
||||
private static int position = Integer.parseInt(resource.getString("position"));
|
||||
|
||||
private static int case_type = Integer.parseInt(resource.getString("case_type"));
|
||||
|
||||
private static char start_tag = resource.getString("start_tag").charAt(0);
|
||||
|
||||
private static char end_tag = resource.getString("end_tag").charAt(0);
|
||||
|
||||
private static boolean pretty_print = new Boolean(resource.getString("pretty_print")).booleanValue();
|
||||
|
||||
|
||||
/**
|
||||
Should we filter the value of <>VALUE</>
|
||||
*/
|
||||
public static boolean getDefaultFilterState()
|
||||
{
|
||||
return filter_state;
|
||||
}
|
||||
|
||||
/**
|
||||
Should we filter the value of the element attributes
|
||||
*/
|
||||
public static boolean getDefaultFilterAttributeState()
|
||||
{
|
||||
return filter_attribute_state;
|
||||
}
|
||||
|
||||
/**
|
||||
What is the equality character for an attribute.
|
||||
*/
|
||||
public static char getDefaultAttributeEqualitySign()
|
||||
{
|
||||
return attribute_equality_sign;
|
||||
}
|
||||
|
||||
/**
|
||||
What the start modifier should be
|
||||
*/
|
||||
public static char getDefaultBeginStartModifier()
|
||||
{
|
||||
return begin_start_modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
What the start modifier should be
|
||||
*/
|
||||
public static char getDefaultEndStartModifier()
|
||||
{
|
||||
return end_start_modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
What the end modifier should be
|
||||
*/
|
||||
public static char getDefaultBeginEndModifier()
|
||||
{
|
||||
return begin_end_modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
What the end modifier should be
|
||||
*/
|
||||
public static char getDefaultEndEndModifier()
|
||||
{
|
||||
return end_end_modifier;
|
||||
}
|
||||
|
||||
/*
|
||||
What character should we use for quoting attributes.
|
||||
*/
|
||||
public static char getDefaultAttributeQuoteChar()
|
||||
{
|
||||
return attribute_quote_char;
|
||||
}
|
||||
|
||||
/*
|
||||
Should we wrap quotes around an attribute?
|
||||
*/
|
||||
public static boolean getDefaultAttributeQuote()
|
||||
{
|
||||
return attribute_quote;
|
||||
}
|
||||
|
||||
/**
|
||||
Does this element need a closing tag?
|
||||
*/
|
||||
public static boolean getDefaultEndElement()
|
||||
{
|
||||
return end_element;
|
||||
}
|
||||
|
||||
/**
|
||||
What codeset are we going to use the default is 8859_1
|
||||
*/
|
||||
public static String getDefaultCodeset()
|
||||
{
|
||||
return codeset;
|
||||
}
|
||||
|
||||
/**
|
||||
position of tag relative to start and end.
|
||||
*/
|
||||
public static int getDefaultPosition()
|
||||
{
|
||||
return position;
|
||||
}
|
||||
|
||||
/**
|
||||
Default value to set case type
|
||||
*/
|
||||
public static int getDefaultCaseType()
|
||||
{
|
||||
return case_type;
|
||||
}
|
||||
|
||||
public static char getDefaultStartTag()
|
||||
{
|
||||
return start_tag;
|
||||
}
|
||||
|
||||
public static char getDefaultEndTag()
|
||||
{
|
||||
return end_tag;
|
||||
}
|
||||
|
||||
/**
|
||||
Should we print html in a more readable format?
|
||||
*/
|
||||
public static boolean getDefaultPrettyPrint()
|
||||
{
|
||||
return pretty_print;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
This class describes an ElementFactory.
|
||||
|
||||
@version $Id: Element.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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> <br>
|
||||
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);
|
||||
|
||||
}
|
|
@ -0,0 +1,338 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
|
||||
public abstract class ElementAttributes extends GenericElement implements Attributes
|
||||
{
|
||||
/**
|
||||
Basic Constructor.
|
||||
*/
|
||||
public ElementAttributes()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
Filter to use to escape attribute input.
|
||||
By default the attribute filter and the element filter are the same.
|
||||
@serial attribute_filter attribute_filter
|
||||
*/
|
||||
private Filter attribute_filter = getFilter();
|
||||
|
||||
/**
|
||||
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.
|
||||
*/
|
||||
protected 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 attribute_filter the filter we want to use for element attributes. By <br>
|
||||
default it is the same as is used for the value of the tag. It is assumed<br>
|
||||
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.
|
||||
Filter the filter we want to use for element attributes. By <br>
|
||||
default it is the same as is used for the value of the tag. It is assumed<br>
|
||||
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)
|
||||
{
|
||||
if (attribute_name != null && attribute_value != null)
|
||||
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.
|
||||
*/
|
||||
protected String createStartTag()
|
||||
{
|
||||
StringBuffer out = new StringBuffer();
|
||||
|
||||
out.append(getStartTagChar());
|
||||
|
||||
if(getBeginStartModifierDefined())
|
||||
{
|
||||
out.append(getBeginStartModifier());
|
||||
}
|
||||
out.append(getElementType());
|
||||
|
||||
Enumeration en = getElementHashEntry().keys();
|
||||
String value = null; // avoid creating a new string object on each pass through the loop
|
||||
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
String attr = (String) en.nextElement();
|
||||
if(getAttributeFilterState())
|
||||
{
|
||||
value = getAttributeFilter().process(getElementHashEntry().get(attr).toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
value = (String) getElementHashEntry().get(attr);
|
||||
}
|
||||
out.append(' ');
|
||||
out.append(alterCase(attr));
|
||||
if(!value.equalsIgnoreCase(NO_ATTRIBUTE_VALUE) && getAttributeQuote())
|
||||
{
|
||||
out.append(getAttributeEqualitySign());
|
||||
out.append(getAttributeQuoteChar());
|
||||
out.append(value);
|
||||
out.append(getAttributeQuoteChar());
|
||||
}
|
||||
else if( !getAttributeQuote() )
|
||||
{
|
||||
out.append(getAttributeEqualitySign());
|
||||
out.append(value);
|
||||
}
|
||||
}
|
||||
if(getBeginEndModifierDefined())
|
||||
{
|
||||
out.append(getBeginEndModifier());
|
||||
}
|
||||
out.append(getEndTagChar());
|
||||
|
||||
return(out.toString());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.
|
||||
|
||||
<code><pre>
|
||||
P p = new P().addElement("foo");
|
||||
P p1 = new P().addElement("bar");
|
||||
ElementContainer ec = new ElementContainer(p).addElement(p1);
|
||||
System.out.println(ec.toString());
|
||||
</pre></code>
|
||||
|
||||
@version $Id: ElementContainer.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public class ElementContainer extends ConcreteElement implements Printable
|
||||
{
|
||||
/**
|
||||
internal use only
|
||||
@serial ec ec
|
||||
*/
|
||||
private Vector<Object> ec = new Vector<Object>(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();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
Interface for Elements that implement a registry.
|
||||
@version $Id: ElementRegistry.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
|
@ -0,0 +1,317 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
This interface describes all html 4.0 entities.
|
||||
@version $Id: Entities.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
This class creates an interface for all filters.
|
||||
<P>
|
||||
For example:
|
||||
<P>
|
||||
<pre><code>
|
||||
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);
|
||||
</pre></code>
|
||||
|
||||
The filter is applied when the addElement() method is called.
|
||||
|
||||
@version $Id: Filter.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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();
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,816 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
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.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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 = "Adempiere.5.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<String, Object> element = new Hashtable<String, Object>(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<String,Object> 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 <br>
|
||||
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 <br>
|
||||
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 <br>
|
||||
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 start_modifier the modifier for the element a ? would result <br>
|
||||
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 <br>
|
||||
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 <br>
|
||||
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 <br>
|
||||
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 start_modifier the modifier for the element a ? would result <br>
|
||||
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);
|
||||
}
|
||||
|
||||
protected 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());
|
||||
}
|
||||
|
||||
protected 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()
|
||||
{
|
||||
String out = null;
|
||||
try
|
||||
{
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
BufferedOutputStream bos = new BufferedOutputStream(baos);
|
||||
output(bos);
|
||||
bos.flush();
|
||||
|
||||
if ( getCodeSet() != null )
|
||||
{
|
||||
out = baos.toString(getCodeSet());
|
||||
} else
|
||||
{
|
||||
out = baos.toString();
|
||||
}
|
||||
|
||||
bos.close();
|
||||
baos.close();
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
}
|
||||
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());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
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');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,775 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
This class defines all of the available Html Colors.
|
||||
|
||||
@version $Id: HtmlColor.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public abstract class HtmlColor
|
||||
{
|
||||
|
||||
// colors html 4.0
|
||||
|
||||
/** HTML 4.0 specification for color <font color="#000000">BLACK</font>. */
|
||||
public final static String BLACK = "#000000";
|
||||
/** HTML 4.0 specification for color <font color="#C0C0C0">SILVER</font>. */
|
||||
public final static String SILVER = "#C0C0C0";
|
||||
/** HTML 4.0 specification for color <font color="#808080">GRAY</font>. */
|
||||
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 <font color="#800000">MAROON</font>. */
|
||||
public final static String MAROON = "#800000";
|
||||
/** HTML 4.0 specification for color <font color="#FF0000">RED</font>. */
|
||||
public final static String RED = "#FF0000";
|
||||
/** HTML 4.0 specification for color <font color="#800080">PURPLE</font>. */
|
||||
public final static String PURPLE = "#800080";
|
||||
/** HTML 4.0 specification for color <font color="#FF00FF">FUCHSIA</font>. */
|
||||
public final static String FUCHSIA = "#FF00FF";
|
||||
/** HTML 4.0 specification for color <font color="#008000">GREEN</font>. */
|
||||
public final static String GREEN = "#008000";
|
||||
/** HTML 4.0 specification for color <font color="#00FF00">LIME</font>. */
|
||||
public final static String LIME = "#00FF00";
|
||||
/** HTML 4.0 specification for color <font color="#808000">OLIVE</font>. */
|
||||
public final static String OLIVE = "#808000";
|
||||
/** HTML 4.0 specification for color <font color="#FFFF00">YELLOW</font>. */
|
||||
public final static String YELLOW = "#FFFF00";
|
||||
/** HTML 4.0 specification for color <font color="#000080">NAVY</font>. */
|
||||
public final static String NAVY = "#000080";
|
||||
/** HTML 4.0 specification for color <font color="#0000FF">BLUE</font>. */
|
||||
public final static String BLUE = "#0000FF";
|
||||
/** HTML 4.0 specification for color <font color="#008080">TEAL</font>. */
|
||||
public final static String TEAL = "#008080";
|
||||
/** HTML 4.0 specification for color <font color="#00FFFF">AQUA</font>. */
|
||||
public final static String AQUA = "#00FFFF";
|
||||
|
||||
// colors html 3.0
|
||||
|
||||
/** HTML 3.0 specification for color <font color="#EFF7FF">ALICEBLUEOC</font>. */
|
||||
public final static String ALICEBLUE = "#EFF7FF";
|
||||
/** HTML 3.0 specification for color <font color="#F9E8D2">ANTIQUEWHITE</font>. */
|
||||
public final static String ANTIQUEWHITE = "#F9E8D2";
|
||||
/** HTML 3.0 specification for color <font color="#43B7BA">AQUAMARINE</font>. */
|
||||
public final static String AQUAMARINE = "#43B7BA";
|
||||
/** HTML 3.0 specification for color <font color="#EFFFFF">AZURE</font>. */
|
||||
public final static String AZURE = "#EFFFFF";
|
||||
/** HTML 3.0 specification for color <font color="#F5F3D7">BEIGE</font>. */
|
||||
public final static String BEIGE = "#F5F3D7";
|
||||
/** HTML 3.0 specification for color <font color="#FDE0BC">BISQUE</font>. */
|
||||
public final static String BISQUE = "#FDE0BC";
|
||||
/** HTML 3.0 specification for color <font color="#FEE8C6">BLANCHEDALMOND</font>. */
|
||||
public final static String BLANCHEDALMOND = "#FEE8C6";
|
||||
/** HTML 3.0 specification for color <font color="#7931DF">BLUEVIOLET</font>. */
|
||||
public final static String BLUEVIOLET = "#7931DF";
|
||||
/** HTML 3.0 specification for color <font color="#980516">BROWN</font>. */
|
||||
public final static String BROWN = "#980516";
|
||||
/** HTML 3.0 specification for color <font color="#EABE83">BURLYWOOD</font>. */
|
||||
public final static String BURLYWOOD = "#EABE83";
|
||||
/** HTML 3.0 specification for color <font color="#578693">CADETBLUE</font>. */
|
||||
public final static String CADETBLUE = "#578693";
|
||||
/** HTML 3.0 specification for color <font color="#8AFB17">CHARTREUSE</font>. */
|
||||
public final static String CHARTREUSE = "#8AFB17";
|
||||
/** HTML 3.0 specification for color <font color="#C85A17">CHOCOLATE</font>. */
|
||||
public final static String CHOCOLATE = "#C85A17";
|
||||
/** HTML 3.0 specification for color <font color="#F76541">CORAL</font>. */
|
||||
public final static String CORAL = "#F76541";
|
||||
/** HTML 3.0 specification for color <font color="#151B8D">CORNFLOWERBLUE</font>. */
|
||||
public final static String CORNFLOWERBLUE = "#151B8D";
|
||||
/** HTML 3.0 specification for color <font color="#FFF7D7">CORNSILK</font>.*/
|
||||
public final static String CORNSILK = "#FFF7D7";
|
||||
/** HTML 3.0 specification for color <font color="#E41B17">CRIMSON</font>.
|
||||
* RED2 couldn't find CRIMSON */
|
||||
public final static String CRIMSON = "#E41B17";
|
||||
/** HTML 3.0 specification for color <font color="#00FFFF">CYAN</font>. */
|
||||
public final static String CYAN = "#00FFFF";
|
||||
/** HTML 3.0 specification for color <font color="#2F2F4F">DARKBLUE</font>.
|
||||
* MIDNIGHTBLUE couldn't find DARKBLUE */
|
||||
public final static String DARKBLUE = "#2F2F4F";
|
||||
/** HTML 3.0 specification for color <font color="#57FEFF">DARKCYAN</font>.
|
||||
* CYAN1 couldn't find DARKCYAN */
|
||||
public final static String DARKCYAN = "#57FEFF";
|
||||
/** HTML 3.0 specification for color <font color="#AF7817">DARKGOLDENROD</font>. */
|
||||
public final static String DARKGOLDENROD = "#AF7817";
|
||||
/** HTML 3.0 specification for color <font color="#7A7777">DARKGRAY</font>.
|
||||
* GRAY52 couldn't find DARKGRAY */
|
||||
public final static String DARKGRAY = "#7A7777";
|
||||
/** HTML 3.0 specification for color <font color="#254117">DARKGREEN</font>. */
|
||||
public final static String DARKGREEN = "#254117";
|
||||
/** HTML 3.0 specification for color <font color="#B7AD59">DARKKHAKI</font>. */
|
||||
public final static String DARKKHAKI = "#B7AD59";
|
||||
/** HTML 3.0 specification for color <font color="#F43EFF">DARKMAGENTA</font>.
|
||||
* MAGENTA1 couldn't find DARKMAGENTA */
|
||||
public final static String DARKMAGENTA = "#F43EFF";
|
||||
/** HTML 3.0 specification for color <font color="#CCFB5D">DARKOLIVEGREEN</font>. */
|
||||
public final static String DARKOLIVEGREEN = "#CCFB5D";
|
||||
/** HTML 3.0 specification for color <font color="#F88017">DARKORANGE</font>. */
|
||||
public final static String DARKORANGE = "#F88017";
|
||||
/** HTML 3.0 specification for color <font color="#7D1B7E">DARKORCHID</font>. */
|
||||
public final static String DARKORCHID = "#7D1B7E";
|
||||
/** HTML 3.0 specification for color <font color="#E41B17">DARKRED</font>.
|
||||
* RED2 couldn't find DARKRED */
|
||||
public final static String DARKRED = "#E41B17";
|
||||
/** HTML 3.0 specification for color <font color="#E18B6B">DARKSALMON</font>. */
|
||||
public final static String DARKSALMON = "#E18B6B";
|
||||
/** HTML 3.0 specification for color <font color="#8BB381">DARKSEAGREEN</font>. */
|
||||
public final static String DARKSEAGREEN = "#8BB381";
|
||||
/** HTML 3.0 specification for color <font color="#2B3856">DARKSLATEBLUE</font>. */
|
||||
public final static String DARKSLATEBLUE = "#2B3856";
|
||||
/** HTML 3.0 specification for color <font color="#253856">DARKSLATEGRAY</font>. */
|
||||
public final static String DARKSLATEGRAY = "#253856";
|
||||
/** HTML 3.0 specification for color <font color="#3B9C9C">DARKTURQUOISE</font>. */
|
||||
public final static String DARKTURQUOISE = "#3B9C9C";
|
||||
/** HTML 3.0 specification for color <font color="#842DCE">DARKVIOLET</font>. */
|
||||
public final static String DARKVIOLET = "#842DCE";
|
||||
/** HTML 3.0 specification for color <font color="#F52887">DEEPPINK</font>. */
|
||||
public final static String DEEPPINK = "#F52887";
|
||||
/** HTML 3.0 specification for color <font color="#3BB9FF">DEEPSKYBLUE</font>. */
|
||||
public final static String DEEPSKYBLUE = "#3BB9FF";
|
||||
/** HTML 3.0 specification for color <font color="#463E41">DIMGRAY</font>. */
|
||||
public final static String DIMGRAY = "#463E41";
|
||||
/** HTML 3.0 specification for color <font color="#1589FF">DODGERBLUE</font>. */
|
||||
public final static String DODGERBLUE = "#1589FF";
|
||||
/** HTML 3.0 specification for color <font color="#800517">FIREBRICK</font>. */
|
||||
public final static String FIREBRICK = "#800517";
|
||||
/** HTML 3.0 specification for color <font color="#FFF9EE">FLORALWHITE</font>. */
|
||||
public final static String FLORALWHITE = "#FFF9EE";
|
||||
/** HTML 3.0 specification for color <font color="#4E9258">FORESTGREEN</font>. */
|
||||
public final static String FORESTGREEN = "#4E9258";
|
||||
/** HTML 3.0 specification for color <font color="#D8D9D7">GAINSBORO</font>. */
|
||||
public final static String GAINSBORO = "#D8D9D7";
|
||||
/** HTML 3.0 specification for color <font color="#F7F7FF">GHOSTWHITE</font>. */
|
||||
public final static String GHOSTWHITE = "#F7F7FF";
|
||||
/** HTML 3.0 specification for color <font color="#D4A017">GOLD</font>. */
|
||||
public final static String GOLD = "#D4A017";
|
||||
/** HTML 3.0 specification for color <font color="#EDDA74">GOLDENROD</font>. */
|
||||
public final static String GOLDENROD = "#EDDA74";
|
||||
/** HTML 3.0 specification for color <font color="#B1FB17">GREENYELLOW</font>. */
|
||||
public final static String GREENYELLOW = "#B1FB17";
|
||||
/** HTML 3.0 specification for color <font color="#F0FEEE">HONEYDEW</font>. */
|
||||
public final static String HONEYDEW = "#F0FEEE";
|
||||
/** HTML 3.0 specification for color <font color="#5E2217">INDIANRED</font>. */
|
||||
public final static String INDIANRED = "#5E2217";
|
||||
/** HTML 3.0 specification for color <font color="#307D7E">INDIGO</font>.
|
||||
* CYAN4 couldn't find INDIGO */
|
||||
public final static String INDIGO = "#307D7E";
|
||||
/** HTML 3.0 specification for color <font color="#FFFFEE">IVORY</font>. */
|
||||
public final static String IVORY = "#FFFFEE";
|
||||
/** HTML 3.0 specification for color <font color="#ADA96E">KHAKI</font>. */
|
||||
public final static String KHAKI = "#ADA96E";
|
||||
/** HTML 3.0 specification for color <font color="#E3E4FA">LAVENDER</font>. */
|
||||
public final static String LAVENDER = "#E3E4FA";
|
||||
/** HTML 3.0 specification for color <font color="#FDEEF4">LAVENDERBLUSH</font>. */
|
||||
public final static String LAVENDERBLUSH = "#FDEEF4";
|
||||
/** HTML 3.0 specification for color <font color="#87F717">LAWNGREEN</font>. */
|
||||
public final static String LAWNGREEN = "#87F717";
|
||||
/** HTML 3.0 specification for color <font color="#FFF8C6">LEMONCHIFFON</font>. */
|
||||
public final static String LEMONCHIFFON = "#FFF8C6";
|
||||
/** HTML 3.0 specification for color <font color="#ADDFFF">LIGHTBLUE</font>. */
|
||||
public final static String LIGHTBLUE = "#ADDFFF";
|
||||
/** HTML 3.0 specification for color <font color="#E77471">LIGHTCORAL</font>. */
|
||||
public final static String LIGHTCORAL = "#E77471";
|
||||
/** HTML 3.0 specification for color <font color="#E0FFFF">LIGHTCYAN</font>. */
|
||||
public final static String LIGHTCYAN = "#E0FFFF";
|
||||
/** HTML 3.0 specification for color <font color="#FAF8CC">LIGHTGOLDENROD</font>. */
|
||||
public final static String LIGHTGOLDENRODYELLOW = "#FAF8CC";
|
||||
/** HTML 3.0 specification for color <font color="#CCFFCC">LIGHTGREEN</font>.
|
||||
* ARBITRARY SHADE OF GREEN couldnt find LIGHTGREEN */
|
||||
public final static String LIGHTGREEN = "#CCFFCC";
|
||||
/** HTML 3.0 specification for color <font color="#FAAFBA">LIGHPINK</font>. */
|
||||
public final static String LIGHTPINK = "#FAAFBA";
|
||||
/** HTML 3.0 specification for color <font color="#F9966B">LIGHTSALMON</font>. */
|
||||
public final static String LIGHTSALMON = "#F9966B";
|
||||
/** HTML 3.0 specification for color <font color="#3EA99F">LIGHTSEAGREEN</font>. */
|
||||
public final static String LIGHTSEAGREEN = "#3EA99F";
|
||||
/** HTML 3.0 specification for color <font color="#82CAFA">LIGHTSKYBLUE</font>. */
|
||||
public final static String LIGHTSKYBLUE = "#82CAFA";
|
||||
/** HTML 3.0 specification for color <font color="#6D7B8D">LIGHTSLATEGRAY</font>. */
|
||||
public final static String LIGHTSLATEGRAY = "#6D7B8D";
|
||||
/** HTML 3.0 specification for color <font color="#728FCE">LIGHTSTEELBLUE</font>. */
|
||||
public final static String LIGHTSTEELBLUE = "#728FCE";
|
||||
/** HTML 3.0 specification for color <font color="#FFFEDC">LIGHTYELLOW</font>. */
|
||||
public final static String LIGHTYELLOW = "#FFFEDC";
|
||||
/** HTML 3.0 specification for color <font color="#41A317">LIMEGREEN</font>. */
|
||||
public final static String LIMEGREEN = "#41A317";
|
||||
/** HTML 3.0 specification for color <font color="#F9EEE2">LINEN</font>. */
|
||||
public final static String LINEN = "#F9EEE2";
|
||||
/** HTML 3.0 specification for color <font color="#FF00FF">MAGENTA</font>. */
|
||||
public final static String MAGENTA = "#FF00FF";
|
||||
/** HTML 3.0 specification for color <font color="#348781">MEDIUMAQUAMARINE</font>. */
|
||||
public final static String MEDIUMAQUAMARINE = "#348781";
|
||||
/** HTML 3.0 specification for color <font color="#152DC6">MEDIUMBLUE</font>. */
|
||||
public final static String MEDIUMBLUE = "#152DC6";
|
||||
/** HTML 3.0 specification for color <font color="#B048B5">MEDIUMORCHID</font>. */
|
||||
public final static String MEDIUMORCHID = "#B048B5";
|
||||
/** HTML 3.0 specification for color <font color="#8467D7">MEDIUMPURPLE</font>. */
|
||||
public final static String MEDIUMPURPLE = "#8467D7";
|
||||
/** HTML 3.0 specification for color <font color="#306754">MEDIUMSEAGREEN</font>. */
|
||||
public final static String MEDIUMSEAGREEN = "#306754";
|
||||
/** HTML 3.0 specification for color <font color="#5E5A80">MEDIUMSLATEBLUE</font>. */
|
||||
public final static String MEDIUMSLATEBLUE = "#5E5A80";
|
||||
/** HTML 3.0 specification for color <font color="#348017">MEDIUMSPRINGGREEN</font>. */
|
||||
public final static String MEDIUMSPRINGGREEN = "#348017";
|
||||
/** HTML 3.0 specification for color <font color="#48CCCD">MEDIUMTURQUOISE</font>. */
|
||||
public final static String MEDIUMTURQUOISE = "#48CCCD";
|
||||
/** HTML 3.0 specification for color <font color="#CA226B">MEDIUMVIOLETRED</font>. */
|
||||
public final static String MEDIUMVIOLETRED = "#CA226B";
|
||||
/** HTML 3.0 specification for color <font color="#151B54">MIDNIGHTBLUE</font>. */
|
||||
public final static String MIDNIGHTBLUE = "#151B54";
|
||||
/** HTML 3.0 specification for color <font color="#F5FFF9">MINTCREAM</font>. */
|
||||
public final static String MINTCREAM = "#F5FFF9";
|
||||
/** HTML 3.0 specification for color <font color="#FDE1DD">MISTYROSE</font>. */
|
||||
public final static String MISTYROSE = "#FDE1DD";
|
||||
/** HTML 3.0 specification for color <font color="#FDE0AC">MOCCASIN</font>. */
|
||||
public final static String MOCCASIN = "#FDE0AC";
|
||||
/** HTML 3.0 specification for color <font color="#FDDAA3">NAVAJOWHITE</font>. */
|
||||
public final static String NAVAJOWHITE = "#FDDAA3";
|
||||
/** HTML 3.0 specification for color <font color="#FCF3E2">OLDLACE</font>. */
|
||||
public final static String OLDLACE = "#FCF3E2";
|
||||
/** HTML 3.0 specification for color <font color="#658017">OLIVEDRAB</font>. */
|
||||
public final static String OLIVEDRAB = "#658017";
|
||||
/** HTML 3.0 specification for color <font color="#F87A17">ORANGE</font>. */
|
||||
public final static String ORANGE = "#F87A17";
|
||||
/** HTML 3.0 specification for color <font color="#F63817">ORANGERED</font>. */
|
||||
public final static String ORANGERED = "#F63817";
|
||||
/** HTML 3.0 specification for color <font color="#E57DED">ORCHID</font>. */
|
||||
public final static String ORCHID = "#E57DED";
|
||||
/** HTML 3.0 specification for color <font color="#EDE49E">PALEGOLDENROD</font>. */
|
||||
public final static String PALEGOLDENROD = "#EDE49E";
|
||||
/** HTML 3.0 specification for color <font color="#AEEBEC">PALETURQUOISE</font>. */
|
||||
public final static String PALETURQUOISE = "#AEEBEC";
|
||||
/** HTML 3.0 specification for color <font color="#D16587">PALEVIOLETRED</font>. */
|
||||
public final static String PALEVIOLETRED = "#D16587";
|
||||
/** HTML 3.0 specification for color <font color="#FEECCF">PAPAYAWHIP</font>. */
|
||||
public final static String PAPAYAWHIP = "#FEECCF";
|
||||
/** HTML 3.0 specification for color <font color="#FCD5B0">PEACHPUFF</font>. */
|
||||
public final static String PEACHPUFF = "#FCD5B0";
|
||||
/** HTML 3.0 specification for color <font color="#C57726">PERU</font>. */
|
||||
public final static String PERU = "#C57726";
|
||||
/** HTML 3.0 specification for color <font color="#FAAFBE">PINK</font>. */
|
||||
public final static String PINK = "#FAAFBE";
|
||||
/** HTML 3.0 specification for color <font color="#B93B8F">PLUM</font>. */
|
||||
public final static String PLUM = "#B93B8F";
|
||||
/** HTML 3.0 specification for color <font color="#ADDCE3">POWDERBLUE</font>. */
|
||||
public final static String POWDERBLUE = "#ADDCE3";
|
||||
/** HTML 3.0 specification for color <font color="#B38481">ROSYBROWN</font>. */
|
||||
public final static String ROSYBROWN = "#B38481";
|
||||
/** HTML 3.0 specification for color <font color="#2B60DE">ROYALBLUE</font>. */
|
||||
public final static String ROYALBLUE = "#2B60DE";
|
||||
/** HTML 3.0 specification for color <font color="#F63526">SADDLEBROWN</font>.
|
||||
* BROWN2 couldn't find SADDLEBROWN */
|
||||
public final static String SADDLEBROWN = "#F63526";
|
||||
/** HTML 3.0 specification for color <font color="#F88158">SALMON</font>. */
|
||||
public final static String SALMON = "#F88158";
|
||||
/** HTML 3.0 specification for color <font color="#EE9A4D">SANDYBROWN</font>. */
|
||||
public final static String SANDYBROWN = "#EE9A4D";
|
||||
/** HTML 3.0 specification for color <font color="#4E8975">SEAGREEN</font>. */
|
||||
public final static String SEAGREEN = "#4E8975";
|
||||
/** HTML 3.0 specification for color <font color="#FEF3EB">SEASHELL</font>. */
|
||||
public final static String SEASHELL = "#FEF3EB";
|
||||
/** HTML 3.0 specification for color <font color="#8A4117">SIENNA</font>. */
|
||||
public final static String SIENNA = "#8A4117";
|
||||
/** HTML 3.0 specification for color <font color="#6698FF">SKYBLUE</font>. */
|
||||
public final static String SKYBLUE = "#6698FF";
|
||||
/** HTML 3.0 specification for color <font color="#737CA1">SLATEBLUE</font>. */
|
||||
public final static String SLATEBLUE = "#737CA1";
|
||||
/** HTML 3.0 specification for color <font color="#657383">SLATEGRAY</font>. */
|
||||
public final static String SLATEGRAY = "#657383";
|
||||
/** HTML 3.0 specification for color <font color="#FFF9FA">SNOW</font>. */
|
||||
public final static String SNOW = "#FFF9FA";
|
||||
/** HTML 3.0 specification for color <font color="#4AA02C">SPRINGGREEN</font>. */
|
||||
public final static String SPRINGGREEN = "#4AA02C";
|
||||
/** HTML 3.0 specification for color <font color="#4863A0">STEELBLUE</font>. */
|
||||
public final static String STEELBLUE = "#4863A0";
|
||||
/** HTML 3.0 specification for color <font color="#D8AF79">TAN</font>. */
|
||||
public final static String TAN = "#D8AF79";
|
||||
/** HTML 3.0 specification for color <font color="#D2B9D3">THISTLE</font>. */
|
||||
public final static String THISTLE = "#D2B9D3";
|
||||
/** HTML 3.0 specification for color <font color="#F75431">TOMATO</font>. */
|
||||
public final static String TOMATO = "#F75431";
|
||||
/** HTML 3.0 specification for color <font color="#43C6DB">TURQUOISE</font>. */
|
||||
public final static String TURQUOISE = "#43C6DB";
|
||||
/** HTML 3.0 specification for color <font color="#8D38C9">VIOLET</font>. */
|
||||
public final static String VIOLET = "#8D38C9";
|
||||
/** HTML 3.0 specification for color <font color="#F3DAA9">WHEAT</font>. */
|
||||
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 <font color="#52D017"></font>. */
|
||||
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;
|
||||
|
||||
/**
|
||||
* Convert Color.
|
||||
* Limited use as it assumes that color is hex string w/o #
|
||||
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)
|
||||
{
|
||||
if (color == null)
|
||||
return BLACK;
|
||||
// Hex 000000 w/o #
|
||||
if (color.length() != 6)
|
||||
return color;
|
||||
if (!color.startsWith("#"))
|
||||
return "#" + color;
|
||||
return color;
|
||||
}
|
||||
|
||||
/**
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public abstract class MultiPartElement extends ConcreteElement
|
||||
{
|
||||
/** Private Initializer */
|
||||
{
|
||||
setNeedClosingTag(true);
|
||||
}
|
||||
public MultiPartElement()
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
/**
|
||||
Empty interface for determining if an element can be pretty printed.
|
||||
*/
|
||||
public interface Printable
|
||||
{
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public abstract class SinglePartElement extends ConcreteElement
|
||||
{
|
||||
/** Private Initializer */
|
||||
{
|
||||
setNeedClosingTag(false);
|
||||
}
|
||||
|
||||
public SinglePartElement()
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,176 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs;
|
||||
|
||||
import java.text.*;
|
||||
|
||||
|
||||
/**
|
||||
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.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Tag Text
|
||||
* @param text text
|
||||
* @return Element
|
||||
*/
|
||||
public Element setTagText (String text)
|
||||
{
|
||||
if (text != null && text.length() > 0)
|
||||
{
|
||||
StringCharacterIterator sci = new StringCharacterIterator(text);
|
||||
for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next())
|
||||
{
|
||||
int ii = c;
|
||||
if (ii > 255)
|
||||
{
|
||||
setFilterState(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.setTagText (text);
|
||||
} // setTagText
|
||||
|
||||
/**
|
||||
* Set Filter State - don't allow reset
|
||||
* @param filter_state state
|
||||
* @return this
|
||||
*/
|
||||
public Element setFilterState (boolean filter_state)
|
||||
{
|
||||
if (!getFilterState())
|
||||
return super.setFilterState (filter_state);
|
||||
return this;
|
||||
} // setFilterState
|
||||
|
||||
/**
|
||||
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);
|
||||
}
|
||||
|
||||
protected String createStartTag()
|
||||
{
|
||||
return("");
|
||||
}
|
||||
protected String createEndTag()
|
||||
{
|
||||
return("");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,628 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 PrinteWriter
|
||||
|
||||
*/
|
||||
|
||||
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());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,608 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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.
|
||||
|
||||
|
||||
|
||||
@version $Id: XhtmlFrameSetDocument.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
|
||||
|
||||
{
|
||||
|
||||
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 FrameSetDocument 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)
|
||||
|
||||
{
|
||||
|
||||
// XhtmlFrameSetDocument is just a convient wrapper for html call html.output
|
||||
|
||||
html.output(out);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Write the container to the PrinteWriter
|
||||
|
||||
*/
|
||||
|
||||
public void output(PrintWriter out)
|
||||
|
||||
{
|
||||
|
||||
// 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()
|
||||
|
||||
{
|
||||
|
||||
if ( getCodeset() != null )
|
||||
|
||||
return (html.toString(getCodeset()));
|
||||
|
||||
else
|
||||
|
||||
return(html.toString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Override the toString() method so that it prints something meaningful.
|
||||
|
||||
*/
|
||||
|
||||
public final String toString(String codeset)
|
||||
|
||||
{
|
||||
|
||||
return(html.toString(codeset));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Allows the XhtmlFrameSetDocument to be cloned. Doesn't return an instanceof XhtmlFrameSetDocument returns instance of html.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
public Object clone()
|
||||
|
||||
{
|
||||
|
||||
return(html.clone());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
filter_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=true
|
|
@ -0,0 +1,131 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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:<br>
|
||||
" ' & < >
|
||||
<p>
|
||||
For example:
|
||||
|
||||
<pre><code>
|
||||
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);
|
||||
</pre></code>
|
||||
|
||||
The filter is applied when the addElement() method is called.
|
||||
|
||||
@version $Id: CharacterFilter.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public class CharacterFilter extends java.util.Hashtable<String, Object> 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);
|
||||
|
||||
int ii = c;
|
||||
if (ii > 255)
|
||||
tmp = "&#" + ii + ";";
|
||||
|
||||
bs.append(tmp);
|
||||
}
|
||||
return(bs.toString());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
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 <br>
|
||||
it is to create your own filters. <b>This should NOT be used</b> in/for<br>
|
||||
anything real. Anyone want to implement a regex filter?
|
||||
|
||||
@version $Id: StringFilter.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public class StringFilter extends java.util.Hashtable<String, Object> 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.filter;
|
||||
|
||||
import org.apache.ecs.Filter;
|
||||
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.
|
||||
|
||||
<pre><code>
|
||||
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());
|
||||
</code></pre>
|
||||
|
||||
Produces: <p>where is it
|
||||
|
||||
@version $Id: WordFilter.java,v 1.2 2006/07/30 00:54:03 jjanke Exp $
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*/
|
||||
public class WordFilter extends java.util.Hashtable<String, Object> 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));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<body>
|
||||
</body>
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
|
||||
$Id: package.html,v 1.1 2006/04/21 18:06:25 jjanke Exp $
|
||||
|
||||
Copyright 1999-2002 Jorg Janke, Inc.
|
||||
40 Old Tannery Rd, Monroe, CT 06468, U.S.A.
|
||||
All Rights Reserved.
|
||||
|
||||
-->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Provides for....
|
||||
|
||||
<h2>Package Specification</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.adempiere.org">http://www.adempiere.org</a>
|
||||
</ul>
|
||||
|
||||
<h2>Related Documentation</h2>
|
||||
|
||||
For overviews, tutorials, examples, guides, and tool documentation, please see:
|
||||
<ul>
|
||||
<li><a href="http://www.adempiere.org">http://www.adempiere.org</a>
|
||||
</ul>
|
||||
|
||||
<!-- Put @see and @since tags down here. -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,169 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.storage;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Array implements java.util.Enumeration, 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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.storage;
|
||||
|
||||
import java.util.Enumeration;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.storage;
|
||||
|
||||
public class NoSuchObjectException extends Exception
|
||||
{
|
||||
|
||||
public NoSuchObjectException()
|
||||
{
|
||||
super("No such object found.");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,511 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates an <a> tag.
|
||||
* <P>
|
||||
* Please refer to the TestBed.java file for example code usage.
|
||||
*
|
||||
* @version $Id: a.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class a extends MultiPartElement
|
||||
implements Printable, FocusEvents, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("a");
|
||||
setCase (LOWERCASE); // XHTML specific
|
||||
setAttributeQuote (true); // XHTML specific
|
||||
setPrettyPrint(false);
|
||||
}
|
||||
|
||||
public static final String TARGET_BLANK = "_blank";
|
||||
public static final String TARGET_PARENT = "_parent";
|
||||
public static final String TARGET_SELF = "_self";
|
||||
public static final String TARGET_TOP = "_top";
|
||||
|
||||
/**
|
||||
* 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 optional 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);
|
||||
if (name != null)
|
||||
setName (name);
|
||||
setTarget (target);
|
||||
addElement (value);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor creates an <a> tag.
|
||||
*
|
||||
* @param href
|
||||
* the URI that goes between double quotes
|
||||
* @param name
|
||||
* the optional name="" attribute
|
||||
* @param target
|
||||
* the optional 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);
|
||||
if (name != null)
|
||||
setName (name);
|
||||
if (target != null)
|
||||
setTarget (target);
|
||||
addElement (value);
|
||||
}
|
||||
|
||||
/**
|
||||
* This constructor creates an <a> tag.
|
||||
*
|
||||
* @param href
|
||||
* the URI that goes between double quotes
|
||||
* @param name
|
||||
* the optional 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);
|
||||
if (name != null)
|
||||
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 optional 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);
|
||||
if (name != null)
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 en = elements ();
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
while (en.hasMoreElements ())
|
||||
{
|
||||
j++;
|
||||
Object obj = en.nextElement ();
|
||||
if (obj instanceof img)
|
||||
i++;
|
||||
}
|
||||
if (i == j)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,259 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates an <abbr> tag.
|
||||
* <P>
|
||||
* Please refer to the TestBed.java file for example code usage.
|
||||
*
|
||||
* @version $Id: abbr.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarlx.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,257 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <acronym> tag.
|
||||
*
|
||||
* @version $Id: acronym.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,257 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <address> tag.
|
||||
*
|
||||
* @version $Id: address.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,351 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates an <applet> tag.
|
||||
*
|
||||
* @version $Id: applet.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
public class applet extends MultiPartElement
|
||||
implements Printable
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initializer.
|
||||
*/
|
||||
{
|
||||
setElementType ("applet");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default constructor. Creates the <applet/> Element.<br>
|
||||
* 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 width suggested link width.
|
||||
*/
|
||||
public applet setWidth (String width)
|
||||
{
|
||||
addAttribute ("width", width);
|
||||
return (this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suggested width of applet.
|
||||
*
|
||||
* @param width suggested link width.
|
||||
*/
|
||||
public applet setWidth (int width)
|
||||
{
|
||||
addAttribute ("width", Integer.toString (width));
|
||||
return (this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suggested width of object.
|
||||
*
|
||||
* @param width 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 vspace suggested vertical gutter.
|
||||
*/
|
||||
public applet setVSpace (String vspace)
|
||||
{
|
||||
addAttribute ("vspace", vspace);
|
||||
return (this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suggested vertical gutter.
|
||||
*
|
||||
* @param vspace suggested vertical gutter.
|
||||
*/
|
||||
public applet setVSpace (int vspace)
|
||||
{
|
||||
addAttribute ("vspace", Integer.toString (vspace));
|
||||
return (this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Suggested vertical gutter.
|
||||
*
|
||||
* @param vspace suggested vertical gutter.
|
||||
*/
|
||||
public applet setVSpace (double vspace)
|
||||
{
|
||||
addAttribute ("vspace", Double.toString (vspace));
|
||||
return (this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the horizontal or vertical alignment of this applet.<br>
|
||||
* Convience variables are in the AlignTypes interface.
|
||||
*
|
||||
* @param alignment
|
||||
* Set the horizontal or vertical alignment of this applet.<br>
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,443 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <area> tag.
|
||||
*
|
||||
* @version $Id: area.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 index
|
||||
* the tabindex="" attribute
|
||||
*/
|
||||
public area setTabindex (String index)
|
||||
{
|
||||
addAttribute ("tabindex", index);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the tabindex="" attribute
|
||||
*
|
||||
* @param index
|
||||
* 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,258 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <b> tag.
|
||||
*
|
||||
* @version $Id: b.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class b extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("b");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,175 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <base> tag.
|
||||
*
|
||||
* @version $Id: base.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,398 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <basefont> object.
|
||||
|
||||
@version $Id: basefont.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <bdo></bdo> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: bdo.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <big> tag.
|
||||
*
|
||||
* @version $Id: big.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <blink> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: blink.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <blockquote> tag.
|
||||
*
|
||||
* @version $Id: blockquote.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,353 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <body></body> tag.
|
||||
*
|
||||
* @version $Id: body.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
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 script script
|
||||
*/
|
||||
public void setOnLoad (String script)
|
||||
{
|
||||
addAttribute ("onload", script);
|
||||
}
|
||||
|
||||
/**
|
||||
* On Blur
|
||||
*
|
||||
* @param script script
|
||||
*/
|
||||
public void setOnBlur (String script)
|
||||
{
|
||||
addAttribute ("onblur", 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,270 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <br> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: br.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,337 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <button> tag.
|
||||
*
|
||||
* @version $Id: button.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class button extends MultiPartElement
|
||||
implements Printable, FocusEvents, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
// convience variables
|
||||
public final static String TYPE_RESET = "reset";
|
||||
|
||||
public final static String TYPE_SUBMIT = "submit";
|
||||
|
||||
public final static String TYPE_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 <br>
|
||||
* button.submit <br>
|
||||
* button.reset <br>
|
||||
* button.button
|
||||
*
|
||||
* @param type 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,247 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <caption> tag.
|
||||
*
|
||||
* @version $Id: caption.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,440 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <center> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: center.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,440 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <cite> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: cite.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,258 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <code> tag.
|
||||
*
|
||||
* @version $Id: code.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 script
|
||||
* 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,376 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <col> object.
|
||||
|
||||
|
||||
|
||||
@version $Id: col.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,374 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <colgroup> object.
|
||||
|
||||
|
||||
|
||||
@version $Id: colgroup.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,269 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class defines a comment <-- value --> Element.
|
||||
*
|
||||
* @version $Id: comment.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
*
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
*
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
*
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*
|
||||
*/
|
||||
|
||||
public class comment extends MultiPartElement implements Printable
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
* private initializer.
|
||||
*
|
||||
*/
|
||||
|
||||
{
|
||||
|
||||
setElementType("--");
|
||||
|
||||
setCase(LOWERCASE);
|
||||
|
||||
setAttributeQuote(true);
|
||||
|
||||
setBeginStartModifier('!');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 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);
|
||||
|
||||
}
|
||||
|
||||
protected 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());
|
||||
|
||||
}
|
||||
|
||||
protected 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());
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,420 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <dd> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: dd.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,446 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <del> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: del.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,440 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <dfn> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: dfn.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,450 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <div> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: div.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,406 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <dl> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: dl.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,424 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <dt> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: dt.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,442 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates an <em> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: em.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,442 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <fieldset> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: fieldset.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,418 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <font> object.
|
||||
|
||||
@version $Id: font.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,464 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <form> tag.
|
||||
*
|
||||
* @version $Id: form.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class form extends MultiPartElement
|
||||
implements Printable, FormEvents, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
public static final String METHOD_GET = "get";
|
||||
|
||||
public static final String METHOD_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);
|
||||
setMethod(METHOD_POST);
|
||||
// Only accepted by NN6
|
||||
// setAcceptCharset ("utf-8");
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 Post form
|
||||
* Basic constructor. You need to set the attributes using the set* methods.
|
||||
*/
|
||||
public form ()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 Post 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 Post form
|
||||
* Use the set* methods to set the values of the attributes.
|
||||
*
|
||||
* @param action
|
||||
* set the value of action=""
|
||||
*/
|
||||
public form (String action)
|
||||
{
|
||||
setAction (action);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 Post form
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 form
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default URL Encoded utf-8 form
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Default utf-8 form
|
||||
* 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
|
||||
* Only NN
|
||||
*
|
||||
* @ p ara m 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,554 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <frame> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: frame.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,436 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <frameset> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: frameset.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <h1> tag.
|
||||
*
|
||||
* @version $Id: h1.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class h1 extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("h1");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint (false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <h2> tag.
|
||||
*
|
||||
* @version $Id: h2.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class h2 extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("h2");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <h3> tag.
|
||||
*
|
||||
* @version $Id: h3.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class h3 extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("h3");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint (false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <h4> tag.
|
||||
*
|
||||
* @version $Id: h4.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class h4 extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("h4");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,450 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <h5> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: h5.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,452 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <h6> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: h6.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <head></head> tag.
|
||||
*
|
||||
* @version $Id: head.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,422 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates an <hr> tag.
|
||||
*
|
||||
* @version $Id: hr.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class hr extends SinglePartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("hr");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setBeginEndModifier ('/');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <html></html> tag.
|
||||
*
|
||||
* @version $Id: html.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class html extends MultiPartElement
|
||||
implements Printable
|
||||
{
|
||||
|
||||
public html ()
|
||||
{
|
||||
setElementType ("html");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
addAttribute ("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
/**
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
**/
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,268 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <i> tag.
|
||||
*
|
||||
* @version $Id: i.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class i extends MultiPartElement
|
||||
implements Printable, MouseEvents, KeyEvents
|
||||
{
|
||||
|
||||
/**
|
||||
* Private initialization routine.
|
||||
*/
|
||||
{
|
||||
setElementType ("i");
|
||||
setCase (LOWERCASE);
|
||||
setAttributeQuote (true);
|
||||
setPrettyPrint (false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,630 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <iframe> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: iframe.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,816 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates an <img> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: img.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,663 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <input> tag.
|
||||
*
|
||||
* @version $Id: input.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
public class input extends SinglePartElement
|
||||
implements Printable, FormEvents, PageEvents, FocusEvents, MouseEvents,
|
||||
KeyEvents
|
||||
{
|
||||
|
||||
public static final String TYPE_TEXT = "text";
|
||||
|
||||
public static final String TYPE_PASSWORD = "password";
|
||||
|
||||
public static final String TYPE_CHECKBOX = "checkbox";
|
||||
|
||||
public static final String TYPE_RADIO = "radio";
|
||||
|
||||
public static final String TYPE_FILE = "file";
|
||||
|
||||
public static final String TYPE_BUTTON = "button";
|
||||
|
||||
public static final String TYPE_IMAGE = "image";
|
||||
|
||||
public static final String TYPE_HIDDEN = "hidden";
|
||||
|
||||
public static final String TYPE_SUBMIT = "submit";
|
||||
|
||||
public static final String TYPE_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 index
|
||||
* the tabindex="" attribute
|
||||
*/
|
||||
public input setTabindex (String index)
|
||||
{
|
||||
addAttribute ("tabindex", index);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the tabindex="" attribute
|
||||
*
|
||||
* @param index
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* 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 script
|
||||
* script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,448 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <ins> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: ins.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,442 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
This class creates a <kbd> tag.
|
||||
|
||||
|
||||
|
||||
@version $Id: kbd.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
|
||||
@author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
|
||||
@author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
|
||||
@author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,326 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <label> tag.
|
||||
*
|
||||
* @version $Id: label.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy </a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens </a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver </a>
|
||||
*/
|
||||
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 setFor
|
||||
* Sets the FOR="" attribute
|
||||
*/
|
||||
public label (String setFor)
|
||||
{
|
||||
setFor (setFor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic Constructor use set* methods.
|
||||
*
|
||||
* @param setFor
|
||||
* Sets the for="" attribute
|
||||
* @param accesskey
|
||||
* sets the accesskey="" attribute.
|
||||
*/
|
||||
public label (String setFor, String accesskey)
|
||||
{
|
||||
setFor (setFor);
|
||||
setAccessKey(accesskey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic Constructor use set* methods.
|
||||
*
|
||||
* @param setFor
|
||||
* Sets the for="" attribute
|
||||
* @param accesskey
|
||||
* sets the optional accesskey="" attribute.
|
||||
* @param value
|
||||
* adds an element
|
||||
*/
|
||||
public label (String setFor, String accesskey, String value)
|
||||
{
|
||||
setFor (setFor);
|
||||
if (accesskey != null)
|
||||
setAccessKey(accesskey);
|
||||
addElement(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the for="" attribute.
|
||||
*
|
||||
* @param value
|
||||
* 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,297 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.apache.ecs.xhtml;
|
||||
|
||||
import org.apache.ecs.*;
|
||||
|
||||
/**
|
||||
* This class creates a <legend> tag.
|
||||
*
|
||||
* @version $Id: legend.java,v 1.2 2006/07/30 00:54:02 jjanke Exp $
|
||||
* @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
|
||||
* @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
|
||||
* @author <a href="mailto:bojan@binarix.com">Bojan Smojver</a>
|
||||
*/
|
||||
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 value
|
||||
* sets the value
|
||||
*/
|
||||
public legend (String value)
|
||||
{
|
||||
addElement (value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic Constructor use set* methods.
|
||||
*
|
||||
* @param value
|
||||
* sets the value
|
||||
*/
|
||||
public legend (Element value)
|
||||
{
|
||||
addElement (value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic Constructor use set* methods.
|
||||
*
|
||||
* @param value
|
||||
* 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 value
|
||||
* 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script 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 script The script
|
||||
*/
|
||||
public void setOnKeyUp (String script)
|
||||
{
|
||||
addAttribute ("onkeyup", script);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue