Community
Participate
Working Groups
http://eclipse.org/articles/Understanding%20Layouts/Understanding%20Layouts.htm Features introduced in 3.0 and 3.1 should be explained, SWT examples and snippets should be moved to new preferred API. TrimLayout should be explained ... it is the aquivalent to Swing's BorderLayout. The convenience API – style bits defined by GridData -- are not recommended anymore so the article should not advocate them :)
TrimLayout isn't public API.
Also TrimLayout is very specialized to the Workbench layout and can not be used in the general way that BorderLayout can.
Maybe you might consider adding a JFace section explaining the org.eclipse.jface.layout classes, i.e. GridDataFactory etc. Yes, I know it's called "in SWT" -- but in JFace apps, plug-ins, and RCP apps using the new convinience API should be the preferred way of creating layouts. At least developers should be made aware of these. One of the most common errors I see in dialogs/layouts is forgetting to set standard margins; using: GridLayoutFactory.swtDefaults().numColumns(nColums).generateLayout(group); is way easier and produces less duplicate code then: GridLayout layout = new GridLayout(numberOfColumns, false); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); and the (beforehand) call to: initializeDialogUnits(composite); which most people forget.
> GridLayoutFactory.swtDefaults().numColumns(nColums).generateLayout(group); That would not generate standard margins. It would generate 5-pixel margins (the SWT defaults), which are wrong. To get standard margins, do this: GridLayoutFactory.fillDefaults().margins(LayoutConstants.getMargins()).numColumns(nColumns).generateLayout(group); There's no good reason to ever call swtDefaults(), and our examples should not endorse it.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.