Kelut logo

Login
 
   
Forums >> JVMS
Attribute Sheets
Posted: 02/10/2003 00:53
By: Jason Gilman
 
Attached File: attribute sheet - draft.txt
For this project we need to be able to display an attribute 
sheet for each selectable component on the screen. To keep 
us from hard coding the attribute sheets for each component 
we are working on a way to specify how each sheet should 
look. This method should also provide a mapping between 
the data model and the final exported XML.

The attached file provides a possiblity of what a configuration 
file for such a method would be. The file provides the structure 
of how the attributes should be display as well as their types 
and in some cases some accepted values. The path attribute 
provides the XPath for the attribute in the final XML.

NOTE: After an email from Prof. Vallino and a discussion 
on Sunday the method for creating the attribute sheets 
has been modified. This file is provide for reference 
and as a starting point for the modified method.
Data Binding
Posted: 02/13/2003 23:36
By: Jason Gilman
 
Attached File: ControlFactory.cs
Attached File: DataModel1.cs
Attached File: DataModel2.cs
Attached File: Form1.cs
Here is a quick example of how Binding works in dot Net.

When the "data model" buttons are pressed on the main form
the proper datamodel is sent to the ControlFactory. The
factory returns the proper Control with a Binding associated
with the correct Property in the DataModel. The Control that
is returned is added to the main Form.

This ideas can be extended to work with our components and
AttributeSheetFactory by having the factory return a Control
which has child Controls for the desired Properties in our
data model.