summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-09 13:19:42 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-09 13:19:42 +0100
commitad8cccc8a24e8238dba18f636a138d72f5d77057 (patch)
treeb42d2c7e3b5c29a5cc475fbfd0d1e7728cf49f70 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites
parent0d7f6f56d7a359d6d67763000712dd6b153f741f (diff)
downloadpdf-over-ad8cccc8a24e8238dba18f636a138d72f5d77057.tar.gz
pdf-over-ad8cccc8a24e8238dba18f636a138d72f5d77057.tar.bz2
pdf-over-ad8cccc8a24e8238dba18f636a138d72f5d77057.zip
added new group for signature profile selection
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java96
2 files changed, 90 insertions, 8 deletions
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 7396a6b0..dc88834b 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
@@ -173,6 +173,7 @@ public class ConfigurationComposite extends StateComposite {
this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
+ System.out.println(Messages.getString("config.Simple"));
ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder,
SWT.H_SCROLL | SWT.V_SCROLL);
@@ -188,6 +189,7 @@ public class ConfigurationComposite extends StateComposite {
this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
+ System.out.print(Messages.getString("config.Advanced"));
ScrolledComposite advancedCompositeScr = new ScrolledComposite(
this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index e54b4a59..c3e4a138 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -113,6 +113,11 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
String logoFile;
Image sigPreview = null;
Image logo = null;
+
+ private final Group grpSingnatureProfile;
+ private final Label lblSignatureProfile;
+ private final Combo cmbSingatureProfiles;
+
/**
* @param parent
@@ -198,12 +203,80 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
processNumberChanged();
}
});
+
+
+ //-----------------------------------------------------------------------
+
+ this.grpSingnatureProfile = new Group(this, SWT.NONE);
+
+ FormData fd_grpSingnatureProfile = new FormData();
+ fd_grpSingnatureProfile.right = new FormAttachment(100, -5);
+ fd_grpSingnatureProfile.left = new FormAttachment(0, 5);
+ fd_grpSingnatureProfile.top = new FormAttachment(this.grpHandySignatur, 5);
+ this.grpSingnatureProfile.setLayoutData(fd_grpSingnatureProfile);
+ this.grpSingnatureProfile.setLayout(new GridLayout(2, false));
+ this.grpSingnatureProfile.setText("Signature Profile");
+
+
+ this.lblSignatureProfile = new Label(this.grpSingnatureProfile, SWT.NONE);
+
+ FontData[] fD_grpSingnatureProfile = this.grpSingnatureProfile.getFont()
+ .getFontData();
+ fD_grpSingnatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.grpSingnatureProfile.setFont(new Font(Display.getCurrent(),
+ fD_grpSingnatureProfile[0]));
+
+ // TODO create text for each language
+ this.lblSignatureProfile.setText("Profile"); //$NON-NLS-1$
+
+ FontData[] fD_lblSignatureProfile = this.lblSignatureProfile.getFont()
+ .getFontData();
+ fD_lblSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.lblSignatureProfile.setFont(new Font(Display.getCurrent(),
+ fD_lblSignatureProfile[0]));
+
+ this.cmbSingatureProfiles = new Combo(this.grpSingnatureProfile, SWT.READ_ONLY);
+ FormData fd_cmbSingatureProfiles = new FormData();
+ fd_cmbSingatureProfiles.left = new FormAttachment(this.grpSingnatureProfile, 10);
+ fd_cmbSingatureProfiles.right = new FormAttachment(100, -10);
+ fd_cmbSingatureProfiles.top = new FormAttachment(0, 10);
+ fd_cmbSingatureProfiles.bottom = new FormAttachment(100, -10);
+ this.grpSingnatureProfile.setLayoutData(fd_cmbSingatureProfiles);
+
+ FontData[] fD_cmbSignatureLang = this.grpSingnatureProfile.getFont()
+ .getFontData();
+ fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.grpSingnatureProfile.setFont(new Font(Display.getCurrent(),
+ fD_cmbSignatureLang[0]));
+
+ String[] profiles = new String[Constants.SUPPORTED_PROFILES.length];
+ for (int i = 0; i < Constants.SUPPORTED_PROFILES.length; ++i) {
+ profiles[i] = Constants.SUPPORTED_PROFILES[i];
+ }
+ this.cmbSignatureLang.setItems(profiles);
+ this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Locale currentLocale = SimpleConfigurationComposite.this.configurationContainer
+ .getSignatureLocale();
+ String selectedLocale = Constants.
+ SUPPORTED_PROFILES[SimpleConfigurationComposite.this.cmbSignatureLang
+ .getSelectionIndex()];
+ if (!currentLocale.equals(selectedLocale)) {
+ performSignatureLangSelectionChanged(selectedLocale, currentLocale);
+ }
+ }
+ });
+
+
+ //------------------------------------------------------------------------
+
this.grpLogo = new Group(this, SWT.NONE);
FormData fd_grpBildmarke = new FormData();
fd_grpBildmarke.left = new FormAttachment(0, 5);
fd_grpBildmarke.right = new FormAttachment(100, -5);
- fd_grpBildmarke.top = new FormAttachment(this.grpHandySignatur, 5);
+ fd_grpBildmarke.top = new FormAttachment(this.grpSingnatureProfile, 5);
this.grpLogo.setLayoutData(fd_grpBildmarke);
this.grpLogo.setLayout(new FormLayout());
@@ -411,16 +484,16 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_cmbSignatureLang.bottom = new FormAttachment(100, -10);
this.cmbSignatureLang.setLayoutData(fd_cmbSignatureLang);
- FontData[] fD_cmbSignatureLang = this.cmbSignatureLang.getFont()
- .getFontData();
- fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+// FontData[] fD_cmbSignatureLang = this.cmbSignatureLang.getFont()
+// .getFontData();
+// fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL);
this.cmbSignatureLang.setFont(new Font(Display.getCurrent(),
fD_cmbSignatureLang[0]));
- String[] localeSignStrings = new String[Constants.SUPPORTED_LOCALES.length];
- for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) {
- localeSignStrings[i] = Constants.SUPPORTED_LOCALES[i].getDisplayLanguage();
- }
+// String[] localeSignStrings = new String[Constants.SUPPORTED_LOCALES.length];
+// for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) {
+// localeSignStrings[i] = Constants.SUPPORTED_LOCALES[i].getDisplayLanguage();
+// }
this.cmbSignatureLang.setItems(localeSignStrings);
this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() {
@Override
@@ -705,6 +778,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
}
}
+
+ private void preformProfileSelectionChanged(String selected, String previous) {
+
+
+
+
+ }
/*
* (non-Javadoc)