summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src/main
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:46 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:46 +0000
commit9bc79071a5738f0ca1b40dbe153d96959527324d (patch)
treee0cdd380082d91d6cad2c3d02d8d53c0af945c83 /trunk/pdf-over-gui/src/main
parentaaa1f16d4a933668391dd36e83c217b203de1b16 (diff)
downloadpdf-over-9bc79071a5738f0ca1b40dbe153d96959527324d.tar.gz
pdf-over-9bc79071a5738f0ca1b40dbe153d96959527324d.tar.bz2
pdf-over-9bc79071a5738f0ca1b40dbe153d96959527324d.zip
Disable advanced button, make tabs always visible
Note: TabFolder should be moved to ConfigurationComposite git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12723 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java5
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java71
2 files changed, 6 insertions, 70 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
index 48ffbf07..20e8078c 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
+++ b/trunk/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/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index e19cdfa6..a26f07ce 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/trunk/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() {