Java Doc for FormComponent.java in  » Swing-Library » abeille-forms-designer » com » jeta » forms » gui » form » 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.gui.form 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.jeta.forms.gui.form.GridComponent
   com.jeta.forms.gui.form.FormComponent

All known Subclasses:   com.jeta.swingbuilder.gui.editor.DesignFormComponent,
FormComponent
public class FormComponent extends GridComponent (Code)
A FormComponent is a type of GridComponent that contains a nested form in a GridView. A FormComponent represents a top-level form or nested form whereas StandardComponents represent Swing components (Java beans). Forms come in two types: Embedded and Linked. An embedded form is a nested form that is fully encapsulated and stored in the parent. A linked form refers to a form file on disk, but it can exist as a child in another form. All GridComponents have a single JETABean has a child. The FormComponent has a JETABean child which is a wrapper around a GridView bean. Containment Hierarchy:
 FormComponent
 |
 -- JETABean -maintains the properties for the form.
 |
 -- GridView -a GridView has N child components that occupy the cells in the view
 |                           
 //-- GridView.FormContainer ---------------------> FormLayout
 |                         (layoutmgr)
 -- GridComponent1
 |
 -- GridComponent2
 |
 -- GridComponentN
 -each GridComponent is either a StandardComponent(Swing component)
 or a nested form (FormComponent)
 

author:
   Jeff Tassin



Constructor Summary
protected  FormComponent()
     Creates a FormComponent instance.
protected  FormComponent(String id, JETABean jbean, GridView parentView, boolean embedded)
     Creates a FormComponent instance with the specified id, child bean, and parent view.

Method Summary
public  void_postInitialize(FormPanel panel, Container cc)
     PostInitialize is called once after all components in a FormPanel have been instantiated at runtime (not design time).
public static  FormComponentcreate()
     Creates a form component.
public  StringgetAbsolutePath()
     Returns the absolute path to this form.
public  intgetCellHeight()
     Returns the total height in pixels of the cells occupied by this component.
public  intgetCellWidth()
     Returns the total width in pixels of the cells occupied by this component.
public  intgetCellX()
     Returns the left location of this component's cell in the parent coordinates.
public  intgetCellY()
     Returns the top location of this component's cell in the parent coordinates.
public  GridViewgetChildView()
     Returns the GridView that is associated with this form.
public  intgetColumnCount()
     Returns the number of columns in this form.
public  FormMementogetExternalState(StateRequest si)
     Always call this method instead of getState when saving a top level form.
public  StringgetFileName()
     Returns the filename of this form.
public  FocusPolicyMementogetFocusPolicy()
     Returns the focus policy assigned to this form.
public  GridComponentgetGridComponent(int col, int row)
     Returns the child grid component that occupies the given row and column in this form.
public  StringgetId()
     Returns a unique id for this form.
public static  FormComponentgetParentForm(Component comp)
     Traverses the container hiearchy for the given form starting from its parent and traversing until it encounters a FormComponent instance.
public  FormComponentgetParentForm()
     Traverses the container hiearchy for this form starting from its parent and traversing until it encounters a FormComponent instance. the formcomponent that is the closest ancestor of this form.
public  StringgetRelativePath()
     Returns the relative path to this form.
public  intgetRowCount()
     Returns the number of rows in this form.
public  GridComponentgetSelectedComponent()
     Returns the selected child component in this form.
public  ComponentMementogetState(StateRequest si)
     Saves this form's state as a memento object.
Parameters:
  si - a state request that has some control over how the form stateis stored.
public static  FormComponentgetTopLevelForm(Component comp)
     Traverses the container hierarchy for the given component and returns the first parent that is a top-level FormComponent.
public  IteratorgridIterator()
     Returns an interator that iterates over the grid components in a child view.
public  booleanisEmbedded()
     Returns true if this form is an embedded form.
public  booleanisLinked()
     Returns true if this form is linked.
public  booleanisTopLevelForm()
     Return true if this form is the top-most form in the container hierarchy.
protected  FormComponentopenLinkedForm(FormMemento fm)
     Creates and initializes a FormComponent from the given form memento.
public  voidpostInitialize(FormPanel panel)
     PostInitialize is called once after all components in a form have been re-instantiated at runtime (not design time).
protected  voidpostSetState(ComponentMemento cm)
     Performs any final initialization of this form component after it's state has been restored.
public  voidprint()
    
public  voidrevalidate()
     Override revalidate so we can forward the call to the underlying GridView as well.
public  voidsetAbsolutePath(String path)
     Sets the absolute path for this form.
protected  voidsetBean(JETABean jbean)
     Override GridComponent implementation so we can add the child to this container for the design view.
public  voidsetControlButtonsVisible(boolean bVisible)
    
public  voidsetFocusPolicy(FocusPolicyMemento fm)
    
public  voidsetSelected(boolean bsel)
     Override setSelected so we can deselect everything in the child view when being dselected.
