component.html

来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 1,304 行 · 第 1/4 页

HTML
1,304
字号
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#isFocusable()">isFocusable</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current state of <code>FOCUSABLE</code> flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#isVisible()">isVisible</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current state of <code>VISIBLE</code> flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#isWrapping()">isWrapping</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the current state of <code>WRAP</code> flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#last()">last</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the last component on container.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#operator_get(int)">operator_get</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the component at the specified index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#operator_set(int, Component)">operator_set</A></B>(int&nbsp;index,             <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the component at the specified index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#remove(Component)">remove</A></B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the given component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#remove(int)">remove</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the component at specified index.</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="../../widsets/api/Component.html#repaint(boolean)">repaint</A></B>(boolean&nbsp;refreshLayout)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds this component is repaint queue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#set(int, Component)">set</A></B>(int&nbsp;index,    <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the given component at specified index in this container.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setAction(int)">setAction</A></B>(int&nbsp;action)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the explicit "fire" action.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setData(Object)">setData</A></B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the data attachment to this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setElement(String, Component)">setElement</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;name,           <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;element)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets named component in this View.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setFlags(int)">setFlags</A></B>(int&nbsp;flags)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the flags of this component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setImage(Image)">setImage</A></B>(<A HREF="../../widsets/api/Image.html" title="class in ">Image</A>&nbsp;image)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the image of <A HREF="../../widsets/api/Label.html" title="class in "><CODE>Label</CODE></A> and <A HREF="../../widsets/api/Picture.html" title="class in "><CODE>Picture</CODE></A> component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setPreferredHeight(int)">setPreferredHeight</A></B>(int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the preferred height of this Component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setPreferredSize(int, int)">setPreferredSize</A></B>(int&nbsp;width,                 int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets preferred width and height for this Component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setPreferredWidth(int)">setPreferredWidth</A></B>(int&nbsp;width)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the preferred width of this Component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setStyle(Style)">setStyle</A></B>(<A HREF="../../widsets/api/Style.html" title="class in ">Style</A>&nbsp;style)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the style of this Component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../widsets/api/Component.html" title="class in ">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#setText(String)">setText</A></B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;text)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the text of <A HREF="../../widsets/api/Label.html" title="class in "><CODE>Label</CODE></A>, <A HREF="../../widsets/api/Text.html" title="class in "><CODE>Text</CODE></A> or <A HREF="../../widsets/api/Input.html" title="class in "><CODE>Input</CODE></A> component.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../widsets/api/Component.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of children in container.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_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 <A HREF="../../widsets/api/Object.html" title="class in ">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../widsets/api/Object.html#toString()">toString</A>, <A HREF="../../widsets/api/Object.html#equals(Object)">equals</A>, <A HREF="../../widsets/api/Object.html#hashCode()">hashCode</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from </B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= 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="Component(Style)"><!-- --></A><H3>Component</H3><PRE>       <B>Component</B>(<A HREF="../../widsets/api/Style.html" title="class in ">Style</A>&nbsp;style)</PRE><DL><DD>Creates a new component with the specified style. Even though plain <code>Component</code> does not paint any content the style is nevertheless painted and  hence it can be used for decorative purposes.<P><DL><DT><B>Parameters:</B><DD><CODE>style</CODE> - Component style</DL></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="getStyle()"><!-- --></A><H3>getStyle</H3><PRE>       <A HREF="../../widsets/api/Style.html" title="class in ">Style</A> <B>getStyle</B>()</PRE><DL><DD>Returns the current style of this component.<P><DD><DL><DT><B>Returns:</B><DD>style<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#setStyle(Style)"><CODE>setStyle(Style)</CODE></A></DL></DD></DL><HR><A NAME="getData()"><!-- --></A><H3>getData</H3><PRE>       <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> <B>getData</B>()</PRE><DL><DD>Gets the data attachment associated with this component. Data attachment can be used to store state/context information.<P><DD><DL><DT><B>Returns:</B><DD>data attachment<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#setData(Object)"><CODE>setData(Object)</CODE></A></DL></DD></DL><HR><A NAME="getAction()"><!-- --></A><H3>getAction</H3><PRE>       int <B>getAction</B>()</PRE><DL><DD>Gets the explicit "fire" action associated with this component. This action is never invoked if the component does not have  <code>FOCUSABLE</code> flag set, since the user can't focus on it.<P><DD><DL><DT><B>Returns:</B><DD>fire action<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#setAction(int)"><CODE>setAction(int)</CODE></A>, <A HREF="../../widsets/api/API.html#FOCUSABLE"><CODE>FOCUSABLE</CODE></A></DL></DD></DL><HR><A NAME="getParent()"><!-- --></A><H3>getParent</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>getParent</B>()</PRE><DL><DD>Return the parent component. A Component instance can only be placed once on Component tree. However, it is legal to re-use components after they are no  longer part of any component tree on the shell stack.<P><DD><DL><DT><B>Returns:</B><DD>parent component<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#add(Component)"><CODE>add(Component)</CODE></A>, <A HREF="../../widsets/api/Component.html#insert(int, Component)"><CODE>insert(int, Component)</CODE></A>, <A HREF="../../widsets/api/Component.html#set(int, Component)"><CODE>set(int, Component)</CODE></A>, <A HREF="../../widsets/api/Component.html#remove(int)"><CODE>remove(int)</CODE></A></DL></DD></DL><HR><A NAME="getViewPort()"><!-- --></A><H3>getViewPort</H3><PRE>       <A HREF="../../widsets/api/Scrollable.html" title="class in ">Scrollable</A> <B>getViewPort</B>()</PRE><DL><DD>Searches for <A HREF="../../widsets/api/Scrollable.html" title="class in "><CODE>Scrollable</CODE></A> among the parents of this Component. If this component is Scrollable, returns <code>this</code><P><DD><DL><DT><B>Returns:</B><DD>Parent scrollable or <code>null</code> if there is no          scrollable on component tree</DL></DD></DL><HR><A NAME="getShell()"><!-- --></A><H3>getShell</H3><PRE>       <A HREF="../../widsets/api/Shell.html" title="class in ">Shell</A> <B>getShell</B>()</PRE><DL><DD>Returns the root Shell of component tree.<P><DD><DL><DT><B>Returns:</B><DD>root of tree</DL></DD></DL><HR><A NAME="hasLinefeed()"><!-- --></A><H3>hasLinefeed</H3>

⌨️ 快捷键说明

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