component.html

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

HTML
1,304
字号
<DD><DL><DT><B>Parameters:</B><DD><CODE>refreshLayout</CODE> - Flag to indicate if the layout of component should be re-computed.   Computation occurs prior painting. <b>It is highly recommended to    optimize code so that <code>true</code> is supplied only if    component tree contents or styles have changed.</b></DL></DD></DL><HR><A NAME="first()"><!-- --></A><H3>first</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>first</B>()</PRE><DL><DD>Returns the first component on container. <p>This method is equal to call <code>component.get(0)</code>.<P><DD><DL><DT><B>Returns:</B><DD>first component<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#first()"><CODE>first()</CODE></A>, <A HREF="../../widsets/api/Component.html#size()"><CODE>size()</CODE></A>, <A HREF="../../widsets/api/Component.html#get(int)"><CODE>get(int)</CODE></A></DL></DD></DL><HR><A NAME="last()"><!-- --></A><H3>last</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>last</B>()</PRE><DL><DD>Returns the last component on container. <p>This method is equal to call <code>component.get(component.size()-1)</code>.<P><DD><DL><DT><B>Returns:</B><DD>last component<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#last()"><CODE>last()</CODE></A>, <A HREF="../../widsets/api/Component.html#size()"><CODE>size()</CODE></A>, <A HREF="../../widsets/api/Component.html#get(int)"><CODE>get(int)</CODE></A></DL></DD></DL><HR><A NAME="get(int)"><!-- --></A><H3>get</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>get</B>(int&nbsp;index)</PRE><DL><DD>Returns the component at the specified index.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index to container,                   must be on range <code>[0..size()-1]</code>.<DT><B>Returns:</B><DD>Component at specified index<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#size()"><CODE>size()</CODE></A></DL></DD></DL><HR><A NAME="find(Object)"><!-- --></A><H3>find</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>find</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A>&nbsp;data)</PRE><DL><DD>Searches for component with matching data attachment. This method will descend into component hierarchy. Match is determined by comparing the pointers.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - Data attachment to search for<DT><B>Returns:</B><DD>Matching component or <code>null</code> null if no match was found</DL></DD></DL><HR><A NAME="getElement(String)"><!-- --></A><H3>getElement</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>getElement</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;name)</PRE><DL><DD>Returns named component from View.  View is a special case of <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> container created using <A HREF="../../widsets/api/API.html#createView(String, Object)"><CODE>createView(String, Object)</CODE></A>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of element to return<DT><B>Returns:</B><DD>element or <code>null</code> if there is no such         element on View.</DL></DD></DL><HR><A NAME="setElement(String, Component)"><!-- --></A><H3>setElement</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>setElement</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)</PRE><DL><DD>Sets named component in this View. View is a special case of <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> container created using <A HREF="../../widsets/api/API.html#createView(String, Object)"><CODE>createView(String, Object)</CODE></A>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of element to override<DD><CODE>element</CODE> - Component to set<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="remove(int)"><!-- --></A><H3>remove</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>remove</B>(int&nbsp;index)</PRE><DL><DD>Removes the component at specified index. Only applicable to <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> component.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of component to remove,               must be on range <code>[0..size()-1]</code>.<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="remove(Component)"><!-- --></A><H3>remove</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>remove</B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</PRE><DL><DD>Removes the given component. Only applicable to <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> component.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>child</CODE> - Component to remove<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="add(Component)"><!-- --></A><H3>add</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>add</B>(<A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</PRE><DL><DD>Adds the given component to end of this container. Only applicable to <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> component.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>child</CODE> - Component to add<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="set(int, Component)"><!-- --></A><H3>set</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>set</B>(int&nbsp;index,                     <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</PRE><DL><DD>Sets the given component at specified index in this container. Only applicable to <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> component.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index to container,              must be on range <code>[0..size()-1]</code>.<DD><CODE>child</CODE> - Component to set<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="insert(int, Component)"><!-- --></A><H3>insert</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>insert</B>(int&nbsp;index,                        <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</PRE><DL><DD>Inserts the given component to specified index in this container. Existing components at given index and higher will be shifted  to the next index. Only applicable to <A HREF="../../widsets/api/Flow.html" title="class in "><CODE>Flow</CODE></A> component.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index to container,              must be on range <code>[0..size()]</code>.<DD><CODE>child</CODE> - Component to add<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="setText(String)"><!-- --></A><H3>setText</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>setText</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;text)</PRE><DL><DD>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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - Text to set<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="appendText(String)"><!-- --></A><H3>appendText</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>appendText</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A>&nbsp;text)</PRE><DL><DD>Sets the more text into <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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>text</CODE> - Text to append<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="setImage(Image)"><!-- --></A><H3>setImage</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>setImage</B>(<A HREF="../../widsets/api/Image.html" title="class in ">Image</A>&nbsp;image)</PRE><DL><DD>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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>image</CODE> - Image to set<DT><B>Returns:</B><DD>this Component</DL></DD></DL><HR><A NAME="operator_get(int)"><!-- --></A><H3>operator_get</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>operator_get</B>(int&nbsp;index)</PRE><DL><DD>Returns the component at the specified index.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index to container<DT><B>Returns:</B><DD>Component at specified index<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#size()"><CODE>size()</CODE></A></DL></DD></DL><HR><A NAME="operator_set(int, Component)"><!-- --></A><H3>operator_set</H3><PRE>       <A HREF="../../widsets/api/Component.html" title="class in ">Component</A> <B>operator_set</B>(int&nbsp;index,                              <A HREF="../../widsets/api/Component.html" title="class in ">Component</A>&nbsp;child)</PRE><DL><DD>Sets the component at the specified index. Note that Component may appear <b>only once</b> on active component trees.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index to container,              must be on range <code>[0..size()-1]</code>.<DD><CODE>child</CODE> - Child component<DT><B>Returns:</B><DD>child parameter<DT><B>See Also:</B><DD><A HREF="../../widsets/api/Component.html#size()"><CODE>size()</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../widsets/api/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="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="../../widsets/api/Comparator.html" title="interface in "><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../widsets/api/Config.html" title="class in "><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?widsets/api/Component.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Component.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

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