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

📄 parameterblock.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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 Thu Apr 27 23:34:18 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  ParameterBlock</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/ParameterBlock.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-files/index-1.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><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../java/awt/image/renderable/RenderableImageOp.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="ParameterBlock.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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">java.awt.image.renderable</FONT><BR>Class  ParameterBlock</H2><PRE><A HREF="../../../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>java.awt.image.renderable.ParameterBlock</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../java/lang/Cloneable.html">Cloneable</A>, <A HREF="../../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public class <B>ParameterBlock</B><DT>extends <A HREF="../../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../../java/lang/Cloneable.html">Cloneable</A>, <A HREF="../../../../java/io/Serializable.html">Serializable</A></DL><P>A <code>ParameterBlock</code> encapsulates all the information about sources and parameters (Objects) required by a RenderableImageOp, or other classes that process images. <p> Although it is possible to place arbitrary objects in the source Vector, users of this class may impose semantic constraints such as requiring all sources to be RenderedImages or RenderableImage.  <code>ParameterBlock</code> itself is merely a container and performs no checking on source or parameter types. <p> All parameters in a <code>ParameterBlock</code> are objects; convenience add and set methods are available that take arguments of base type and construct the appropriate subclass of Number (such as Integer or Float).  Corresponding get methods perform a downward cast and have return values of base type; an exception will be thrown if the stored values do not have the correct type. There is no way to distinguish between the results of  "short s; add(s)" and "add(new Short(s))". <p> Note that the get and set methods operate on references. Therefore, one must be careful not to share references between <code>ParameterBlock</code>s when this is inappropriate.  For example, to create a new <code>ParameterBlock</code> that is equal to an old one except for an added source, one might be tempted to write: <pre> ParameterBlock addSource(ParameterBlock pb, RenderableImage im) {     ParameterBlock pb1 = new ParameterBlock(pb.getSources());     pb1.addSource(im);     return pb1; } </pre> <p> This code will have the side effect of altering the original <code>ParameterBlock</code>, since the getSources operation returned a reference to its source Vector.  Both pb and pb1 share their source Vector, and a change in either is visible to both. <p> A correct way to write the addSource function is to clone the source Vector: <pre> ParameterBlock addSource (ParameterBlock pb, RenderableImage im) {     ParameterBlock pb1 = new ParameterBlock(pb.getSources().clone());     pb1.addSource(im);     return pb1; } </pre> <p> The clone method of <code>ParameterBlock</code> has been defined to perform a clone of both the source and parameter Vectors for this reason.  A standard, shallow clone is available as shallowClone. <p> The addSource, setSource, add, and set methods are defined to return 'this' after adding their argument.  This allows use of syntax like: <pre> ParameterBlock pb = new ParameterBlock(); op = new RenderableImageOp("operation", pb.add(arg1).add(arg2)); </pre><P><DL><DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#java.awt.image.renderable.ParameterBlock">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../java/util/Vector.html">Vector</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#parameters">parameters</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A Vector of non-source parameters, stored as arbitrary Objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../java/util/Vector.html">Vector</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#sources">sources</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A Vector of sources, stored as arbitrary Objects.</TD></TR></TABLE>&nbsp;<!-- ======== 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="../../../../java/awt/image/renderable/ParameterBlock.html#ParameterBlock()">ParameterBlock</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A dummy constructor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#ParameterBlock(java.util.Vector)">ParameterBlock</A></B>(<A HREF="../../../../java/util/Vector.html">Vector</A>&nbsp;sources)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <code>ParameterBlock</code> with a given Vector  of sources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#ParameterBlock(java.util.Vector, java.util.Vector)">ParameterBlock</A></B>(<A HREF="../../../../java/util/Vector.html">Vector</A>&nbsp;sources,               <A HREF="../../../../java/util/Vector.html">Vector</A>&nbsp;parameters)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <code>ParameterBlock</code> with a given Vector of sources and Vector of parameters.</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="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(byte)">add</A></B>(byte&nbsp;b)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Byte to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(char)">add</A></B>(char&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Character to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(double)">add</A></B>(double&nbsp;d)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Double to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(float)">add</A></B>(float&nbsp;f)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Float to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(int)">add</A></B>(int&nbsp;i)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Integer to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(long)">add</A></B>(long&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Long to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(java.lang.Object)">add</A></B>(<A HREF="../../../../java/lang/Object.html">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an object to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#add(short)">add</A></B>(short&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a Short to the list of parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/awt/image/renderable/ParameterBlock.html">ParameterBlock</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#addSource(java.lang.Object)">addSource</A></B>(<A HREF="../../../../java/lang/Object.html">Object</A>&nbsp;source)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an image to end of the list of sources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#clone()">clone</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a copy of a <code>ParameterBlock</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#getByteParameter(int)">getByteParameter</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method to return a parameter as a byte.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;char</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#getCharParameter(int)">getCharParameter</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A convenience method to return a parameter as a char.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../java/awt/image/renderable/ParameterBlock.html#getDoubleParameter(int)">getDoubleParameter</A></B>(int&nbsp;index)</CODE>

⌨️ 快捷键说明

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