Visual Inheritance & SpringLayout

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Visual Inheritance & SpringLayout

Postby ncister » Thu Mar 02, 2006 1:57 pm

Hi all,
I'm using WBP v. 4.2.1 Build id: 2006.03.01 and I'm trying the JFrame visual inheritance ... but I've a problem .... to re-create it perform the following steps:
1) create a standard JFrame named "Form1" using SpringLayout layout and drag on it two JButtons.
2) create a secondary JFrame named "Form2" that extends "Form1".
3) at this point the two parent component (Form1) buttons are correctly displayed
4) ... now, I don't succeed to drag any other Swing component on the designer

Why ?
Thanks.
Nicola.
ncister
 
Posts: 14
Joined: Wed Jan 19, 2005 1:57 am

Re: Visual Inheritance & SpringLayout

Postby Eric Clayberg » Thu Mar 02, 2006 3:05 pm

ncister wrote:I'm using WBP v. 4.2.1 Build id: 2006.03.01 and I'm trying the JFrame visual inheritance ... but I've a problem .... to re-create it perform the following steps:
1) create a standard JFrame named "Form1" using SpringLayout layout and drag on it two JButtons.
2) create a secondary JFrame named "Form2" that extends "Form1".
3) at this point the two parent component (Form1) buttons are correctly displayed
4) ... now, I don't succeed to drag any other Swing component on the designer
Why ?

SpringLayout is not directly supported for visual inheritance.

I would suggest adding a panel to Form1 and using Expose Component to make that panel visible to Form2.

In Form2, you can then set the exposed panel to use SpringLayout and then add widgets to that.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Postby ncister » Fri Mar 03, 2006 12:45 am

Hi Eric, and thanks for replay ....

SpringLayout is not directly supported for visual inheritance.


... but does it will be supported in the near future ?
ncister
 
Posts: 14
Joined: Wed Jan 19, 2005 1:57 am

Postby Eric Clayberg » Sat Mar 04, 2006 11:27 am

ncister wrote:will be supported in the near future ?

In the future (some time later this year), yes.

In the near future (in the next couple of weeks or months), no.

In the mean time, using a combination of visual inheritance and composition via inherited panels should allow you to create just about any interface that you want.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Visual Inheritance & SpringLayout

Postby ncister » Mon Oct 27, 2008 8:05 am

Hi Eric ....
I Re-play my old question ....
Does WBP (now, after two years, on v. 6.8.0) support Visual Inheritance with SpringLayout ?
After my previous posts I tried to use inherited panels but .... without results :-(
Please, can you post an example with a JButton on Form1 (for example anchored on Bottom/Right) and a JTextFields on Form2 (for example anchored on Top/Left) ... ? ... using SpringLayout, of course ...
Thanks.
Nicola.
ncister
 
Posts: 14
Joined: Wed Jan 19, 2005 1:57 am

Re: Visual Inheritance & SpringLayout

Postby Eric Clayberg » Tue Oct 28, 2008 5:23 pm

Better support for SpringLayout never made it to the top of the list due to many other higher priority items.

On the bright side, we have been working on some major internal parsing engine improvements that will provide better, general support for visual inheritance and should make it much easier for us to implement visiual inheritance for SpringLayout.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest