📄 formfield.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="../../../org/jivesoftware/smackx/FormField.Option.html" title="class in org.jivesoftware.smackx">FormField.Option</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#getOptions()">getOptions</A></B>()</CODE><BR> Returns an Iterator for the available options that the user has in order to answer the question.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#getType()">getType</A></B>()</CODE><BR> Returns an indicative of the format for the data to answer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A><<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#getValues()">getValues</A></B>()</CODE><BR> Returns an Iterator for the default values of the question if the question is part of a form to fill out.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#getVariable()">getVariable</A></B>()</CODE><BR> Returns the variable name that the question is filling out.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#isRequired()">isRequired</A></B>()</CODE><BR> Returns true if the question must be answered in order to complete the questionnaire.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#resetValues()">resetValues</A></B>()</CODE><BR> Removes all the values of the field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#setDescription(java.lang.String)">setDescription</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> description)</CODE><BR> Sets a description that provides extra clarification about the question.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#setLabel(java.lang.String)">setLabel</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> label)</CODE><BR> Sets the label of the question which should give enough information to the user to fill out the form.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#setRequired(boolean)">setRequired</A></B>(boolean required)</CODE><BR> Sets if the question must be answered in order to complete the questionnaire.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#setType(java.lang.String)">setType</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> type)</CODE><BR> Sets an indicative of the format for the data to answer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/smackx/FormField.html#toXML()">toXML</A></B>()</CODE><BR> </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.3/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.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/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.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="TYPE_BOOLEAN"><!-- --></A><H3>TYPE_BOOLEAN</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_BOOLEAN</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_BOOLEAN">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_FIXED"><!-- --></A><H3>TYPE_FIXED</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_FIXED</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_FIXED">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_HIDDEN"><!-- --></A><H3>TYPE_HIDDEN</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_HIDDEN</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_HIDDEN">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_JID_MULTI"><!-- --></A><H3>TYPE_JID_MULTI</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_JID_MULTI</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_JID_MULTI">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_JID_SINGLE"><!-- --></A><H3>TYPE_JID_SINGLE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_JID_SINGLE</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_JID_SINGLE">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_LIST_MULTI"><!-- --></A><H3>TYPE_LIST_MULTI</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_LIST_MULTI</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_LIST_MULTI">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_LIST_SINGLE"><!-- --></A><H3>TYPE_LIST_SINGLE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_LIST_SINGLE</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_LIST_SINGLE">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_TEXT_MULTI"><!-- --></A><H3>TYPE_TEXT_MULTI</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_TEXT_MULTI</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_TEXT_MULTI">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_TEXT_PRIVATE"><!-- --></A><H3>TYPE_TEXT_PRIVATE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_TEXT_PRIVATE</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_TEXT_PRIVATE">Constant Field Values</A></DL></DL><HR><A NAME="TYPE_TEXT_SINGLE"><!-- --></A><H3>TYPE_TEXT_SINGLE</H3><PRE>public static final <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>TYPE_TEXT_SINGLE</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.smackx.FormField.TYPE_TEXT_SINGLE">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="FormField(java.lang.String)"><!-- --></A><H3>FormField</H3><PRE>public <B>FormField</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> variable)</PRE><DL><DD>Creates a new FormField with the variable name that uniquely identifies the field in the context of the form.<P><DL><DT><B>Parameters:</B><DD><CODE>variable</CODE> - the variable name of the question.</DL></DL><HR><A NAME="FormField()"><!-- --></A><H3>FormField</H3><PRE>public <B>FormField</B>()</PRE><DL><DD>Creates a new FormField of type FIXED. The fields of type FIXED do not define a variable name.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getDescription()"><!-- --></A><H3>getDescription</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getDescription</B>()</PRE><DL><DD>Returns a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.<p> <p/> If the question is of type FIXED then the description should remain empty.<P><DD><DL><DT><B>Returns:</B><DD>description that provides extra clarification about the question.</DL></DD></DL><HR><A NAME="getLabel()"><!-- --></A><H3>getLabel</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getLabel</B>()</PRE><DL><DD>Returns the label of the question which should give enough information to the user to fill out the form.<P><DD><DL><DT><B>Returns:</B><DD>label of the question.</DL></DD></DL><HR><A NAME="getOptions()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -