📄 renderkit.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_14) on Mon Jan 28 05:46:53 PST 2008 --><TITLE>RenderKit (Java EE 5)</TITLE><META NAME="keywords" CONTENT="javax.faces.render.RenderKit class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="RenderKit (Java EE 5)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><B>PREV CLASS</B></A> <A HREF="../../../javax/faces/render/RenderKitFactory.html" title="class in javax.faces.render"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/faces/render/RenderKit.html" target="_top"><B>FRAMES</B></A> <A HREF="RenderKit.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.faces.render</FONT><BR>Class RenderKit</H2><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.faces.render.RenderKit</B></PRE><HR><DL><DT><PRE>public abstract class <B>RenderKit</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL></PRE><P><p><strong>RenderKit</strong> represents a collection of <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A> instances that, together, know how to render JavaServer Faces <A HREF="../../../javax/faces/component/UIComponent.html" title="class in javax.faces.component"><CODE>UIComponent</CODE></A> instances for a specific client. Typically, <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A>s are specialized for some combination of client device type, markup language, and/or user <code>Locale</code>. A <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> also acts as a Factory for associated <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A> instances, which perform the actual rendering process for each component.</p> <p>A typical JavaServer Faces implementation will configure one or more <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> instances at web application startup. They are made available through calls to the <code>getRenderKit()</code> methods of <A HREF="../../../javax/faces/render/RenderKitFactory.html" title="class in javax.faces.render"><CODE>RenderKitFactory</CODE></A>. Because <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A> instances are shared, they must be implemented in a thread-safe manner. Due to limitations in the current specification having multiple <code>RenderKit</code> instances at play in the same application requires a custom <A HREF="../../../javax/faces/application/ViewHandler.html" title="class in javax.faces.application"><CODE>ViewHandler</CODE></A> instance that is aware of how to deal with this case. This limitation will be lifted in a future version of the spec.</p> <p>The <code>RenderKit</code> instance must also vend a <A HREF="../../../javax/faces/render/ResponseStateManager.html" title="class in javax.faces.render"><CODE>ResponseStateManager</CODE></A> instance, which is used in the process of saving and restoring tree structure and state.</p><P><P><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#RenderKit()">RenderKit</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#addRenderer(java.lang.String, java.lang.String, javax.faces.render.Renderer)">addRenderer</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> family, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> rendererType, <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render">Renderer</A> renderer)</CODE><BR> Register the specified <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A> instance, associated with the specified component <code>family</code> and <code>rendererType</code>, to the set of <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A>s registered with this <A HREF="../../../javax/faces/render/RenderKit.html" title="class in javax.faces.render"><CODE>RenderKit</CODE></A>, replacing any previously registered <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A> for this combination of identifiers.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/faces/context/ResponseStream.html" title="class in javax.faces.context">ResponseStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#createResponseStream(java.io.OutputStream)">createResponseStream</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A> out)</CODE><BR> Use the provided <code>OutputStream</code> to create a new <A HREF="../../../javax/faces/context/ResponseStream.html" title="class in javax.faces.context"><CODE>ResponseStream</CODE></A> instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/faces/context/ResponseWriter.html" title="class in javax.faces.context">ResponseWriter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#createResponseWriter(java.io.Writer, java.lang.String, java.lang.String)">createResponseWriter</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A> writer, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> contentTypeList, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> characterEncoding)</CODE><BR> Use the provided <code>Writer</code> to create a new <A HREF="../../../javax/faces/context/ResponseWriter.html" title="class in javax.faces.context"><CODE>ResponseWriter</CODE></A> instance for the specified (optional) content type, and character encoding.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render">Renderer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#getRenderer(java.lang.String, java.lang.String)">getRenderer</A></B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> family, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> rendererType)</CODE><BR> Return the <A HREF="../../../javax/faces/render/Renderer.html" title="class in javax.faces.render"><CODE>Renderer</CODE></A> instance most recently registered for the specified component <code>family</code> and <code>rendererType</code>, if any; otherwise, return <code>null</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../../javax/faces/render/ResponseStateManager.html" title="class in javax.faces.render">ResponseStateManager</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/faces/render/RenderKit.html#getResponseStateManager()">getResponseStateManager</A></B>()</CODE><BR> Return an instance of <A HREF="../../../javax/faces/render/ResponseStateManager.html" title="class in javax.faces.render"><CODE>ResponseStateManager</CODE></A> to handle rendering technology specific state management decisions.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -