This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 67764 - Matisse - Helper for parsing XML form
Summary: Matisse - Helper for parsing XML form
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-29 11:46 UTC by droida38
Modified: 2005-10-31 11:20 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description droida38 2005-10-29 11:46:22 UTC
What I think would be *really* cool, where if Matisse offered the possiblity to
export the generated layout to XML, and also provided a parser to turn the XML
back into a layout.

To apply the layout on my application I would have to use a 'GroupLayoutParser'
that would parse the XML and ask my application for the components using some
interface.

My application would implement something like:

Interface GroupLayoutComponentSupplier {
  public Component getComponent(String name);
 }

And to populate the GUI I would call something like:

File xmlfile = new File(mylayout.xml);
JPanel panel = GroupLayoutParser.doLayoutPanel(xmlfile, this); // this
instanceof GroupLayoutComponentSupplier

That way I would get rid of all the autogenerated layout code, and be able to
reuse a layout. Maybe I could even allow the users of the application to
rearrange the gui as it no longer affects the code (as long as components are
not added).
Comment 1 droida38 2005-10-30 00:11:49 UTC
What I was not aware of, when I wrote the previous mail, is that the .form file
contains the layout in xml. So I guess what I'm really requesting is a
FormFileParser that will parse the .form file and requests the components from
my application - then return a complete panel.
Comment 2 droida38 2005-10-31 11:20:31 UTC
This feature will ease implementaion of MVC / PresentationModel pattern.

http://martinfowler.com/eaaDev/PresentationModel.html