|
| Re: Custom Layout [message #699858 is a reply to message #699351] |
Fri, 22 July 2011 09:51   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
WindowBuilder executes method invocations and field assignments only for know objects, such as components or known layout constraints.
Your FramingSpec is not know for standard WindowBuilder.
You should tell WindowBuilder that this class belongs to Swing toolkit.
Put into wbp-meta, in same package as STLayout.wbp-component.xml, new file FramingSpec.wbp-forced-toolkit.txt, with content "org.eclipse.wb.swing" (i.e. ID of Swing toolkit). After this WindowBuilder will create model for it, execute field assignments and even allow to edit properties.
Konstantin Scheglov,
Google, Inc.
|
|
|
|
|
| Re: Custom Layout [message #703521 is a reply to message #703196] |
Wed, 27 July 2011 12:51   |
Konstantin Scheglov Messages: 547 Registered: July 2009 |
Senior Member |
|
|
Look into JLabel.wbp-component.xml, how it uses
<property-tag name="labelFor" tag="useObjectEditor" value="true"/>
to allow Component selection editor. If this is still not exactly what you want, look on org.eclipse.wb.internal.swt.model.layout.form.ControlSelectionPropertyEditor - it is for SWT and Control, but it should be easy to adapt for Swing.
Konstantin Scheglov,
Google, Inc.
|
|
|
|
| Re: Custom Layout [message #780232 is a reply to message #780206] |
Tue, 17 January 2012 07:18  |
Rayleigh Missing name Messages: 20 Registered: July 2011 |
Junior Member |
|
|
Looks like
getConstraint(component).delete();
super.removeComponentConstraints(getContainer(), component);
does the job ( thanks, GridBagLayout ), but there is still the issue with the association beeing generated before the declaration of the constraint.
|
|
|
Powered by
FUDForum. Page generated in 0.08644 seconds