Java Doc for Form.java in  » Web-Framework » Millstone » org » millstone » base » ui » 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 » Web Framework » Millstone » org.millstone.base.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.millstone.base.ui.AbstractComponent
      org.millstone.base.ui.AbstractField
         org.millstone.base.ui.Form

Form
public class Form extends AbstractField implements Item.Editor,Buffered,Item,Validatable(Code)
Form component provides easy way of creating and managing sets fields.

Form is a container for fields implementing Field interface. It provides support for any layouts and provides buffering interface for easy connection of commit- and discard buttons. All the form fields can be customized by adding validators, setting captions and icons, setting immediateness, etc. Also direct mechanism for replacing existing fields with selections is given.

Form provides customizable editor for classes implementing org.millstone.base.data.Item interface. Also the form itself implements this interface for easier connectivity to other items. To use the form as editor for an item, just connect the item to form with Form.setItemDataSource(Item) . If only a part of the item needs to be edited, Form.setItemDataSource(ItemCollection) can be used instead. After the item has been connected to the form, the automatically created fields can be customized and new fields can be added. If you need to connect a class that does not implement org.millstone.base.data.Item interface, most properties of any class following bean pattern, can be accessed trough org.millstone.base.data.util.BeanItem .


author:
   IT Mill Ltd.
version:
   3.1.1
since:
   3.0



Constructor Summary
public  Form()
     Contruct a new form with default layout.
public  Form(Layout formLayout)
     Contruct a new form with given layout.
public  Form(Layout formLayout, FieldFactory fieldFactory)
     Contruct a new form with given layout and FieldFactory.

Method Summary
public  voidaddField(Object propertyId, Field field)
     Add field to form.
public  booleanaddItemProperty(Object id, Property property)
     Add a new property to form and create corresponding field.
public  voidaddValidator(Validator validator)
    
public  voidattach()
    
public  voidcommit()
    
public  voiddetach()
    
public  voiddiscard()
    
public  voidfocus()
     Focuses the first field in the form.
public  FieldgetField(Object propertyId)
    
public  FieldFactorygetFieldFactory()
     Get the field factory of the form.
public  ItemgetItemDataSource()
    
public  PropertygetItemProperty(Object id)
     The property identified by the property id.

The property data source of the field specified with property id is returned.

public  CollectiongetItemPropertyIds()
    
public  LayoutgetLayout()
     Get the layout of the form.
public  StringgetTag()
    
public  ClassgetType()
    
public  CollectiongetValidators()
    
public  CollectiongetVisibleItemProperties()
     Returns the visibleProperties.
public  booleanisInvalidAllowed()
    
public  booleanisModified()
    
public  booleanisReadThrough()
    
public  booleanisValid()
    
public  booleanisWriteThrough()
    
public  voidpaintContent(PaintTarget target)
    
public  booleanremoveAllProperties()
     Removes all properties and fields from the form. Success of the operation.
public  booleanremoveItemProperty(Object id)
     Removes the property and corresponding field from the form.
public  voidremoveValidator(Validator validator)
    
public  SelectreplaceWithSelect(Object propertyId, Object[] values, Object[] descriptions)
     Set a form field to be selectable from static list of changes.

The list values and descriptions are given as array.

public  voidsetFieldFactory(FieldFactory fieldFactory)
     Set the field factory of Form.
protected  voidsetFormDataSource(Object data, Collection properties)
     Update the internal form datasource.
protected  voidsetInternalValue(Object newValue)
     Set the internal value.
public  voidsetInvalidAllowed(boolean invalidValueAllowed)
    
public  voidsetItemDataSource(Item newDataSource)
     Set the item datasource for the form.
public  voidsetItemDataSource(Item newDataSource, Collection propertyIds)
     Set the item datasource for the form, but limit the form contents to specified properties of the item.
public  voidsetLayout(Layout newLayout)
     Set the layout of the form.
public  voidsetReadOnly(boolean readOnly)
    
public  voidsetReadThrough(boolean readThrough)
    
public  voidsetTabIndex(int tabIndex)
    
public  voidsetVisibleItemProperties(Collection visibleProperties)
     Sets the visibleProperties.
public  voidsetWriteThrough(boolean writeThrough)
    
public  voidvalidate()
    


