formpanel.html

来自「Swing组件的可视化设计程序」· HTML 代码 · 共 412 行 · 第 1/5 页

HTML
412
字号
<FONT SIZE="-1">com.jeta.forms.components.panel</FONT><BR>Class FormPanel</H2><PRE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">java.awt.Component</A>      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Container.html" title="class or interface in java.awt">java.awt.Container</A>          <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html" title="class or interface in javax.swing">javax.swing.JComponent</A>              <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPanel.html" title="class or interface in javax.swing">javax.swing.JPanel</A>                  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../com/jeta/open/gui/framework/JETAPanel.html" title="class in com.jeta.open.gui.framework">com.jeta.open.gui.framework.JETAPanel</A>                      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>com.jeta.forms.components.panel.FormPanel</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/accessibility/Accessible.html" title="class or interface in javax.accessibility">Accessible</A>, <A HREF="../../../../../com/jeta/open/support/ComponentFinder.html" title="interface in com.jeta.open.support">ComponentFinder</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/ImageObserver.html" title="class or interface in java.awt.image">ImageObserver</A>, <A HREF="../../../../../com/jeta/open/gui/framework/JETAContainer.html" title="interface in com.jeta.open.gui.framework">JETAContainer</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/MenuContainer.html" title="class or interface in java.awt">MenuContainer</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../com/jeta/open/support/SwingComponentSupport.html" title="interface in com.jeta.open.support">SwingComponentSupport</A></DD></DL><HR><DL><DT>public class <B>FormPanel</B><DT>extends <A HREF="../../../../../com/jeta/open/gui/framework/JETAPanel.html" title="class in com.jeta.open.gui.framework">JETAPanel</A></DL><P>This is the main panel class used to load and view a form during runtime. Usage: <pre>     FormPanel panel = new FormPanel( "com/mycorp/app/gui/login/loginView.jfrm" ); </pre> It assumed that all form files are located in your classpath.<p> You should only use the published APIs to programmatically add, remove, or access Swing Components from a form. If you need to programmatically change a form, you use a FormAccessor, see <A HREF="../../../../../com/jeta/forms/components/panel/FormPanel.html#getFormAccessor(java.lang.String)"><CODE>getFormAccessor(String)</CODE></A>. If you pass a valid form name, this method will return a FormAccessor instance.  Use FormAccessors  to access the FormLayout or to add, remove, change, or enumerate components in the underlying container.<p>  <PRE>     FormPanel myform = new FormPanel( "test.jfrm" );   <i>// where the main form in test.jfrm is named "settings"</i>     FormAccessor form_accessor = (FormAccessor)myform.getFormAccessor( "settings" );     <i>// adds a component at column 2 and row 5</i>     form_accessor.addBean( new JButton("Test"), new CellConstraints( 2, 5 ) );      <i>// or replace the component named 'wizard.view' with a different component.</i>     FormPanel wiz_view = new FormPanel( "pane2.jfrm" );     form_accessor.replaceBean( "wizard.view", wiz_view );     <i>// use FormAccessor to iterate over components in a form as well</i>     Iterator iter = formaccessor.beanIterator();     while( iter.hasNext() )     {         Component comp = (Component)iter.next();         if ( comp instanceof FormAccessor )         {             <i>// found a nested form.</i>             <i>// if this iterator is nested, the next call to next() will</i>             <i>// return components in the nested form.</i>         }         else         {             <i>// found a standard Java Bean</i>         }     }  </PRE><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#com.jeta.forms.components.panel.FormPanel">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TD></TR></TABLE>&nbsp;<A NAME="nested_classes_inherited_from_class_javax.swing.JPanel"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Nested classes inherited from class javax.swing.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPanel.html" title="class or interface in javax.swing">JPanel</A></B></TD></TR>

⌨️ 快捷键说明

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