SpringLayout and coverting Snapped contraints to absolute

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

SpringLayout and coverting Snapped contraints to absolute

Postby dbh » Thu Nov 17, 2005 4:41 pm

Hello!

I have most of my GUI for an application implemented in SpringLayout. My GUI expert doing the layout and touch-up vastly prefers all of the components to use absolute positions and coordinates, rather than each component snapped to other components.

Is there a way to un-snap all of the components and convert them to absolute positioning, in batch / bulk, while staying within SwingLayout?

The problem with switching to null layout and thend switching back to Spring Layout is that it destroys any code that was dependent on referencing a SwingLayout object.
dbh
 
Posts: 1
Joined: Thu Nov 17, 2005 4:03 pm
Location: Irvine, CA, USA

Re: SpringLayout and coverting Snapped contraints to absolut

Postby Eric Clayberg » Mon Nov 21, 2005 7:43 pm

dbh wrote:Is there a way to un-snap all of the components and convert them to absolute positioning, in batch / bulk, while staying within SwingLayout?

You can switch to null layout and then back to SpringLayout or drop another SpringLayout instance on the window.

dbh wrote:The problem with switching to null layout and thend switching back to Spring Layout is that it destroys any code that was dependent on referencing a SwingLayout object.

There shouldn't be any other code that references the SpringLayout other than the constraint code generated by Designer.

If you do have other code referencing the springLayout object, you should comment out that code while doing the conversion.
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