📄 formaccessor.html
字号:
<DT><B>Returns:</B><DD>the name assigned to the form component associated with this accessor.</DL></DD></DL><HR><A NAME="getConstraints(java.awt.Component)"><!-- --></A><H3>getConstraints</H3><PRE>public CellConstraints <B>getConstraints</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> comp)</PRE><DL><DD>Returns a CellConstraints instance associated with the given component. If the component is not contained by the form associated with this accessor, null is returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the constraints associated with the given component.</DL></DD></DL><HR><A NAME="addBean(java.awt.Component, CellConstraints)"><!-- --></A><H3>addBean</H3><PRE>public void <B>addBean</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> comp, CellConstraints cc)</PRE><DL><DD>Adds a bean to this container using the given constraints.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the bean to add to the form.<DD><CODE>cc</CODE> - the constraints for the bean. This must be a valid CellConstraints instance.</DL></DD></DL><HR><A NAME="getContainer()"><!-- --></A><H3>getContainer</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Container.html" title="class or interface in java.awt">Container</A> <B>getContainer</B>()</PRE><DL><DD>Return the actual container that has the given layout. This method should rarely be called. It is only provided for very limited cased. If you need to access the underlying FormLayout, you can retrieve it from the Container returned by this call.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the container associated with the FormLayout</DL></DD></DL><HR><A NAME="beanIterator()"><!-- --></A><H3>beanIterator</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>beanIterator</B>()</PRE><DL><DD>Defaults to beanIterator(false). See <A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#beanIterator(boolean)"><CODE>beanIterator(boolean)</CODE></A><P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an iterator to all the Java Beans in this container. Beans in nested containers are not included.</DL></DD></DL><HR><A NAME="beanIterator(boolean)"><!-- --></A><H3>beanIterator</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>beanIterator</B>(boolean nested)</PRE><DL><DD>An iterator for a collection of Java Beans (java.awt.Component objects) contained by a FormPanel. Only components that occupy a cell in the grid on the form are returned - not children of those components. For example, if you have a Java Bean such as a calendar that has several child components, only the calendar instance will be returned. This iterator will not return the child components of that bean. However, if a component is a nested form and the nested parameter is true, then this iterator will return the components in the nested form (as well as the form itself). If an iterator encounters a nested form instance, that object will be returned (regardless of whether the nested flag is set). A component is a nested form if it is an instance of a FormAccessor: <PRE> Iterator iter = formaccessor.beanIterator(); while( iter.hasNext() ) { Component comp = (Component)iter.next(); if ( comp instanceof FormAccessor ) { // found a nested form. // if this iterator is nested, the next call to <i>next</i> will // return components in the nested form. } else { // found a standard Java Bean } } </PRE> The iterator is fail-fast. If any components are added or removed by invoking the underlying FormAccessors at any time after the Iterator is created, the iterator will throw a ConcurrentModificationException. If nested is true, then the iterator will fail if components are added to <i>any</i> FormAccessor in the form hierarchy. You may safely call remove on the iterator if you want to remove the component from the form. Note that you should not modify the underlying form container by calling the <tt>Container</tt> methods directly. This is not recommended and can also leave the form in an undefined state.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nested</CODE> - if true, all components in nested forms will be returned.<DT><B>Returns:</B><DD>an iterator to all the Java Beans in this container.</DL></DD></DL><HR><A NAME="removeBean(java.awt.Component)"><!-- --></A><H3>removeBean</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> <B>removeBean</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> comp)</PRE><DL><DD>Removes a bean from the container associated with this accessor. If the given component is contained by an implicit JScrollPane or is an implicit JSCrollPane, the JScrollPane is removed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>comp</CODE> - the component to remove.<DT><B>Returns:</B><DD>the component that was removed. If this method fails for any reason then null is returned.</DL></DD></DL><HR><A NAME="removeBean(java.lang.String)"><!-- --></A><H3>removeBean</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> <B>removeBean</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> compName)</PRE><DL><DD>Removes a bean with the given name from the container associated with this accessor. The bean must be contained within the current form. This method will not remove beans in nested forms. If compName refers to a component contained by an implicit JScrollPane or compName directly refers to an implicit JSCrollPane, the JScrollPane is removed.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>compName</CODE> - the name of the Java Bean to remove.<DT><B>Returns:</B><DD>the component that was removed. If this method fails for any reason then null is returned.</DL></DD></DL><HR><A NAME="replaceBean(java.awt.Component, java.awt.Component)"><!-- --></A><H3>replaceBean</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> <B>replaceBean</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> oldComp, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> newComponent)</PRE><DL><DD>Replaces an existing bean with a new bean. If the old component is contained by an implicit JScrollPane or is an implicit JSCrollPane, the JScrollPane is replaced.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the component that was replaced. If this method fails for any reason then null is returned.</DL></DD></DL><HR><A NAME="replaceBean(java.lang.String, java.awt.Component)"><!-- --></A><H3>replaceBean</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> <B>replaceBean</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> compName, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> newComponent)</PRE><DL><DD>Locates an existing bean with the given name and replaces it with a new bean. The bean must be contained within the current form. This method will not remove beans in nested forms. If the old component is contained by an implicit JScrollPane or is an implicit JSCrollPane, the JScrollPane is replaced.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>compName</CODE> - the name of the component to replace.<DD><CODE>newComponent</CODE> - the component to add.<DT><B>Returns:</B><DD>the component that was replaced. If this method fails for any reason then null is returned.</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=3 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="../../../../../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="class-use/FormAccessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="FormAccessor.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 2004 JETA Software Inc. All Rights Reserved.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -