The Source for Java Technology Collaboration

Home » java.net Forums » JavaDesktop Announcements » JavaDesktop Product Announcements

Thread: asking comments on Swing's new Generic Model/View/Control proposal.

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 3 - Last Post: Sep 22, 2009 7:40 AM by: spix Threads: [ Previous | Next ]
spix

Posts: 6
asking comments on Swing's new Generic Model/View/Control proposal.
Posted: Sep 9, 2009 12:22 AM
  Click to reply to this thread Reply

Hi All,

I am working on a project proposal to make Swing MVC components Generic. Today's Swing Model and Selection events are row based which is an artifact from it original design (I expect). Using the actual affected objects themself within POJO based messages from both SelectionModel and DataModel would greatly simplify the design and implementation of Controllers. Controller could also send selection change messages to certain view that can be maniplulated by the user to reflect the state of a certain object. Using annotations to identify what a SelectionModel or a DataModel and a Controller is a IDE is then able to generate the code to generate the Controller if it is doesn't exists yet and then generate the code to let the selected data or selection model send these messages to the designated Controller.

I would really appriciate if you could read this very first verion of my proposal and provide me with constructive feedback to see if I am on the right track.

see https://gmvc.dev.java.net/

spix

Posts: 6
Re: asking comments on Swing's new Generic Model/View/Control proposal.
Posted: Sep 9, 2009 1:35 AM   in response to: spix
  Click to reply to this thread Reply

see http://www.java.net/project/swing-generic-tablemodel-and-selection-interface-allow-view-independent-pojo-controllers

Thnx

david_hall

Posts: 153
Re: asking comments on Swing's new Generic Model/View/Control proposal.
Posted: Sep 16, 2009 6:48 AM   in response to: spix
  Click to reply to this thread Reply

apparently, we can't see that link -- access is denied.

I've done some work in this area that you might be interested in.

http://jga.sf.net/docs/javadoc/index.html?net/sf/jga/swing/package-summary.html

(Note, the javadoc in general is not from the current 0.8.1 release, but in this package, there are no changes to be worried about).

I've used an extended version of a GenericTableModel with great success -- we were able to greatly eliminate standard TableModel code, and greatly reduce errors by describing tables using a builder-type syntax.

David Hall
http://jga.sf.net/
http://jroller.com/dhall/

spix

Posts: 6
Re: asking comments on Swing's new Generic Model/View/Control proposal.
Posted: Sep 22, 2009 7:40 AM   in response to: david_hall
  Click to reply to this thread Reply

Hey David,

Yes, you are right, the project was not approved so that is why you couldn't see the project.

You should be able to read : http://www.java.net/project/swings-generic-mvc-interface

I also submitted the very first initial code today and I am working on lessons to explain what this projects is all about.

In a nutshell this project tries to achieve to de-couple the Controller from the specific View's selection- and data-model. The basic idea is the a generic version of a View i.e. JList->GList will emit the actual objects instances that are changed in the model and the actual object instances the are selected or deselected. Right now Controllers are very tight coupled to the View they are controlling and that is exactly what I want to change: I want to have Controllers that don't know anything about the actual View used. For a controller it should be equal if the View is a JList/GList or a JTable/GTable etc or even a custom maded ButtonGroup.

Can you let me know if you are able to see the source code?

Best place to start is in the Views in javax.swing.gmvc source directory, but I am affraid that you don't have access, can you let me know if you have trouble getting access to the source code?

I am just started with this project and there is still a lot to be done. The code compiles that is about it.

Where can I put i.e. a lesson about gmvc by the way, just like a swing worker lessons, see http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html
I am in the process of writing such a lessons also for gmvc. I also would like to write an article for a site like JavaWorld or something like that. Any hints are really appriciated......

Sorry that this reply is so late, I missed the email telling me that you posted a reply on my posting.

Bye for now.


André




 XML java.net RSS