public  voidsetState(ComponentMemento memento)
     Resets this component from a previously saved state.
public  voidsetTopLevelForm(boolean topLevel)
     Sets the flag used to indicate is this is the top-most form when saving this form.


Constructor Detail
FormComponent
protected FormComponent()(Code)
Creates a FormComponent instance.



FormComponent
protected FormComponent(String id, JETABean jbean, GridView parentView, boolean embedded) throws FormException(Code)
Creates a FormComponent instance with the specified id, child bean, and parent view.
Parameters:
  id - the unique id for this form.
Parameters:
  jbean - the underlying GridView
Parameters:
  parentView - the parent for this form.
Parameters:
  embedded - flag that indicates if this form is embedded




Method Detail
_postInitialize
public void _postInitialize(FormPanel panel, Container cc)(Code)
PostInitialize is called once after all components in a FormPanel have been instantiated at runtime (not design time). This gives each property and component a chance to do some last minute initializations that might depend on the top level parent. FormComponent simply forwards the call to any children.
Parameters:
  panel - the top-level form container
Parameters:
  cc - a container whose child components are to be(post)intitialized.



create
public static FormComponent create()(Code)
Creates a form component.



getAbsolutePath
public String getAbsolutePath()(Code)
Returns the absolute path to this form. If the form is embedded, this value will be null. the absolute path to this form if the form is a linked form.



getCellHeight
public int getCellHeight()(Code)
Returns the total height in pixels of the cells occupied by this component. the total height in pixels of the cells occupied by thiscomponent



getCellWidth
public int getCellWidth()(Code)
Returns the total width in pixels of the cells occupied by this component. the total width in pixels of the cells occupied by this component



getCellX
public int getCellX()(Code)
Returns the left location of this component's cell in the parent coordinates. the left location of this component's cell in the parentcoordinates.



getCellY
public int getCellY()(Code)
Returns the top location of this component's cell in the parent coordinates. the top location of this component's cell in the parentcoordinates.



getChildView
public GridView getChildView()(Code)
Returns the GridView that is associated with this form. the child view associated with this component



getColumnCount
public int getColumnCount()(Code)
Returns the number of columns in this form. the number of columns in this form



getExternalState
public FormMemento getExternalState(StateRequest si) throws FormException(Code)
Always call this method instead of getState when saving a top level form. Saves this form's state to a memento. the form state as a memento.



getFileName
public String getFileName()(Code)
Returns the filename of this form. If the form is embedded, this value is null. the filename portion of the path to this form (only if this formis linked)



getFocusPolicy
public FocusPolicyMemento getFocusPolicy()(Code)
Returns the focus policy assigned to this form. the focus policy for this form (not currently used)



getGridComponent
public GridComponent getGridComponent(int col, int row)(Code)
Returns the child grid component that occupies the given row and column in this form. the GridComponent at the specificed column and row



getId
public String getId()(Code)
Returns a unique id for this form. If the form is embedded, the id is based on this object's hashCode. If the form is linked, the id is the absolute path to the form. the unique id of this form.



getParentForm
public static FormComponent getParentForm(Component comp)(Code)
Traverses the container hiearchy for the given form starting from its parent and traversing until it encounters a FormComponent instance. the formcomponent that is the closest ancestor of the given form.Null is returned if this the topmost parent form.



getParentForm
public FormComponent getParentForm()(Code)
Traverses the container hiearchy for this form starting from its parent and traversing until it encounters a FormComponent instance. the formcomponent that is the closest ancestor of this form. Nullis returned if this the topmost parent form.



getRelativePath
public String getRelativePath()(Code)
Returns the relative path to this form. The path is determined by the source paths defined in the project settings. If this form is embedded, null is returned. the relative path.



getRowCount
public int getRowCount()(Code)
Returns the number of rows in this form. the number of rows in this form



getSelectedComponent
public GridComponent getSelectedComponent()(Code)
Returns the selected child component in this form. The is the component that is selected by the user in design mode.



getState
public ComponentMemento getState(StateRequest si) throws FormException(Code)
Saves this form's state as a memento object.
Parameters:
  si - a state request that has some control over how the form stateis stored. For example, in some cases we want to store fullcopy of a linked form in the memento as oposed to the linkreference. the state of this object as a mememento



getTopLevelForm
public static FormComponent getTopLevelForm(Component comp)(Code)
Traverses the container hierarchy for the given component and returns the first parent that is a top-level FormComponent. Most components only have one top level parent. However, if a component is in a JTabbedPane, it will have two top-level parents.
Parameters:
  comp - the comp that determines where the traversal will start. the first FormComponent ancestor found in the containerheirarchy.



gridIterator
public Iterator gridIterator()(Code)
Returns an interator that iterates over the grid components in a child view. an iterator that iterates over the grid components (GridComponentobjects) in the child view



isEmbedded
public boolean isEmbedded()(Code)
Returns true if this form is an embedded form. An embedded form is stored within the parent form. true if this form is an embedded form.



