Java Doc for FormPanel.java in  » Swing-Library » abeille-forms-designer » com » jeta » forms » components » panel » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » abeille forms designer » com.jeta.forms.components.panel 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jeta.open.gui.framework.JETAPanel
   com.jeta.forms.components.panel.FormPanel

All known Subclasses:   com.jeta.swingbuilder.gui.components.list.ItemsView,  com.jeta.swingbuilder.gui.components.text.TextPropertyView,  com.jeta.swingbuilder.gui.main.PasteSpecialView,  com.jeta.swingbuilder.gui.components.panel.SwingBuilderPanel,  com.jeta.swingbuilder.codegen.gui.config.OptionsView,
FormPanel
public class FormPanel extends JETAPanel (Code)
This is the main panel class used to load and view a form during runtime. Usage:
 FormPanel panel = new FormPanel("com/mycorp/app/gui/login/loginView.jfrm");
 
It assumed that all form files are located in your classpath.

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 FormPanel.getFormAccessor(String) . 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.

 FormPanel myform = new FormPanel( "test.jfrm" ); // where the main form in
 test.jfrm is named "settings" FormAccessor form_accessor =
 (FormAccessor)myform.getFormAccessor( "settings" ); // adds a component at
 column 2 and row 5 form_accessor.addBean( new JButton("Test"), new
 CellConstraints( 2, 5 ) );
 // or replace the component named 'wizard.view' with a different
 component. FormPanel wiz_view = new FormPanel( "pane2.jfrm" );
 form_accessor.replaceBean( "wizard.view", wiz_view );
 // use FormAccessor to iterate over components in a form as well
 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 next() will // return components in the nested form. }
 else { // found a standard Java Bean } }
 

author:
   Jeff Tassin



Constructor Summary
public  FormPanel(String formPath)
     FormPanel constructor.
public  FormPanel(InputStream istream)
     FormPanel constructor.
public  FormPanel(FormComponent fc)
     FormPanel constructor.

Method Summary
protected  voidaddForm(FormComponent form, LayoutManager layout, Object constraints)
    
public  voidapplyComponentOrientation(ComponentOrientation orientation)
    
public  IteratorbeanIterator(boolean nested)
     Returns an iterator for a collection of Java Beans (java.awt.Component objects) contained by this form and its nested forms.
public  Objectget(String objName)
     Returns the user object associated with the given name.
public  FormAccessorgetFormAccessor()
     Return an instance of a FormAccessor that is associated with the top-most form in this panel (recall that a form can have nested forms).
public  FormAccessorgetFormAccessor(String compName)
     Return an instance of a FormAccessor that has the given name.
public  ContainergetFormContainer()
     Returns the parent container that contains the top-level form in this panel.
public  voidput(String objName, Object obj)
     Puts the given object into the user objects map.
public  voidrevalidate()
     Revalidates this panel.
public  voidsetFocusTraversalPolicy(FocusTraversalPolicy policy)
     Sets the focus traversal policy for this panel.
public  voidupdateFocusPolicy()
     If this form panel contains a form with a custom focus policy, you should call updateFocusPolicy whenever you programatically add or remove components from the form or any nested forms.
public  voidupdateUI()
    


Constructor Detail
FormPanel
public FormPanel(String formPath)(Code)
FormPanel constructor. Loads the form from the given path. This constructor does not throw an exception if the form resource cannot be found. Instead, it will display an error message in the panel.
Parameters:
  formPath - the path to the form file. This path can be absolute orrelative to the classpath.



FormPanel
public FormPanel(InputStream istream) throws FormException(Code)
FormPanel constructor. Creates a FormPanel using the given InputStream. The InputStream must reference a valid underlying .jfrm.
throws:
  FormException - if any type of I/O error occurs or the input stream is not avalid form file.



FormPanel
public FormPanel(FormComponent fc)(Code)
FormPanel constructor. Creates a FormPanel using the given FormComponent as the content.




Method Detail
addForm
protected void addForm(FormComponent form, LayoutManager layout, Object constraints)(Code)
Adds the form to this panel using the given layout manager and constraints



applyComponentOrientation
public void applyComponentOrientation(ComponentOrientation orientation)(Code)



beanIterator
public Iterator beanIterator(boolean nested)(Code)
Returns an iterator for a collection of Java Beans (java.awt.Component objects) contained by this form and its nested forms. Only components that occupy a cell in the grid on the form are returned - not children of those components. So, if you have a Java Bean that has several child components, only the Java Bean will be returned and not its children. This 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 set to true, then the iterator will fail if components are added to any FormAccessor in the form hierarchy. If nested if false, the iterator will fail only if modifications are made to the Form associated with the current FormAccessor. You may safely call remove on the iterator if you want to remove the component from the form. an iterator to a collection of components (java.awt.Componentobjects) contained by this form.



get
public Object get(String objName)(Code)
Returns the user object associated with the given name. This method does not return a Swing component (use instead com.jeta.open.gui.framework.JETAPanel.getComponentByName ). Rather, this method returns any user object that was associated with this panel by calling FormPanel.put(String,Object) . Null is returned if the object does not exist.



getFormAccessor
public FormAccessor getFormAccessor()(Code)
Return an instance of a FormAccessor that is associated with the top-most form in this panel (recall that a form can have nested forms). Use FormAccessors if you want to programmatically change the underlying FormLayout and/or container. the FormAccessor associated with the topmost form in this panel.



getFormAccessor
public FormAccessor getFormAccessor(String compName)(Code)
Return an instance of a FormAccessor that has the given name. This is the same name you gave to the form (either the main form or nested forms) in the designer. Use FormAccessors if you want to programmatically change the underlying FormLayout and/or container.
Parameters:
  compName - the name of the form to retrieve. the FormAccessor associated with the named form. Null is returnedif component cannot be found with the given name or if thecomponent is not a FormAccessor object.



getFormContainer
public Container getFormContainer()(Code)
Returns the parent container that contains the top-level form in this panel. You should rarely have to call this method. Note that a better and safer solution is to name the form in the builder and call FormPanel.getFormAccessor(String)



put
public void put(String objName, Object obj)(Code)
Puts the given object into the user objects map. If an object already exists for the given name, it is overwritten. Objects can be retrieved from the map by calling FormPanel.get(String)
Parameters:
  objName - the name of the object
Parameters:
  obj - the object



revalidate
public void revalidate()(Code)
Revalidates this panel.



setFocusTraversalPolicy
public void setFocusTraversalPolicy(FocusTraversalPolicy policy)(Code)
Sets the focus traversal policy for this panel. Only call this if you wish to override the default handling provided by the form.



updateFocusPolicy
public void updateFocusPolicy()(Code)
If this form panel contains a form with a custom focus policy, you should call updateFocusPolicy whenever you programatically add or remove components from the form or any nested forms. If a custom focus policy was not assigned in the Form Designer, then this method is not needed.



updateUI
public void updateUI()(Code)
Override so we can update the underlying FormComponent



Methods inherited from com.jeta.open.gui.framework.JETAPanel
protected ComponentFinder createComponentFinder()(Code)(Java Doc)
public void enableComponent(String commandId, boolean bEnable)(Code)(Java Doc)
public Collection getAllNamedComponents()(Code)(Java Doc)
public boolean getBoolean(String compName)(Code)(Java Doc)
public AbstractButton getButton(String compName)(Code)(Java Doc)
public JCheckBox getCheckBox(String compName)(Code)(Java Doc)
public JComboBox getComboBox(String compName)(Code)(Java Doc)
public Component getComponentByName(String componentName)(Code)(Java Doc)
protected ComponentFinder getComponentFinder()(Code)(Java Doc)
public Collection getComponentsByName(String compName)(Code)(Java Doc)
public JETAController getController()(Code)(Java Doc)
public int getInteger(String compName, int defaultValue)(Code)(Java Doc)
public JLabel getLabel(String compName)(Code)(Java Doc)
public JList getList(String compName)(Code)(Java Doc)
public JPanel getPanel(String compName)(Code)(Java Doc)
public JProgressBar getProgressBar(String compName)(Code)(Java Doc)
public JRadioButton getRadioButton(String compName)(Code)(Java Doc)
public Object getSelectedItem(String compName)(Code)(Java Doc)
public JSpinner getSpinner(String compName)(Code)(Java Doc)
public JTabbedPane getTabbedPane(String compName)(Code)(Java Doc)
public JTable getTable(String compName)(Code)(Java Doc)
public String getText(String compName)(Code)(Java Doc)
public JTextComponent getTextComponent(String compName)(Code)(Java Doc)
public JTextField getTextField(String compName)(Code)(Java Doc)
public JTree getTree(String compName)(Code)(Java Doc)
public UIDirector getUIDirector()(Code)(Java Doc)
public boolean isSelected(String compName)(Code)(Java Doc)
public void removeDescendent(String compName)(Code)(Java Doc)
public static void removeFromParent(Component comp)(Code)(Java Doc)
public void reset()(Code)(Java Doc)
protected void setComponentFinder(ComponentFinder finder)(Code)(Java Doc)
public void setController(JETAController controller)(Code)(Java Doc)
public void setSelected(String compName, boolean sel)(Code)(Java Doc)
public void setSelectedItem(String compName, Object value)(Code)(Java Doc)
public void setText(String compName, String txt)(Code)(Java Doc)
public void setUIDirector(UIDirector director)(Code)(Java Doc)
public void setVisible(String compName, boolean bVisible)(Code)(Java Doc)
public void updateComponents()(Code)(Java Doc)
public void updateComponents(java.util.EventObject evt)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.