Constructor Detail
Form
public Form()(Code)
Contruct a new form with default layout.

By default the form uses OrderedLayout with form-style.
Parameters:
  formLayout - The layout of the form.




Form
public Form(Layout formLayout)(Code)
Contruct a new form with given layout.
Parameters:
  formLayout - The layout of the form.



Form
public Form(Layout formLayout, FieldFactory fieldFactory)(Code)
Contruct a new form with given layout and FieldFactory.
Parameters:
  formLayout - The layout of the form.
Parameters:
  fieldFactory - FieldFactory of the form




Method Detail
addField
public void addField(Object propertyId, Field field)(Code)
Add field to form.

The property id must not be already used in the form.

This field is added to the form layout in the default position (the position used by Layout.addComponent(Component) method. In the special case that the underlying layout is a custom layout, string representation of the property id is used instead of the default location.


Parameters:
  propertyId - Property id the the field.
Parameters:
  field - New field added to the form.



addItemProperty
public boolean addItemProperty(Object id, Property property)(Code)
Add a new property to form and create corresponding field.
See Also:   org.millstone.base.data.Item.addItemProperty(ObjectProperty)



addValidator
public void addValidator(Validator validator)(Code)

See Also:   org.millstone.base.data.Validatable.addValidator(org.millstone.base.data.Validator)



attach
public void attach()(Code)

See Also:   org.millstone.base.ui.Component.attach



commit
public void commit() throws Buffered.SourceException(Code)



detach
public void detach()(Code)

See Also:   org.millstone.base.ui.Component.detach



discard
public void discard() throws Buffered.SourceException(Code)



focus
public void focus()(Code)
Focuses the first field in the form.
See Also:   org.millstone.base.ui.Component.Focusable.focus



getField
public Field getField(Object propertyId)(Code)
Get the field identified by the propertyid



getFieldFactory
public FieldFactory getFieldFactory()(Code)
Get the field factory of the form. FieldFactory Factory used to create the fields



getItemDataSource
public Item getItemDataSource()(Code)



getItemProperty
public Property getItemProperty(Object id)(Code)
The property identified by the property id.

The property data source of the field specified with property id is returned. If there is a (with specified property id) having no data source, the field is returned instead of the data source.


See Also:   org.millstone.base.data.Item.getItemProperty(Object)



getItemPropertyIds
public Collection getItemPropertyIds()(Code)



getLayout
public Layout getLayout()(Code)
Get the layout of the form.

By default form uses OrderedLayout with form-style.

Layout of the form.



getTag
public String getTag()(Code)



getType
public Class getType()(Code)

See Also:   org.millstone.base.ui.AbstractField.getType



getValidators
public Collection getValidators()(Code)

See Also:   org.millstone.base.data.Validatable.getValidators



getVisibleItemProperties
public Collection getVisibleItemProperties()(Code)
Returns the visibleProperties. Collection



isInvalidAllowed
public boolean isInvalidAllowed()(Code)

See Also:   org.millstone.base.data.Validatable.isInvalidAllowed



isModified
public boolean isModified()(Code)



isReadThrough
public boolean isReadThrough()(Code)



isValid
public boolean isValid()(Code)

See Also:   org.millstone.base.data.Validatable.isValid



isWriteThrough
public boolean isWriteThrough()(Code)



paintContent
public void paintContent(PaintTarget target) throws PaintException(Code)



removeAllProperties
public boolean removeAllProperties()(Code)
Removes all properties and fields from the form. Success of the operation. Removal of all fields succeeded if (and only if) the return value is true.



removeItemProperty
public boolean removeItemProperty(Object id)(Code)
Removes the property and corresponding field from the form.
See Also:   org.millstone.base.data.Item.removeItemProperty(Object)



removeValidator
public void removeValidator(Validator validator)(Code)

See Also:   org.millstone.base.data.Validatable.removeValidator(org.millstone.base.data.Validator)



replaceWithSelect
public Select replaceWithSelect(Object propertyId, Object[] values, Object[] descriptions)(Code)
Set a form field to be selectable from static list of changes.

The list values and descriptions are given as array. The value-array must contain the current value of the field and the lengths of the arrays must match. Null values are not supported.

The select property generated



setFieldFactory
public void setFieldFactory(FieldFactory fieldFactory)(Code)
Set the field factory of Form. FieldFacroty is used to create fields for form properties. By default the form uses BaseFieldFactory to create Field instances.
Parameters:
  fieldFactory - New factory used to create the fields
See Also:   Field
See Also:   FieldFactory



setFormDataSource
protected void setFormDataSource(Object data, Collection properties)(Code)
Update the internal form datasource. Method setFormDataSource.
Parameters:
  value -



setInternalValue
protected void setInternalValue(Object newValue)(Code)
Set the internal value. This is relevant when the Form is used as Field.
See Also:   org.millstone.base.ui.AbstractField.setInternalValue(java.lang.Object)



setInvalidAllowed
public void setInvalidAllowed(boolean invalidValueAllowed) throws UnsupportedOperationException(Code)

See Also:   org.millstone.base.data.Validatable.setInvalidAllowed(boolean)



setItemDataSource
public void setItemDataSource(Item newDataSource)(Code)
Set the item datasource for the form.

Setting item datasource clears any fields, the form might contain and adds all the properties as fields to the form.


See Also:   org.millstone.base.data.Item.Viewer.setItemDataSource(Item)



setItemDataSource
public void setItemDataSource(Item newDataSource, Collection propertyIds)(Code)
Set the item datasource for the form, but limit the form contents to specified properties of the item.

Setting item datasource clears any fields, the form might contain and adds the specified the properties as fields to the form, in the specified order.


See Also:   org.millstone.base.data.Item.Viewer.setItemDataSource(Item)



setLayout
public void setLayout(Layout newLayout)(Code)
Set the layout of the form.

By default form uses OrderedLayout with form-style.


Parameters:
  layout - Layout of the form.



setReadOnly
public void setReadOnly(boolean readOnly)(Code)

See Also:   org.millstone.base.ui.Component.setReadOnly(boolean)



setReadThrough
public void setReadThrough(boolean readThrough)(Code)



setTabIndex
public void setTabIndex(int tabIndex)(Code)

See Also:   org.millstone.base.ui.Component.Focusable.setTabIndex(int)



setVisibleItemProperties
public void setVisibleItemProperties(Collection visibleProperties)(Code)
Sets the visibleProperties.
Parameters:
  visibleProperties - The visibleProperties to set



setWriteThrough
public void setWriteThrough(boolean writeThrough)(Code)



validate
public void validate() throws InvalidValueException(Code)

See Also:   org.millstone.base.data.Validatable.validate



Methods inherited from org.millstone.base.ui.AbstractField
public void addListener(Property.ValueChangeListener listener)(Code)(Java Doc)
public void addListener(Property.ReadOnlyStatusChangeListener listener)(Code)(Java Doc)
public void addValidator(Validator validator)(Code)(Java Doc)
public void attach()(Code)(Java Doc)
public void commit() throws Buffered.SourceException(Code)(Java Doc)
public static AbstractField constructField(Class propertyType)(Code)(Java Doc)
public void discard() throws Buffered.SourceException(Code)(Java Doc)
public void finalize() throws Throwable(Code)(Java Doc)
protected void fireReadOnlyStatusChange()(Code)(Java Doc)
protected void fireValueChange()(Code)(Java Doc)
public void focus()(Code)(Java Doc)
public ErrorMessage getErrorMessage()(Code)(Java Doc)
public long getFocusableId()(Code)(Java Doc)
public Property getPropertyDataSource()(Code)(Java Doc)
public int getTabIndex()(Code)(Java Doc)
abstract public Class getType()(Code)(Java Doc)
public Collection getValidators()(Code)(Java Doc)
public Object getValue()(Code)(Java Doc)
public boolean isInvalidAllowed()(Code)(Java Doc)
public boolean isInvalidCommitted()(Code)(Java Doc)
public boolean isModified()(Code)(Java Doc)
public boolean isReadOnly()(Code)(Java Doc)
public boolean isReadThrough()(Code)(Java Doc)
public boolean isRequired()(Code)(Java Doc)
public boolean isValid()(Code)(Java Doc)
public boolean isWriteThrough()(Code)(Java Doc)
public void paintContent(PaintTarget target) throws PaintException(Code)(Java Doc)
public void removeListener(Property.ValueChangeListener listener)(Code)(Java Doc)
public void removeListener(Property.ReadOnlyStatusChangeListener listener)(Code)(Java Doc)
public void removeValidator(Validator validator)(Code)(Java Doc)
protected void setInternalValue(Object newValue)(Code)(Java Doc)
public void setInvalidAllowed(boolean invalidAllowed) throws UnsupportedOperationException(Code)(Java Doc)
public void setInvalidCommitted(boolean isCommitted)(Code)(Java Doc)
public void setPropertyDataSource(Property newDataSource)(Code)(Java Doc)
public void setReadOnly(boolean readOnly)(Code)(Java Doc)
public void setReadThrough(boolean readTrough) throws Buffered.SourceException(Code)(Java Doc)
public void setRequired(boolean required)(Code)(Java Doc)
public void setTabIndex(int tabIndex)(Code)(Java Doc)
public void setValue(Object newValue) throws Property.ReadOnlyException, Property.ConversionException(Code)(Java Doc)
public void setWriteThrough(boolean writeTrough) throws Buffered.SourceException(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void validate() throws Validator.InvalidValueException(Code)(Java Doc)
public void valueChange(Property.ValueChangeEvent event)(Code)(Java Doc)

Methods inherited from org.millstone.base.ui.AbstractComponent
public void addListener(RepaintRequestListener listener)(Code)(Java Doc)
public void addListener(Class eventType, Object object, Method method)(Code)(Java Doc)
public void addListener(Class eventType, Object object, String methodName)(Code)(Java Doc)
public void addListener(Component.Listener listener)(Code)(Java Doc)
public void attach()(Code)(Java Doc)
public void changeVariables(Object source, Map variables)(Code)(Java Doc)
public void childRequestedRepaint(Collection alreadyNotified)(Code)(Java Doc)
public void dependsOn(VariableOwner depended)(Code)(Java Doc)
public void detach()(Code)(Java Doc)
protected void fireComponentErrorEvent()(Code)(Java Doc)
protected void fireComponentEvent()(Code)(Java Doc)
protected void fireEvent(Component.Event event)(Code)(Java Doc)
public Application getApplication()(Code)(Java Doc)
public String getCaption()(Code)(Java Doc)
public ErrorMessage getComponentError()(Code)(Java Doc)
public Object getData()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Set getDirectDependencies()(Code)(Java Doc)
public ErrorMessage getErrorMessage()(Code)(Java Doc)
public Resource getIcon()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Component getParent()(Code)(Java Doc)
public String getStyle()(Code)(Java Doc)
abstract public String getTag()(Code)(Java Doc)
public Window getWindow()(Code)(Java Doc)
public boolean isEnabled()(Code)(Java Doc)
public boolean isImmediate()(Code)(Java Doc)
public boolean isReadOnly()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
final public void paint(PaintTarget target) throws PaintException(Code)(Java Doc)
public void paintContent(PaintTarget target) throws PaintException(Code)(Java Doc)
public void removeDirectDependency(VariableOwner depended)(Code)(Java Doc)
public void removeListener(RepaintRequestListener listener)(Code)(Java Doc)
public void removeListener(Class eventType, Object target)(Code)(Java Doc)
public void removeListener(Class eventType, Object target, Method method)(Code)(Java Doc)
public void removeListener(Class eventType, Object target, String methodName)(Code)(Java Doc)
public void removeListener(Component.Listener listener)(Code)(Java Doc)
public void requestRepaint()(Code)(Java Doc)
public void requestRepaintRequests()(Code)(Java Doc)
public void setCaption(String caption)(Code)(Java Doc)
public void setComponentError(ErrorMessage componentError)(Code)(Java Doc)
public void setData(Object data)(Code)(Java Doc)
public void setDescription(String description)(Code)(Java Doc)
public void setEnabled(boolean enabled)(Code)(Java Doc)
public void setIcon(Resource icon)(Code)(Java Doc)
public void setImmediate(boolean immediate)(Code)(Java Doc)
public void setLocale(Locale locale)(Code)(Java Doc)
public void setParent(Component parent)(Code)(Java Doc)
public void setReadOnly(boolean readOnly)(Code)(Java Doc)
public void setStyle(String style)(Code)(Java Doc)
public void setVisible(boolean visible)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.