isLinked
public boolean isLinked()(Code)
Returns true if this form is linked. A linked form is stored in its own form file on disk. true if this form is a linked form.



isTopLevelForm
public boolean isTopLevelForm()(Code)
Return true if this form is the top-most form in the container hierarchy. the flag used to indicate is this is the top-most form whensaving this form.



openLinkedForm
protected FormComponent openLinkedForm(FormMemento fm) throws FormException(Code)
Creates and initializes a FormComponent from the given form memento.



postInitialize
public void postInitialize(FormPanel panel)(Code)
PostInitialize is called once after all components in a form have been re-instantiated at runtime (not design time). This gives each property and component a chance to do some last minute initializations that might depend on the top level parent. An example of this is button groups which are global to a form. FormComponent simply forwards the call to any children.
Parameters:
  panel - the top-level form container



postSetState
protected void postSetState(ComponentMemento cm)(Code)
Performs any final initialization of this form component after it's state has been restored. The main operation is to add empty components where needed. When in design mode, every cell in the grid has a GridComponent. The reason is because we need to enforce a minimum size for the cell when the user sets the row/col size to preferred. If not, the cell size would be zero if nothing were there. However, in run mode, we don't want to create an empty component for every single cell. For example, a 20x20 grid would require 400 components. To prevent this, we only add 1 empty component per row and column. This allows the runtime form to look approximately like the design time forms with rows/cols that have no components. We use the grid_cache to keep track of which columns and rows have had empty components added.



print
public void print()(Code)
Print for debugging



revalidate
public void revalidate()(Code)
Override revalidate so we can forward the call to the underlying GridView as well.



setAbsolutePath
public void setAbsolutePath(String path)(Code)
Sets the absolute path for this form.



setBean
protected void setBean(JETABean jbean)(Code)
Override GridComponent implementation so we can add the child to this container for the design view.



setControlButtonsVisible
public void setControlButtonsVisible(boolean bVisible)(Code)



setFocusPolicy
public void setFocusPolicy(FocusPolicyMemento fm)(Code)
Sets the focus policy for this form



setSelected
public void setSelected(boolean bsel)(Code)
Override setSelected so we can deselect everything in the child view when being dselected.



setState
public void setState(ComponentMemento memento) throws FormException(Code)
Resets this component from a previously saved state.
Parameters:
  memento -



setTopLevelForm
public void setTopLevelForm(boolean topLevel)(Code)
Sets the flag used to indicate is this is the top-most form when saving this form.
Parameters:
  topLevel - set to true to make this a top-level form.



Fields inherited from com.jeta.forms.gui.form.GridComponent
final static int EMPTY_CELL_HEIGHT(Code)(Java Doc)
final static int EMPTY_CELL_WIDTH(Code)(Java Doc)

Methods inherited from com.jeta.forms.gui.form.GridComponent
public void addListener(GridCellListener listener)(Code)(Java Doc)
public void fireGridCellEvent(GridCellEvent evt)(Code)(Java Doc)
public JETABean getBean()(Code)(Java Doc)
Component getBeanChildComponent()(Code)(Java Doc)
public Component getBeanDelegate()(Code)(Java Doc)
public String getBeanName()(Code)(Java Doc)
public int getCellHeight()(Code)(Java Doc)
public int getCellWidth()(Code)(Java Doc)
public int getCellX()(Code)(Java Doc)
public int getCellY()(Code)(Java Doc)
public int getColumn()(Code)(Java Doc)
public int getColumnSpan()(Code)(Java Doc)
public ComponentConstraints getConstraints()(Code)(Java Doc)
public String getId()(Code)(Java Doc)
public CellKeyboardHandler getKeyboardHandler()(Code)(Java Doc)
public Dimension getMinimumSize()(Code)(Java Doc)
public CellMouseHandler getMouseHandler()(Code)(Java Doc)
public GridView getParentView()(Code)(Java Doc)
public Dimension getPreferredSize()(Code)(Java Doc)
public int getRow()(Code)(Java Doc)
public int getRowSpan()(Code)(Java Doc)
abstract public ComponentMemento getState(StateRequest si) throws FormException(Code)(Java Doc)
public boolean hasBean()(Code)(Java Doc)
public boolean isSelected()(Code)(Java Doc)
public boolean isShowing()(Code)(Java Doc)
public void postInitialize(FormPanel panel)(Code)(Java Doc)
abstract public void print()(Code)(Java Doc)
public void removeListener(GridCellListener listener)(Code)(Java Doc)
protected void setBean(JETABean jbean)(Code)(Java Doc)
public void setKeyboardHandler(CellKeyboardHandler handler)(Code)(Java Doc)
public void setMouseHandler(CellMouseHandler handler)(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setParentView(GridView view)(Code)(Java Doc)
public void setSelected(boolean sel)(Code)(Java Doc)
abstract public void setState(ComponentMemento memento) throws FormException(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.