summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:06:51 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:06:51 +0000
commit9e55646e5771a560c68e9b304af68124a8ffca5a (patch)
tree8cfb9b7e1829e7d6602a0057aac3043b369ba644 /pdf-over-gui
parent4752ea7b11a1194089c1a36675cb2df4d2a28f2d (diff)
downloadmocca-9e55646e5771a560c68e9b304af68124a8ffca5a.tar.gz
mocca-9e55646e5771a560c68e9b304af68124a8ffca5a.tar.bz2
mocca-9e55646e5771a560c68e9b304af68124a8ffca5a.zip
Disable advanced button, make tabs always visible
Note: TabFolder should be moved to ConfigurationComposite git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@137 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java5
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java71
2 files changed, 6 insertions, 70 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
index 48ffbf07..20e8078c 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
@@ -48,6 +48,8 @@ import at.asit.pdfover.signator.BKUs;
/**
* Composite for advanced configuration
+ *
+ * Contains the simple configuration composite
*/
public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
@@ -74,6 +76,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
super(parent, style, state, container);
setLayout(new FormLayout());
+ // TODO: Move this tab folder to the ConfigurationComposite
TabFolder tabFolder = new TabFolder(this, SWT.NONE);
FormData fd_tabFolder = new FormData();
fd_tabFolder.bottom = new FormAttachment(100, -5);
@@ -291,7 +294,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
}
});
- tabFolder.setSelection(advancedTabItem);
+ tabFolder.setSelection(simpleTabItem);
}
/* (non-Javadoc)
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 e19cdfa6..a26f07ce 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
@@ -42,7 +42,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.custom.StackLayout;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.FormLayout;
@@ -75,54 +74,6 @@ public class ConfigurationComposite extends StateComposite {
this.configComposite.setSigner(getSigner());
}
}
-
- /**
- * Configuration Mode selection listener
- */
- private final class ConfigurationModeSelectionListener implements
- SelectionListener {
-
- /**
- * Constructor
- */
- public ConfigurationModeSelectionListener() {
- // Nothing to do
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (ConfigurationComposite.this.configComposite instanceof SimpleConfigurationComposite) {
- // switch to advanced
- ConfigurationComposite.this.configComposite.dispose();
- ConfigurationComposite.this.configComposite = new AdvancedConfigurationComposite(
- ConfigurationComposite.this.containerComposite,
- ConfigurationComposite.this.style,
- ConfigurationComposite.this.state,
- ConfigurationComposite.this.configurationContainer);
- ConfigurationComposite.this.configComposite.setSigner(getSigner());
- ConfigurationComposite.this.btnAdvanced.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
- } else {
- // switch to simple
- ConfigurationComposite.this.configComposite.dispose();
- ConfigurationComposite.this.configComposite = new SimpleConfigurationComposite(
- ConfigurationComposite.this.containerComposite,
- ConfigurationComposite.this.style,
- ConfigurationComposite.this.state,
- ConfigurationComposite.this.configurationContainer);
- ConfigurationComposite.this.configComposite.setSigner(getSigner());
- ConfigurationComposite.this.btnAdvanced.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
- }
-
- ConfigurationComposite.this.configComposite.loadConfiguration();
- ConfigurationComposite.this.compositeStack.topControl = ConfigurationComposite.this.configComposite;
- ConfigurationComposite.this.doLayout();
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do
- }
- }
/**
* SLF4J Logger instance
@@ -166,16 +117,11 @@ public class ConfigurationComposite extends StateComposite {
Composite containerComposite;
/**
- * checks wether the user is done
+ * checks whether the user is done
*/
boolean userDone = false;
/**
- * Button advanced
- */
- Button btnAdvanced;
-
- /**
* Sets the configuration manipulator
*
* @param manipulator
@@ -250,7 +196,7 @@ public class ConfigurationComposite extends StateComposite {
this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE);
- this.configComposite = new SimpleConfigurationComposite(
+ this.configComposite = new AdvancedConfigurationComposite(
this.containerComposite, SWT.FILL | style, state,
this.configurationContainer);
@@ -302,19 +248,6 @@ public class ConfigurationComposite extends StateComposite {
FontData[] fD_btnAbbrechen = btnAbbrechen.getFont().getFontData();
fD_btnAbbrechen[0].setHeight(TEXT_SIZE_BUTTON);
btnAbbrechen.setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0]));
-
- this.btnAdvanced = new Button(this, SWT.NONE);
- FormData fd_btnAdvanced = new FormData();
- fd_btnAdvanced.right = new FormAttachment(100, -5);
- fd_btnAdvanced.bottom = new FormAttachment(100, -5);
- this.btnAdvanced.setLayoutData(fd_btnAdvanced);
- this.btnAdvanced.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
- this.btnAdvanced
- .addSelectionListener(new ConfigurationModeSelectionListener());
-
- FontData[] fD_btnAdvanced = this.btnAdvanced.getFont().getFontData();
- fD_btnAdvanced[0].setHeight(TEXT_SIZE_BUTTON);
- this.btnAdvanced.setFont(new Font(Display.getCurrent(), fD_btnAdvanced[0]));
}
boolean storeConfiguration() {