📄 formaccessor.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_04) on Thu Apr 29 16:53:22 PDT 2004 --><TITLE>FormAccessor (Abeille Forms)</TITLE><META NAME="keywords" CONTENT="com.jeta.forms.gui.form.FormAccessor interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="FormAccessor (Abeille Forms)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.jeta.forms.gui.form</FONT><BR>Interface FormAccessor</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../../../com/jeta/open/support/ComponentFinder.html" title="interface in com.jeta.open.support">ComponentFinder</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html" title="interface in com.jeta.open.support">SwingComponentSupport</A></DD></DL><HR><DL><DT>public interface <B>FormAccessor</B><DT>extends <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html" title="interface in com.jeta.open.support">SwingComponentSupport</A></DL><P>A FormAccessor is used to programmatically access and modify components on a form.<p> You should always use FormAccessors instead of modifying the underlying <tt>Container</tt> directly. The main reason is because the forms component hierachy may change in the future.<p> FormAccessors only modify the form they are associated with. A form can have nested forms, but FormAccessors do not access nested forms (except when using nested iterators).<p> Be careful when using components that have implicit JScrollPanes. The designer allows you to set a <i>scroll property</i> for those components that are scrollable (for example JTree, JTable, JList), and the forms runtime automatically creates JScrollPanes for those components you specifiy as scrollable. When iterating over a container, implicit scroll pane instances will be returned rather than the underlying Java bean for those scrollable components.<p> FormAccessors provide direct access to the underlying FormLayout and its assciated container. It is not recommended that you programmatically create CellConstraints and change the layout using hard-coded column and row values. The reason is because it is very easy to modify the form using the Forms Designer. Any modificiations can break code that has hard-coded columns and rows. The best approach is to name all of your components (including the scrollpanes) and access them by name whenever possible. This applies to wizard-like GUIs as well. It is recommended that in these cases, you provide a dummy component on the form such as an empty JLabel. You can then replace the dummy component with another component at runtime (via <tt>replaceBean</tt> ).<p><P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#addBean(java.awt.Component, CellConstraints)">addBean</A></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)</CODE><BR> Adds a bean to this container using the given constraints.</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.4.2/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#beanIterator()">beanIterator</A></B>()</CODE><BR> Defaults to beanIterator(false).</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.4.2/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#beanIterator(boolean)">beanIterator</A></B>(boolean nested)</CODE><BR> An iterator for a collection of Java Beans (java.awt.Component objects) contained by a FormPanel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> CellConstraints</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#getConstraints(java.awt.Component)">getConstraints</A></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)</CODE><BR> Returns a CellConstraints instance associated with the given component.</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.4.2/docs/api/java/awt/Container.html" title="class or interface in java.awt">Container</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#getContainer()">getContainer</A></B>()</CODE><BR> Return the actual container that has the given layout.</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.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#getFormName()">getFormName</A></B>()</CODE><BR> Returns the name assigned to the form component associated with this accessor.</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.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#removeBean(java.awt.Component)">removeBean</A></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)</CODE><BR> Removes a bean from the container associated with this accessor.</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.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#removeBean(java.lang.String)">removeBean</A></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)</CODE><BR> Removes a bean with the given name from the container associated with this accessor.</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.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#replaceBean(java.awt.Component, java.awt.Component)">replaceBean</A></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)</CODE><BR> Replaces an existing bean with a new bean.</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.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../com/jeta/forms/gui/form/FormAccessor.html#replaceBean(java.lang.String, java.awt.Component)">replaceBean</A></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)</CODE><BR> Locates an existing bean with the given name and replaces it with a new bean.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_com.jeta.open.support.SwingComponentSupport"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface com.jeta.open.support.<A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html" title="interface in com.jeta.open.support">SwingComponentSupport</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#enableComponent(java.lang.String, boolean)">enableComponent</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getBoolean(java.lang.String)">getBoolean</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getButton(java.lang.String)">getButton</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getCheckBox(java.lang.String)">getCheckBox</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getComboBox(java.lang.String)">getComboBox</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getInteger(java.lang.String, int)">getInteger</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getLabel(java.lang.String)">getLabel</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getList(java.lang.String)">getList</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getPanel(java.lang.String)">getPanel</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getProgressBar(java.lang.String)">getProgressBar</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getRadioButton(java.lang.String)">getRadioButton</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getSelectedItem(java.lang.String)">getSelectedItem</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getSpinner(java.lang.String)">getSpinner</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getTable(java.lang.String)">getTable</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getText(java.lang.String)">getText</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#getTextField(java.lang.String)">getTextField</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#isSelected(java.lang.String)">isSelected</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#setSelected(java.lang.String, boolean)">setSelected</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#setSelectedItem(java.lang.String, java.lang.Object)">setSelectedItem</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#setText(java.lang.String, java.lang.String)">setText</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html#setVisible(java.lang.String, boolean)">setVisible</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_com.jeta.open.support.ComponentFinder"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface com.jeta.open.support.<A HREF="../../../../../com/jeta/open/support/ComponentFinder.html" title="interface in com.jeta.open.support">ComponentFinder</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../com/jeta/open/support/ComponentFinder.html#getComponentByName(java.lang.String)">getComponentByName</A>, <A HREF="../../../../../com/jeta/open/support/ComponentFinder.html#getComponentsByName(java.lang.String)">getComponentsByName</A>, <A HREF="../../../../../com/jeta/open/support/ComponentFinder.html#reset()">reset</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getFormName()"><!-- --></A><H3>getFormName</H3><PRE>public <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> <B>getFormName</B>()</PRE><DL><DD>Returns the name assigned to the form component associated with this accessor.<P><DD><DL></DL></DD><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -