summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:18 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:18 +0000
commitde8944b4d87caf4e2f4c492cc58ade4576cb0d0e (patch)
treed5ead1b48fba960d9887c33be36f1f827da9bee8 /trunk/pdf-over-gui/src
parentb4868a22b28f17848b8a64cc8a28c7c86fa85f5d (diff)
downloadpdf-over-de8944b4d87caf4e2f4c492cc58ade4576cb0d0e.tar.gz
pdf-over-de8944b4d87caf4e2f4c492cc58ade4576cb0d0e.tar.bz2
pdf-over-de8944b4d87caf4e2f4c492cc58ade4576cb0d0e.zip
+ Implemented behavior with set default output folder
+ centralized font sizes + added comments for documentation git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12658 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Unzipper.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/CLIArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java41
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java13
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BaseConfigurationComposite.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java20
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java11
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java3
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java172
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java57
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java20
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java19
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java1
27 files changed, 292 insertions, 99 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index e904bc09..2bf827b6 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -186,7 +186,7 @@ public class MainWindow {
*/
protected void createContents() {
this.shell = new Shell();
- getShell().setSize(500, 800);
+ getShell().setSize(1024, 768);
getShell().setText(Messages.getString("main.title")); //$NON-NLS-1$
getShell().setLayout(new FormLayout());
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java
index 3f700f14..1e8f899a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java
@@ -20,7 +20,7 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
- *
+ * Localizes string messages for PDFOver GUI
*/
public class Messages {
private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //$NON-NLS-1$
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Unzipper.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Unzipper.java
index 429f8782..cc500f68 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Unzipper.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Unzipper.java
@@ -28,7 +28,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
- *
+ * Unzipper to extract default configuration
*/
public class Unzipper {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
index badf37da..6ba19809 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ArgumentHandler.java
@@ -28,7 +28,7 @@ import at.asit.pdfover.gui.exceptions.InitializationException;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * Handler to process CLI Arguments
*/
public class ArgumentHandler {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
index 3117780e..b44b3f80 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.signator.BKUs;
/**
- *
+ * CLI Argument to set the BKU to use
*/
public class BKUArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/CLIArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/CLIArgument.java
index 7f8d4366..26c3d12f 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/CLIArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/CLIArgument.java
@@ -19,7 +19,7 @@ import at.asit.pdfover.gui.exceptions.InitializationException;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument base class
*/
public abstract class CLIArgument {
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
index 417b85cb..146d83bc 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java
@@ -25,7 +25,7 @@ import at.asit.pdfover.gui.workflow.ConfigManipulator;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to set the configuration file
*/
public class ConfigFileArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
index a89bef78..9ca952a4 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java
@@ -28,7 +28,7 @@ import at.asit.pdfover.gui.workflow.ConfigManipulator;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to set the emblem file to use for signature
*/
public class EmblemArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
index bd015984..3e19d9e4 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java
@@ -24,7 +24,7 @@ import at.asit.pdfover.gui.exceptions.InitializationException;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to show the useage message
*/
public class HelpArgument extends CLIArgument {
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
index 9152a6fd..58afdce1 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java
@@ -28,7 +28,7 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.Status;
/**
- *
+ * CLI Argument to set the input document to sign
*/
public class InputDocumentArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
index 60ef8c59..cbaf7600 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java
@@ -29,7 +29,7 @@ import at.asit.pdfover.gui.workflow.ConfigManipulator;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to show the usage message
*/
public class OutputFolderArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
index c30e6748..d0f60bed 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java
@@ -26,7 +26,7 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper;
/**
- *
+ * CLI Argument to provide Mobile BKU password
*/
public class PasswordArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
index a9c14d18..bb99c173 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java
@@ -26,7 +26,7 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper;
/**
- *
+ * CLI Argument to provide Mobile BKU phone number to use
*/
public class PhoneNumberArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
index da7945a6..da8a5a25 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java
@@ -25,7 +25,7 @@ import at.asit.pdfover.gui.workflow.ConfigManipulator;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to provide the proxy host
*/
public class ProxyHostArgument extends CLIArgument {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
index 51ef7554..0dfdd428 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java
@@ -26,7 +26,7 @@ import at.asit.pdfover.gui.workflow.ConfigManipulator;
import at.asit.pdfover.gui.workflow.StateMachine;
/**
- *
+ * CLI Argument to provide the proxy port
*/
public class ProxyPortArgument extends CLIArgument {
/**
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 d0e1b256..67cd7253 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
@@ -34,17 +34,20 @@ import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
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;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Text;
/**
- *
+ * Composite for advanced configuration
*/
public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
/**
@@ -69,6 +72,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
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.simpleComposite = new SimpleConfigurationComposite(tabFolder,
SWT.NONE, state, container);
@@ -92,6 +99,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_grpSignaturPosition.left = new FormAttachment(0, 5);
grpSignaturPosition.setLayoutData(fd_grpSignaturPosition);
+ FontData[] fD_grpSignaturPosition = grpSignaturPosition.getFont().getFontData();
+ fD_grpSignaturPosition[0].setHeight(TEXT_SIZE_NORMAL);
+ grpSignaturPosition.setFont(new Font(Display.getCurrent(), fD_grpSignaturPosition[0]));
+
this.btnAutomatischePositionierung = new Button(grpSignaturPosition,
SWT.CHECK);
FormData fd_btnAutomatischePositionierung = new FormData();
@@ -102,6 +113,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
.setLayoutData(fd_btnAutomatischePositionierung);
this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //$NON-NLS-1$
+ FontData[] fD_btnAutomatischePositionierung = this.btnAutomatischePositionierung.getFont().getFontData();
+ fD_btnAutomatischePositionierung[0].setHeight(TEXT_SIZE_BUTTON);
+ this.btnAutomatischePositionierung.setFont(new Font(Display.getCurrent(), fD_btnAutomatischePositionierung[0]));
+
this.btnAutomatischePositionierung.addSelectionListener(new SelectionListener() {
@Override
@@ -126,12 +141,20 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_grpBkuAuswahl.bottom = new FormAttachment(66, -5);
grpBkuAuswahl.setLayoutData(fd_grpBkuAuswahl);
+ FontData[] fD_grpBkuAuswahl = grpBkuAuswahl.getFont().getFontData();
+ fD_grpBkuAuswahl[0].setHeight(TEXT_SIZE_NORMAL);
+ grpBkuAuswahl.setFont(new Font(Display.getCurrent(), fD_grpBkuAuswahl[0]));
+
this.cmbBKUAuswahl = new Combo(grpBkuAuswahl, SWT.NONE);
FormData fd_cmbBKUAuswahl = new FormData();
fd_cmbBKUAuswahl.right = new FormAttachment(100, -5);
fd_cmbBKUAuswahl.top = new FormAttachment(0, 5);
fd_cmbBKUAuswahl.left = new FormAttachment(0, 5);
+ FontData[] fD_cmbBKUAuswahl = this.cmbBKUAuswahl.getFont().getFontData();
+ fD_cmbBKUAuswahl[0].setHeight(TEXT_SIZE_NORMAL);
+ this.cmbBKUAuswahl.setFont(new Font(Display.getCurrent(), fD_cmbBKUAuswahl[0]));
+
int blen = BKUs.values().length;
this.bkuStrings = new String[blen];
@@ -172,6 +195,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_grpSpeicherort.bottom = new FormAttachment(100, -5);
grpSpeicherort.setLayoutData(fd_grpSpeicherort);
+ FontData[] fD_grpSpeicherort = grpSpeicherort.getFont().getFontData();
+ fD_grpSpeicherort[0].setHeight(TEXT_SIZE_NORMAL);
+ grpSpeicherort.setFont(new Font(Display.getCurrent(), fD_grpSpeicherort[0]));
+
Label lblDefaultOutputFolder = new Label(grpSpeicherort, SWT.NONE);
FormData fd_lblDefaultOutputFolder = new FormData();
fd_lblDefaultOutputFolder.top = new FormAttachment(0, 5);
@@ -179,12 +206,20 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
lblDefaultOutputFolder.setLayoutData(fd_lblDefaultOutputFolder);
lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //$NON-NLS-1$
+ FontData[] fD_lblDefaultOutputFolder = lblDefaultOutputFolder.getFont().getFontData();
+ fD_lblDefaultOutputFolder[0].setHeight(TEXT_SIZE_NORMAL);
+ lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), fD_lblDefaultOutputFolder[0]));
+
this.txtOutputFolder = new Text(grpSpeicherort, SWT.BORDER);
FormData fd_text = new FormData();
fd_text.top = new FormAttachment(lblDefaultOutputFolder, 5);
fd_text.left = new FormAttachment(0, 5);
this.txtOutputFolder.setLayoutData(fd_text);
+ FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont().getFontData();
+ fD_txtOutputFolder[0].setHeight(TEXT_SIZE_NORMAL);
+ this.txtOutputFolder.setFont(new Font(Display.getCurrent(), fD_txtOutputFolder[0]));
+
this.txtOutputFolder.addFocusListener(new FocusListener() {
@Override
@@ -201,6 +236,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
Button btnBrowse = new Button(grpSpeicherort, SWT.NONE);
fd_text.right = new FormAttachment(btnBrowse, -5);
+ FontData[] fD_btnBrowse = btnBrowse.getFont().getFontData();
+ fD_btnBrowse[0].setHeight(TEXT_SIZE_BUTTON);
+ btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0]));
+
FormData fd_btnBrowse = new FormData();
fd_btnBrowse.top = new FormAttachment(lblDefaultOutputFolder, 5);
fd_btnBrowse.right = new FormAttachment(100, -5);
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
index dc8640de..c59d50f9 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java
@@ -19,6 +19,8 @@ package at.asit.pdfover.gui.composites;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.layout.FormAttachment;
@@ -26,6 +28,7 @@ import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,7 +37,7 @@ import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.BKUs;
/**
- *
+ * Composite for BKU selection
*/
public class BKUSelectionComposite extends StateComposite {
@@ -125,6 +128,10 @@ public class BKUSelectionComposite extends StateComposite {
btn_mobile.setImage(mobile);
+ FontData[] fD_btn_mobile = btn_mobile.getFont().getFontData();
+ fD_btn_mobile[0].setHeight(TEXT_SIZE_BUTTON);
+ btn_mobile.setFont(new Font(Display.getCurrent(), fD_btn_mobile[0]));
+
Button btn_card = new Button(this, SWT.NATIVE | SWT.RESIZE);
btn_card.setText(Messages.getString("bku_selection.card")); //$NON-NLS-1$
//Point card_size = btn_card.computeSize(SWT.DEFAULT, SWT.DEFAULT);
@@ -136,6 +143,10 @@ public class BKUSelectionComposite extends StateComposite {
btn_card.setLayoutData(fd_btn_card);
btn_card.addSelectionListener(new LocalSelectionListener());
+ FontData[] fD_btn_card = btn_card.getFont().getFontData();
+ fD_btn_card[0].setHeight(TEXT_SIZE_BUTTON);
+ btn_card.setFont(new Font(Display.getCurrent(), fD_btn_card[0]));
+
Image karte = new Image(getDisplay(), new ImageData(this.getClass().getResourceAsStream("/img/karte.gif"))); //$NON-NLS-1$
btn_card.setImage(karte);
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BaseConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BaseConfigurationComposite.java
index 3c79e124..d97f3a5f 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BaseConfigurationComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BaseConfigurationComposite.java
@@ -22,7 +22,7 @@ import at.asit.pdfover.gui.workflow.ConfigurationContainer;
import at.asit.pdfover.gui.workflow.states.State;
/**
- *
+ * Base class for configuration composites
*/
public abstract class BaseConfigurationComposite extends StateComposite {
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 abd2edb0..25cedaf0 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
@@ -20,6 +20,7 @@ import java.io.IOException;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,15 +42,17 @@ 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;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormAttachment;
/**
- *
+ * Composite for hosting configuration composites
*/
public class ConfigurationComposite extends StateComposite {
-
+
/**
* Configuration Mode selection listener
*/
@@ -250,6 +253,10 @@ public class ConfigurationComposite extends StateComposite {
});
btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ FontData[] fD_btnSpeichern = btnSpeichern.getFont().getFontData();
+ fD_btnSpeichern[0].setHeight(TEXT_SIZE_BUTTON);
+ btnSpeichern.setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0]));
+
Button btnAbbrechen = new Button(this, SWT.NONE);
FormData fd_btnAbrechen = new FormData();
fd_btnAbrechen.left = new FormAttachment(btnSpeichern, 10);
@@ -264,6 +271,10 @@ 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);
@@ -272,7 +283,10 @@ public class ConfigurationComposite extends StateComposite {
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() {
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index 16a5dd84..dffa38e7 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
@@ -49,13 +49,12 @@ import at.asit.pdfover.gui.Messages;
import at.asit.pdfover.gui.workflow.states.State;
/**
- *
- *
+ * Composite for input document selection
*/
public class DataSourceSelectComposite extends StateComposite {
/**
- *
+ * Selection adapter for file browsing
*/
private final class FileBrowseDialogListener extends SelectionAdapter {
/**
@@ -227,7 +226,7 @@ public class DataSourceSelectComposite extends StateComposite {
this.fd_lbl_drag.bottom = new FormAttachment(lbl_drag2, -10);
lbl_drag.setLayoutData(this.fd_lbl_drag);
FontData[] fD = lbl_drag.getFont().getFontData();
- fD[0].setHeight(20);
+ fD[0].setHeight(TEXT_SIZE_BIG);
lbl_drag.setFont(new Font(Display.getCurrent(), fD[0]));
lbl_drag.setText(Messages.getString("dataSourceSelection.DropLabel")); //$NON-NLS-1$
lbl_drag.setAlignment(SWT.CENTER);
@@ -240,7 +239,7 @@ public class DataSourceSelectComposite extends StateComposite {
// fd_lbl_drag.bottom = new FormAttachment(100, -10);
lbl_drag2.setLayoutData(this.fd_lbl_drag2);
FontData[] fD2 = lbl_drag2.getFont().getFontData();
- fD2[0].setHeight(12);
+ fD2[0].setHeight(TEXT_SIZE_NORMAL);
lbl_drag2.setFont(new Font(Display.getCurrent(), fD2[0]));
lbl_drag2.setText(Messages.getString("dataSourceSelection.DropLabel2")); //$NON-NLS-1$
lbl_drag2.setAlignment(SWT.CENTER);
@@ -249,7 +248,7 @@ public class DataSourceSelectComposite extends StateComposite {
btn_open.setText(Messages.getString("dataSourceSelection.browse")); //$NON-NLS-1$
FontData[] fD_open = btn_open.getFont().getFontData();
- fD_open[0].setHeight(14);
+ fD_open[0].setHeight(TEXT_SIZE_BUTTON);
btn_open.setFont(new Font(Display.getCurrent(), fD_open[0]));
/*
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
index befde87a..1c7e371a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
@@ -36,7 +36,7 @@ import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper;
/**
- *
+ * Composite for entering the phone number for the mobile BKU
*/
public class MobileBKUEnterNumberComposite extends StateComposite {
/**
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
index 9f232ca0..92a3515b 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java
@@ -35,9 +35,10 @@ import at.asit.pdfover.gui.Messages;
import at.asit.pdfover.gui.workflow.states.State;
/**
- *
+ * Composite for entering the TAN for the mobile BKU
*/
public class MobileBKUEnterTANComposite extends StateComposite {
+
/**
*
*/
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
index 1d47da9e..566ee560 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
@@ -18,6 +18,7 @@ package at.asit.pdfover.gui.composites;
// Imports
import java.awt.Desktop;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -40,7 +41,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.Messages;
-import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.DocumentSource;
@@ -57,7 +57,24 @@ public class OutputComposite extends StateComposite {
private File inputFile;
File outputFile = null;
-
+
+ String outputDir = null;
+
+ /**
+ * @return the outputDir
+ */
+ public String getOutputDir() {
+ return this.outputDir;
+ }
+
+ /**
+ * @param outputDir
+ * the outputDir to set
+ */
+ public void setOutputDir(String outputDir) {
+ this.outputDir = outputDir;
+ }
+
/**
* Sets the input file
*
@@ -91,40 +108,74 @@ public class OutputComposite extends StateComposite {
String proposed = OutputComposite.this.getInputFile().getAbsolutePath();
- String extension = FilenameUtils.getExtension(proposed);
-
- proposed = FilenameUtils.removeExtension(proposed);
+ String path = this.getOutputDir();
- proposed = proposed + "_signed." + extension; //$NON-NLS-1$
-
- save.setFileName(proposed);
+ if (path == null || path.equals("")) { //$NON-NLS-1$
+ path = FilenameUtils.getFullPath(proposed);
+ }
- String target = save.open();
+ if(!path.endsWith(File.separator)) {
+ path += File.separator;
+ }
+
+ String name = FilenameUtils.getName(proposed);
- if (target != null) {
- File targetFile = new File(target);
+ String extension = FilenameUtils.getExtension(proposed);
- DocumentSource source = OutputComposite.this.getSignedDocument();
+ name = FilenameUtils.removeExtension(name);
- FileOutputStream outstream = new FileOutputStream(targetFile);
- outstream.write(source.getByteArray(), 0,
- source.getByteArray().length);
- outstream.close();
+ proposed = path + name + "_signed." + extension; //$NON-NLS-1$
- OutputComposite.this.savedFile = targetFile;
+ if (this.getOutputDir() != null && !this.getOutputDir().equals("")) //$NON-NLS-1$
+ {
+ // Output directory is set save there without asking user...
- this.outputFile = targetFile;
- // Show open message ...
- this.lnk_saved_file.setText(Messages.getString("output.link_open_message")); //$NON-NLS-1$
- this.btn_save.setVisible(false);
+ saveResultAsFile(proposed);
} else {
- // Show save message ...
- this.lnk_saved_file.setText(Messages.getString("output.link_save_message")); //$NON-NLS-1$
- this.btn_save.setVisible(true);
+
+ save.setFileName(proposed);
+
+ String target = save.open();
+
+ if (target != null) {
+ saveResultAsFile(target);
+ } else {
+ // Show save message ...
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_save_message")); //$NON-NLS-1$
+ this.btn_save.setVisible(true);
+ }
}
}
/**
+ * @param target
+ * @throws FileNotFoundException
+ * @throws IOException
+ */
+ private void saveResultAsFile(String target) throws FileNotFoundException,
+ IOException {
+ File targetFile = new File(target);
+
+ DocumentSource source = OutputComposite.this
+ .getSignedDocument();
+
+ FileOutputStream outstream = new FileOutputStream(targetFile);
+ outstream.write(source.getByteArray(), 0,
+ source.getByteArray().length);
+ outstream.close();
+
+ OutputComposite.this.savedFile = targetFile;
+
+ this.outputFile = targetFile;
+ // Show open message ...
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_open_message")); //$NON-NLS-1$
+ this.layout(true);
+ this.btn_save.setVisible(false);
+ }
+
+ /**
* SelectionListener for save button
*/
private final class SaveSelectionListener extends SelectionAdapter {
@@ -162,7 +213,12 @@ public class OutputComposite extends StateComposite {
if (OutputComposite.this.outputFile.exists()) {
// Desktop supported check allready done in constructor
- Desktop.getDesktop().open(OutputComposite.this.outputFile);
+ if (Desktop.isDesktopSupported()) {
+ Desktop.getDesktop().open(
+ OutputComposite.this.outputFile);
+ } else {
+ log.error("SWT Desktop is not supported on this platform!"); //$NON-NLS-1$
+ }
return;
}
}
@@ -198,60 +254,45 @@ public class OutputComposite extends StateComposite {
fd_lbl_success_message.right = new FormAttachment(100);
lbl_success_message.setLayoutData(fd_lbl_success_message);
lbl_success_message.setAlignment(SWT.CENTER);
- lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$
-
+ lbl_success_message.setText(Messages
+ .getString("output.success_message")); //$NON-NLS-1$
+
FontData[] fD1 = lbl_success_message.getFont().getFontData();
- fD1[0].setHeight(12);
+ fD1[0].setHeight(TEXT_SIZE_BIG);
lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0]));
-
- this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE);
- this.lnk_saved_file.setText(Messages.getString("output.link_save_message")); //$NON-NLS-1$
+
+ this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE);
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_save_message")); //$NON-NLS-1$
FormData fd_lnk_saved_file = new FormData();
fd_lnk_saved_file.top = new FormAttachment(lbl_success_message, 10);
- fd_lnk_saved_file.left = new FormAttachment(lbl_success_message, 0, SWT.CENTER);
- //fd_lnk_saved_file.right = new FormAttachment(100);
+ fd_lnk_saved_file.left = new FormAttachment(lbl_success_message, 0,
+ SWT.CENTER);
+ // fd_lnk_saved_file.right = new FormAttachment(100);
this.lnk_saved_file.setLayoutData(fd_lnk_saved_file);
-
+
this.lnk_saved_file.addSelectionListener(new OpenSelectionListener());
-
+
+ FontData[] fD2 = this.lnk_saved_file.getFont().getFontData();
+ fD2[0].setHeight(TEXT_SIZE_NORMAL);
+ this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0]));
+
this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE);
this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
-
+
+ FontData[] fD_btn_save = this.btn_save.getFont().getFontData();
+ fD_btn_save[0].setHeight(TEXT_SIZE_BUTTON);
+ this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0]));
+
FormData fd_btn_save = new FormData();
fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10);
- fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0, SWT.CENTER);
+ fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0,
+ SWT.CENTER);
this.btn_save.setLayoutData(fd_btn_save);
-
+
this.btn_save.setVisible(false);
this.btn_save.addSelectionListener(new SaveSelectionListener());
- /*
- Button btn_open = new Button(this, SWT.NATIVE | SWT.RESIZE);
- btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$
- // Point mobile_size = btn_mobile.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- FormData fd_btn_open = new FormData();
- // fd_btn_open.left = new FormAttachment(40, 0);
- fd_btn_open.right = new FormAttachment(50, -5);
- fd_btn_open.top = new FormAttachment(40, 0);
- // fd_btn_open.bottom = new FormAttachment(55, 0);
- btn_open.setLayoutData(fd_btn_open);
- btn_open.addSelectionListener(new OpenSelectionListener());
-
- if (!Desktop.isDesktopSupported()) {
- btn_open.setEnabled(false);
- }
- Button btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE);
- btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- // Point card_size = btn_card.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- FormData fd_btn_save = new FormData();
- fd_btn_save.left = new FormAttachment(50, 5);
- // fd_btn_save.right = new FormAttachment(60, 0);
- fd_btn_save.top = new FormAttachment(40, 0);
- // fd_btn_save.bottom = new FormAttachment(55, 0);
- btn_save.setLayoutData(fd_btn_save);
- btn_save.addSelectionListener(new SaveSelectionListener());
- */
- //this.pack();
}
String tempDirectory;
@@ -301,6 +342,7 @@ public class OutputComposite extends StateComposite {
@Override
public void doLayout() {
// Nothing to do
+ this.layout(true);
try {
if (!this.save_showed) {
OutputComposite.this.saveFile();
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index f70ff85e..c8e7f84a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -32,6 +32,8 @@ import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
@@ -42,6 +44,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
@@ -352,12 +355,20 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
grpHandySignatur.setText(Messages.getString("simple_config.MobileBKU_Title")); //$NON-NLS-1$
grpHandySignatur.setLayout(new GridLayout(2, false));
+ FontData[] fD_grpHandySignatur = grpHandySignatur.getFont().getFontData();
+ fD_grpHandySignatur[0].setHeight(TEXT_SIZE_NORMAL);
+ grpHandySignatur.setFont(new Font(Display.getCurrent(), fD_grpHandySignatur[0]));
+
Label lblMobileNumber = new Label(grpHandySignatur, SWT.NONE
| SWT.RESIZE);
lblMobileNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,
false, 1, 1));
lblMobileNumber.setText(Messages.getString("simple_config.PhoneNumber")); //$NON-NLS-1$
+ FontData[] fD_lblMobileNumber = lblMobileNumber.getFont().getFontData();
+ fD_lblMobileNumber[0].setHeight(TEXT_SIZE_NORMAL);
+ lblMobileNumber.setFont(new Font(Display.getCurrent(), fD_lblMobileNumber[0]));
+
Composite composite_2 = new Composite(grpHandySignatur, SWT.NONE);
composite_2.setLayout(new FormLayout());
composite_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
@@ -382,6 +393,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.txtMobileNumberErrorMarker
.setLayoutData(this.fd_txtMobileNumberErrorMarker);
+ FontData[] fD_txtMobileNumber = this.txtMobileNumber.getFont().getFontData();
+ fD_txtMobileNumber[0].setHeight(TEXT_SIZE_NORMAL);
+ this.txtMobileNumber.setFont(new Font(Display.getCurrent(), fD_txtMobileNumber[0]));
+
this.txtMobileNumber.addTraverseListener(new TraverseListener() {
@Override
@@ -415,6 +430,11 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_grpBildmarke.top = new FormAttachment(20, 5);
grpBildmarke.setLayoutData(fd_grpBildmarke);
grpBildmarke.setLayout(new GridLayout(5, false));
+
+ FontData[] fD_grpBildmarke = grpBildmarke.getFont().getFontData();
+ fD_grpBildmarke[0].setHeight(TEXT_SIZE_NORMAL);
+ grpBildmarke.setFont(new Font(Display.getCurrent(), fD_grpBildmarke[0]));
+
grpBildmarke.setText(Messages.getString("simple_config.Emblem_Title")); //$NON-NLS-1$
new Label(grpBildmarke, SWT.NONE);
new Label(grpBildmarke, SWT.NONE);
@@ -433,6 +453,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
});
+ FontData[] fD_lblEmblem = this.lblEmblem.getFont().getFontData();
+ fD_lblEmblem[0].setHeight(TEXT_SIZE_NORMAL);
+ this.lblEmblem.setFont(new Font(Display.getCurrent(), fD_lblEmblem[0]));
+
DropTarget dnd_target = new DropTarget(this.lblEmblem, DND.DROP_DEFAULT
| DND.DROP_COPY);
final FileTransfer fileTransfer = FileTransfer.getInstance();
@@ -525,22 +549,36 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
});
new Label(grpBildmarke, SWT.NONE);
+
+
+ FontData[] fD_btnUseImage = this.btnUseImage.getFont().getFontData();
+ fD_btnUseImage[0].setHeight(TEXT_SIZE_BUTTON);
+ this.btnUseImage.setFont(new Font(Display.getCurrent(), fD_btnUseImage[0]));
+
Button btnBrowseEmblem = new Button(grpBildmarke, SWT.NONE);
btnBrowseEmblem.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER,
false, false, 1, 1));
btnBrowseEmblem.addSelectionListener(new ImageFileBrowser());
btnBrowseEmblem.setText(Messages.getString("common.browse")); //$NON-NLS-1$
+ FontData[] fD_btnBrowseEmblem = btnBrowseEmblem.getFont().getFontData();
+ fD_btnBrowseEmblem[0].setHeight(TEXT_SIZE_BUTTON);
+ btnBrowseEmblem.setFont(new Font(Display.getCurrent(), fD_btnBrowseEmblem[0]));
+
Group grpProxy = new Group(this, SWT.NONE);
FormData fd_grpProxy = new FormData();
fd_grpProxy.right = new FormAttachment(100, -5);
fd_grpProxy.top = new FormAttachment(65, 5);
fd_grpProxy.left = new FormAttachment(0, 5);
- fd_grpProxy.bottom = new FormAttachment(90, -5);
+ fd_grpProxy.bottom = new FormAttachment(100, -5);
grpProxy.setLayoutData(fd_grpProxy);
grpProxy.setText(Messages.getString("simple_config.Proxy_Title")); //$NON-NLS-1$
grpProxy.setLayout(new GridLayout(2, false));
+ FontData[] fD_grpProxy = grpProxy.getFont().getFontData();
+ fD_grpProxy[0].setHeight(TEXT_SIZE_NORMAL);
+ grpProxy.setFont(new Font(Display.getCurrent(), fD_grpProxy[0]));
+
Label lblNewLabel = new Label(grpProxy, SWT.NONE);
GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false,
false, 1, 1);
@@ -549,6 +587,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
lblNewLabel.setBounds(0, 0, 57, 15);
lblNewLabel.setText(Messages.getString("simple_config.ProxyHost")); //$NON-NLS-1$
+ FontData[] fD_lblNewLabel = lblNewLabel.getFont().getFontData();
+ fD_lblNewLabel[0].setHeight(TEXT_SIZE_NORMAL);
+ lblNewLabel.setFont(new Font(Display.getCurrent(), fD_lblNewLabel[0]));
+
Composite composite = new Composite(grpProxy, SWT.NONE);
composite.setLayout(new FormLayout());
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
@@ -560,6 +602,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_txtProxyHost.top = new FormAttachment(0);
fd_txtProxyHost.left = new FormAttachment(0, 5);
+ FontData[] fD_txtProxyHost = this.txtProxyHost.getFont().getFontData();
+ fD_txtProxyHost[0].setHeight(TEXT_SIZE_NORMAL);
+ this.txtProxyHost.setFont(new Font(Display.getCurrent(), fD_txtProxyHost[0]));
+
this.proxyHostErrorMarker = new ErrorMarker(composite, SWT.NONE, null,
"", this.txtProxyHost); //$NON-NLS-1$
@@ -601,6 +647,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
lblNewLabel_1.setBounds(0, 0, 57, 15);
lblNewLabel_1.setText(Messages.getString("simple_config.ProxyPort")); //$NON-NLS-1$
+ FontData[] fD_lblNewLabel_1 = lblNewLabel_1.getFont().getFontData();
+ fD_lblNewLabel_1[0].setHeight(TEXT_SIZE_NORMAL);
+ lblNewLabel_1.setFont(new Font(Display.getCurrent(), fD_lblNewLabel_1[0]));
+
Composite composite_1 = new Composite(grpProxy, SWT.NONE);
composite_1.setLayout(new FormLayout());
composite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
@@ -613,6 +663,11 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.fd_txtProxyPort.right = new FormAttachment(100, -42);
this.fd_txtProxyPort.bottom = new FormAttachment(100);
this.txtProxyPort.setLayoutData(this.fd_txtProxyPort);
+
+ FontData[] fD_txtProxyPort = this.txtProxyPort.getFont().getFontData();
+ fD_txtProxyPort[0].setHeight(TEXT_SIZE_NORMAL);
+ this.txtProxyPort.setFont(new Font(Display.getCurrent(), fD_txtProxyPort[0]));
+
this.txtProxyPort.addTraverseListener(new TraverseListener() {
@Override
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
index f3d9e362..ce35755f 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/StateComposite.java
@@ -26,6 +26,26 @@ import at.asit.pdfover.gui.workflow.states.State;
public abstract class StateComposite extends Composite {
/**
+ * Normal Text size
+ */
+ public static final int TEXT_SIZE_NORMAL = 12;
+
+ /**
+ *
+ */
+ public static final int TEXT_SIZE_BIG = 14;
+
+ /**
+ *
+ */
+ public static final int TEXT_SIZE_SMALL = 10;
+
+ /**
+ *
+ */
+ public static final int TEXT_SIZE_BUTTON = 12;
+
+ /**
* Current State
*/
protected State state;
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
index e0e33427..4992ef1a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/MainBarButton.java
@@ -32,12 +32,23 @@ import org.eclipse.swt.widgets.Listener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.composites.StateComposite;
+
/**
* Main Bar Button implementation
*/
public abstract class MainBarButton extends Canvas {
+ /**
+ * If borders are drawn with a gradient effect this sets the size
+ */
public static final int GradientFactor = 4;
+
+ /**
+ * Number of pixel of the altitude of the triangle representing the arrow within the button shapes
+ *
+ * This should be a multiple of 2!
+ */
public static final int SplitFactor = 10;
/**
@@ -73,7 +84,7 @@ public abstract class MainBarButton extends Canvas {
this.textColor = this.getForeground();
this.borderColor = new Color(getDisplay(), 0x7E, 0x9F, 0xA5);
this.inactiveText = new Color(getDisplay(), 0x6E, 0x6C, 0x6E);
- this.textsize = 12;
+ this.textsize = StateComposite.TEXT_SIZE_BUTTON;
}
@@ -98,7 +109,7 @@ public abstract class MainBarButton extends Canvas {
/**
* the text size
*/
- protected int textsize = 12;
+ protected int textsize = StateComposite.TEXT_SIZE_BUTTON;
/**
* @return the textsize
@@ -236,8 +247,8 @@ public abstract class MainBarButton extends Canvas {
int width = size.x;
- e.gc.setForeground(activeBackground);
- e.gc.setBackground(inactiveBackground);
+ e.gc.setForeground(this.activeBackground);
+ e.gc.setBackground(this.inactiveBackground);
e.gc.fillGradientRectangle(0, height, width, -1 * height, true);
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
index b5e14286..e6ba02d8 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
@@ -64,6 +64,7 @@ public class OutputState extends State {
tmpDir.mkdir();
}
+ this.outputComposite.setOutputDir(this.stateMachine.getConfigProvider().getDefaultOutputFolder());
this.outputComposite.setTempDirectory(tmpDir.getAbsolutePath());
this.outputComposite.setInputFile(this.stateMachine.getStatus().getDocument());
}