1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

Bug #225483 : Unacceptable layout of Binary parsers tab

This commit is contained in:
Oleg Krasilnikov 2008-04-03 14:10:22 +00:00
parent 45d5fd9bc9
commit a43e948e25

View file

@ -28,6 +28,7 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
@ -73,6 +74,7 @@ public class BinaryParsTab extends AbstractCPropertyTab {
protected Table table; protected Table table;
protected CheckboxTableViewer tv; protected CheckboxTableViewer tv;
protected Composite parserGroup; protected Composite parserGroup;
protected SashForm sashForm;
private ICTargetPlatformSetting tps; private ICTargetPlatformSetting tps;
@ -112,9 +114,21 @@ public class BinaryParsTab extends AbstractCPropertyTab {
super.createControls(parent); super.createControls(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(usercomp, ICHelpContextIds.BINARY_PARSER_PAGE); PlatformUI.getWorkbench().getHelpSystem().setHelp(usercomp, ICHelpContextIds.BINARY_PARSER_PAGE);
usercomp.setLayout(new GridLayout(2, false)); usercomp.setLayout(new GridLayout(1, false));
setupLabel(usercomp, UIMessages.getString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
table = new Table(usercomp, SWT.BORDER | SWT.CHECK | SWT.SINGLE); sashForm = new SashForm(usercomp, SWT.NONE);
sashForm.setBackground(sashForm.getDisplay().getSystemColor(SWT.COLOR_GRAY));
sashForm.setOrientation(SWT.VERTICAL);
sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 5;
sashForm.setLayout(layout);
Composite c1 = new Composite(sashForm, SWT.NONE);
c1.setLayout(new GridLayout(2, false));
setupLabel(c1, UIMessages.getString("BinaryParsTab.0"), 2, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
table = new Table(c1, SWT.BORDER | SWT.CHECK | SWT.SINGLE);
table.setLayoutData(new GridData(GridData.FILL_BOTH)); table.setLayoutData(new GridData(GridData.FILL_BOTH));
table.addSelectionListener(new SelectionAdapter() { table.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {
@ -144,11 +158,11 @@ public class BinaryParsTab extends AbstractCPropertyTab {
}}); }});
// get "standard" buttons on my own place // get "standard" buttons on my own place
Composite c = new Composite(usercomp, SWT.NONE); Composite c = new Composite(c1, SWT.NONE);
c.setLayoutData(new GridData(GridData.END)); c.setLayoutData(new GridData(GridData.END));
initButtons(c, new String[] {MOVEUP_STR, MOVEDOWN_STR}); initButtons(c, new String[] {MOVEUP_STR, MOVEDOWN_STR});
parserGroup = new Composite(usercomp, SWT.NULL); parserGroup = new Composite(sashForm, SWT.NULL);
GridData gd = new GridData(); GridData gd = new GridData();
parserGroup.setLayout(new TabFolderLayout()); parserGroup.setLayout(new TabFolderLayout());
@ -160,6 +174,8 @@ public class BinaryParsTab extends AbstractCPropertyTab {
gd.grabExcessVerticalSpace = true; gd.grabExcessVerticalSpace = true;
gd.horizontalSpan = 2; gd.horizontalSpan = 2;
parserGroup.setLayoutData(gd); parserGroup.setLayoutData(gd);
sashForm.setWeights(new int[] {100, 100});
initializeParserList(); initializeParserList();
initializeParserPageMap(); initializeParserPageMap();
handleBinaryParserChanged(); handleBinaryParserChanged();