org.progeeks.meta.view
Interface MetaForm

All Known Implementing Classes:
DefaultMetaForm, IdentityMetaForm

public interface MetaForm

Defines the properties that can appear in a view along with their ordering. Forms can potentially contain other information sometimes specific to a given view type. The basic idea is to provide more flexible view-specific access to the comparatively strict meta-class. This may/should eventually be broken out into its own package maybe that would be shared by all other UIs such as HTML/XML/etc.. I'm experimenting with it in the Swing package. MetaForms are specific to a MetaClass and can provide abbreviated or transformed views of that class. It is important to note that this is not a MetaObject wrapper. MetaObjects do that just fine on their own. Though through experimentation, these forms may provide pass-through access to a MetaObject's properties, such as maybe a getPropertyMutator( MetaObject, String name ) method. This would allow the form to perform additional conversions or whatever. Since this is an experiment for now, I'm leaving it open ended. We may also want to make this runtime mutable, but I'm not since meta-classes aren't. I can see use-cases where a user may want to select the columns they see for example. So it's worth thinking about. The form UIs would all be more complicated of course.

Version:
$Revision: 1.4 $
Author:
Paul Speed

Field Summary
static AnnotationType FORM_ANNOTATION
          Annotation type for storing MetaForm definitions.
 
Method Summary
 MetaClass getMetaClass()
          Returns the meta-class to which this form refers.
 int getPropertyCount()
          Returns the number of properties in this form.
 PropertyInfo getPropertyInfo(int index)
          Returns the PropertyInfo for the specified index.
 PropertyMutator getPropertyMutator(MetaObject target, int index)
          Returns a PropertyMutator from the specified MetaObject for the specified index.
 java.util.List getPropertyNames()
          Returns a list of property names in the order that they should appear in any UIs referencing this form.
 

Field Detail

FORM_ANNOTATION

static final AnnotationType FORM_ANNOTATION
Annotation type for storing MetaForm definitions.

Method Detail

getPropertyNames

java.util.List getPropertyNames()
Returns a list of property names in the order that they should appear in any UIs referencing this form.


getPropertyCount

int getPropertyCount()
Returns the number of properties in this form.


getPropertyInfo

PropertyInfo getPropertyInfo(int index)
Returns the PropertyInfo for the specified index.


getPropertyMutator

PropertyMutator getPropertyMutator(MetaObject target,
                                   int index)
Returns a PropertyMutator from the specified MetaObject for the specified index.


getMetaClass

MetaClass getMetaClass()
Returns the meta-class to which this form refers. This may not be necessary in the long run, but it clearly defines the class->form relationship.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.