⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templatepageattributes.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:10 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class  TemplatePageAttributes</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TemplatePageAttributes.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplateNavigation.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplateScreen.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TemplatePageAttributes.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.util.template</FONT><BR>Class  TemplatePageAttributes</H2><PRE>java.lang.Object  |  +--<B>org.apache.turbine.util.template.TemplatePageAttributes</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/turbine/services/pull/ApplicationTool.html">ApplicationTool</A></DD></DL><HR><DL><DT>public class <B>TemplatePageAttributes</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/apache/turbine/services/pull/ApplicationTool.html">ApplicationTool</A></DL><P>Template context tool that will set various attributes of the HTML page.  It is automatically placed in the Template context as '$page'.  Here's an example of some uses: <p> $page.setBgColor("#ffffff"); $page.setBgColor("white"); $page.setBackground("/images/standardbg.jpeg"); $page.setTitle("This is the title!"); $page.setKeywords("turbine, cool, servlet framework"); $page.setStyleSheet("/style.css");<P><DL><DT><B>Version: </B><DD>$Id: TemplatePageAttributes.java,v 1.4 2002/11/20 18:43:23 mpoeschl Exp $</DD><DT><B>Author: </B><DD><a href="mailto:sean@somacity.com">Sean Legassick</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#TemplatePageAttributes()">TemplatePageAttributes</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#TemplatePageAttributes(org.apache.turbine.util.RunData)">TemplatePageAttributes</A></B>(<A HREF="../../../../../org/apache/turbine/util/RunData.html">RunData</A>&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a new instance with the given RunData object.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#addAttribute(java.lang.String, java.lang.String)">addAttribute</A></B>(java.lang.String&nbsp;name,             java.lang.String&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an attribute to the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#getTitle()">getTitle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the title in the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#init(java.lang.Object)">init</A></B>(java.lang.Object&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialise this instance with the given RunData object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#refresh()">refresh</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Refresh method - does nothing</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setBackground(java.lang.String)">setBackground</A></B>(java.lang.String&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the background image for the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setBgColor(java.lang.String)">setBgColor</A></B>(java.lang.String&nbsp;color)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the background color for the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setDescription(java.lang.String)">setDescription</A></B>(java.lang.String&nbsp;description)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a description META tag to the HEAD of the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setHttpEquiv(java.lang.String, java.lang.String)">setHttpEquiv</A></B>(java.lang.String&nbsp;httpEquiv,             java.lang.String&nbsp;content)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a HttpEquiv META tag in the HEAD of the page, usage: <br><code>setHttpEquiv("refresh", "5; URL=http://localhost/nextpage.html")</code> <br><code>setHttpEquiv("Expires", "Tue, 20 Aug 1996 14:25:27 GMT")</code></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setKeywords(java.lang.String)">setKeywords</A></B>(java.lang.String&nbsp;keywords)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a keywords META tag in the HEAD of the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setLinkColor(java.lang.String)">setLinkColor</A></B>(java.lang.String&nbsp;color)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the link color for the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setScript(java.lang.String)">setScript</A></B>(java.lang.String&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a LINK to a javascript file to the HEAD of the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setStyle(java.lang.String)">setStyle</A></B>(java.lang.String&nbsp;styleText)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a STYLE element to the HEAD of the page with the provided content.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setStyleSheet(java.lang.String)">setStyleSheet</A></B>(java.lang.String&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a LINK to a CSS styleshet to the HEAD of the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setStyleSheet(java.lang.String, java.lang.String)">setStyleSheet</A></B>(java.lang.String&nbsp;url,              java.lang.String&nbsp;media)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a LINK to a CSS stylesheet to the HEAD of the page, allowing the media type to be specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setTextColor(java.lang.String)">setTextColor</A></B>(java.lang.String&nbsp;color)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the text color for the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setTitle(java.lang.String)">setTitle</A></B>(java.lang.String&nbsp;intitle)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the title in the page.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html">TemplatePageAttributes</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#setVlinkColor(java.lang.String)">setVlinkColor</A></B>(java.lang.String&nbsp;color)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the visited link color for the BODY tag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/util/template/TemplatePageAttributes.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A dummy toString method that returns an empty string.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TemplatePageAttributes()"><!-- --></A><H3>TemplatePageAttributes</H3><PRE>public <B>TemplatePageAttributes</B>()</PRE><DL><DD>Default constructor. The init method must be called before use</DL><HR><A NAME="TemplatePageAttributes(org.apache.turbine.util.RunData)"><!-- --></A><H3>TemplatePageAttributes</H3><PRE>public <B>TemplatePageAttributes</B>(<A HREF="../../../../../org/apache/turbine/util/RunData.html">RunData</A>&nbsp;data)</PRE><DL><DD>Construct a new instance with the given RunData object.<DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - a RunData instance</DL></DD></DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -