Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370062 - Adding Support for RelativeLayout
Summary: Adding Support for RelativeLayout
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: WindowBuilder (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-29 07:43 EST by Alessio Pollero CLA
Modified: 2021-06-04 16:44 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot (46.44 KB, image/png)
2012-01-29 07:45 EST, Alessio Pollero CLA
no flags Details
Sample Project (64.65 KB, application/zip)
2012-01-29 07:48 EST, Alessio Pollero CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessio Pollero CLA 2012-01-29 07:43:22 EST
Build Identifier: Version: 3.7.1 Build id: M20110909-1335

RelativeLayout ---> http://code.google.com/p/relativelayout/

RelativeLayout is a free layout manager for Java SE 1.5.0 and higher. Rather than relying on grids or nested boxes, RelativeLayout lets you lay out components relative to each other and the window that contains them. This turns out to be a much more intuitive way of going about it, and virtually any interface you can imagine can be easily created this way.

I'm trying to use this good layout manager with windowbuilder but it seems that it is not supported.
I have imported the layout manager into my project then i added the relativeLayout with the standard add component wizard into the Layouts container in the palette, but if i try to use with windowbuilder i can't ...

See the attached screenshot for more details.

Reproducible: Always
Comment 1 Alessio Pollero CLA 2012-01-29 07:45:50 EST
Created attachment 210240 [details]
Screenshot

As you can see from the image when i drag some components (like a JButton) into a container set with RelativeLayout the component is not rendered and it is not really added in the code ...
Comment 2 Alessio Pollero CLA 2012-01-29 07:48:14 EST
Created attachment 210241 [details]
Sample Project

A simple sample project where you can see that no code is really written by windowbuilder when a component is added in the designer.

The only generated code is : 

        /**
	 * @wbp.nonvisual location=338,271
	 */
	private final JButton button = new JButton("New button");
Comment 3 Eric Clayberg CLA 2012-01-29 11:34:53 EST
Since there is no JavaBean spec for automatically including custom layout managers into a UI layout tool, custom design time code must be written in every case. Adding support for custom layouts requires a lot of work, but WB provides dozens of examples implementing all of the standard Java layout managers as well as a couple of popular 3rd party layout managers. 

The WB committer team has no plans to add support for this layout, but we would be happy to review any community submitted patches that add the needed support. Any such support should be located in its own separate plugin (for example, see the support for MiGLayout or JGoodies FormLayout).
Comment 4 Alessio Pollero CLA 2012-01-29 11:49:30 EST
Ok, so if i want to write the integration with this LayoutManagers, is there any kind of documentation to look ?

Where can i find the examples you mentioned ?
Comment 5 Eric Clayberg CLA 2012-01-30 11:00:50 EST
You should review the New Components Tutorial and Designer Customization API in the WB docs, and look at the org.eclipse.wb.swing.MigLayout, org.eclipse.wb.swing.FormLayout and org.eclipse.wb.swing projects in the WB source.