From 9a018374d7eae5b662217e5da953f021af08cf4c Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:07:23 +0000 Subject: Make simple config scrollable git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@143 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/composites/ConfigurationComposite.java | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'pdf-over-gui/src/main/java/at') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index d14c5242..c7536d17 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -217,18 +217,23 @@ public class ConfigurationComposite extends StateComposite { fd_tabFolder.left = new FormAttachment(0, 5); tabFolder.setLayoutData(fd_tabFolder); - TabItem simpleTabItem = new TabItem(tabFolder, SWT.NULL); - simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ - FontData[] fD_tabFolder = tabFolder.getFont().getFontData(); fD_tabFolder[0].setHeight(TEXT_SIZE_NORMAL); tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0])); - - this.simpleConfigComposite = new SimpleConfigurationComposite(tabFolder, - SWT.NONE, state, this.configurationContainer); - simpleTabItem.setControl(this.simpleConfigComposite); - tabFolder.setSelection(simpleTabItem); + TabItem simpleTabItem = new TabItem(tabFolder, SWT.NONE); + simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + + ScrolledComposite simpleCompositeScr = new ScrolledComposite( + tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); + simpleTabItem.setControl(simpleCompositeScr); + this.simpleConfigComposite = new SimpleConfigurationComposite( + simpleCompositeScr, SWT.NONE, state, this.configurationContainer); + simpleCompositeScr.setContent(this.simpleConfigComposite); + simpleCompositeScr.setExpandHorizontal(true); + simpleCompositeScr.setExpandVertical(true); + simpleCompositeScr.setMinSize( + this.simpleConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); TabItem advancedTabItem = new TabItem(tabFolder, SWT.NONE); advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ @@ -244,6 +249,8 @@ public class ConfigurationComposite extends StateComposite { advancedCompositeScr.setMinSize( this.advancedConfigComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + tabFolder.setSelection(simpleTabItem); + Button btnSpeichern = new Button(this, SWT.NONE); FormData fd_btnSpeichern = new FormData(); fd_btnSpeichern.right = new FormAttachment(100, -5); -- cgit v1.2.3