Mercurial > hg > thermostat-tools-eclipse
changeset 47:c870da2752e9
Fix margins in command details area
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Mon, 30 Dec 2013 10:17:57 -0500 |
parents | c3c3388877f7 |
children | a95d042f2204 |
files | src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java Mon Dec 30 09:30:58 2013 -0500 +++ b/src/com/redhat/thermostat/plugin/eclipse/editor/CommandEditPage.java Mon Dec 30 10:17:57 2013 -0500 @@ -17,6 +17,8 @@ import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.forms.widgets.TableWrapData; +import org.eclipse.ui.forms.widgets.TableWrapLayout; import com.redhat.thermostat.plugin.eclipse.model.PluginModel; import com.redhat.thermostat.plugin.eclipse.model.PluginModel.Bundle; @@ -118,14 +120,21 @@ @Override public void createContents(Composite parent) { - // why the $%^ does the parent not have a layout set?!? - parent.setLayout(new GridLayout()); + TableWrapLayout parentLayout = new TableWrapLayout(); + parentLayout.topMargin = 0; + parentLayout.bottomMargin = 0; + parentLayout.leftMargin = 0; + parentLayout.rightMargin = 0; + parent.setLayout(parentLayout); Section section = toolkit.createSection(parent, Section.TITLE_BAR); - section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + TableWrapData tableData = new TableWrapData(TableWrapData.FILL, TableWrapData.TOP); + tableData.grabHorizontal = true; + + section.setLayoutData(tableData); section.setText("Command details"); - section.setDescription("Items marked with * are required"); Composite sectionContents = toolkit.createComposite(section); section.setClient(sectionContents);