summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:14:05 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:14:05 +0000
commitf844bf08c0377a157e3edaa7377baf00b0c4b537 (patch)
tree9553d7ed9d4c5439bcfc4d3f86f739775492a858 /pdf-over-gui/src
parentf058d44a3adc72ebf6f2e223c2be71ea8bb8c0f2 (diff)
downloadpdf-over-f844bf08c0377a157e3edaa7377baf00b0c4b537.tar.gz
pdf-over-f844bf08c0377a157e3edaa7377baf00b0c4b537.tar.bz2
pdf-over-f844bf08c0377a157e3edaa7377baf00b0c4b537.zip
Localize signature note stuff
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@212 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java107
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties3
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties3
4 files changed, 60 insertions, 55 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index e69b735c..7683f837 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
@@ -342,7 +342,7 @@ public class SignaturePanel extends JPanel {
float scale = (((float) this.sigScreenWidth) / this.sigPlaceholder.getWidth(null)) * 150;
log.debug(Float.toString(scale));
g_phs.setFont(getFont().deriveFont(scale));
- g_phs.setColor(sigPlaceholderBorderColor);
+ g_phs.setColor(this.sigPlaceholderBorderColor);
Rectangle2D overlay_size = g_phs.getFontMetrics().getStringBounds(overlay, g_phs);
int width = (int) overlay_size.getWidth();
int height = (int) overlay_size.getHeight();
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 04b10d9c..902d3435 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
@@ -490,6 +490,59 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
});
+ Group grpSignatureNote = new Group(this, SWT.NONE);
+ FormData fd_grpSignatureNote = new FormData();
+ fd_grpSignatureNote.right = new FormAttachment(100, -5);
+ fd_grpSignatureNote.top = new FormAttachment(grpProxy, 5);
+ fd_grpSignatureNote.left = new FormAttachment(0, 5);
+ grpSignatureNote.setLayoutData(fd_grpSignatureNote);
+ grpSignatureNote.setLayout(new GridLayout(2, false));
+ grpSignatureNote.setText(Messages.getString("simple_config.Note_Title")); //$NON-NLS-1$
+
+ FontData[] fD_grpSignatureNote = grpSignatureNote.getFont().getFontData();
+ fD_grpSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ grpSignatureNote.setFont(new Font(Display.getCurrent(), fD_grpSignatureNote[0]));
+
+ Label lblSignatureNote = new Label(grpSignatureNote, SWT.NONE);
+ GridData gd_lblSignatureNote = new GridData(SWT.LEFT, SWT.CENTER, false,
+ false, 1, 1);
+ gd_lblSignatureNote.widthHint = 66;
+ lblSignatureNote.setLayoutData(gd_lblSignatureNote);
+ lblSignatureNote.setBounds(0, 0, 57, 15);
+ lblSignatureNote.setText(Messages.getString("simple_config.Note")); //$NON-NLS-1$
+
+ FontData[] fD_lblSignatureNote = lblSignatureNote.getFont().getFontData();
+ fD_lblSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ lblSignatureNote.setFont(new Font(Display.getCurrent(), fD_lblSignatureNote[0]));
+
+ this.txtSignatureNote = new Text(grpSignatureNote, SWT.BORDER);
+ this.txtSignatureNote.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
+ 1, 1));
+ this.txtSignatureNote.setToolTipText(Messages.getString("simple_config.Note_Tooltip")); //$NON-NLS-1$
+
+ FontData[] fD_txtSignatureNote = this.txtProxyHost.getFont().getFontData();
+ fD_txtSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.txtSignatureNote.setFont(new Font(Display.getCurrent(),
+ fD_txtSignatureNote[0]));
+
+ this.txtSignatureNote.addFocusListener(new FocusAdapter() {
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ processSignatureNoteChanged();
+ }
+ });
+
+ this.txtSignatureNote.addTraverseListener(new TraverseListener() {
+
+ @Override
+ public void keyTraversed(TraverseEvent e) {
+ if (e.detail == SWT.TRAVERSE_RETURN) {
+ processSignatureNoteChanged();
+ }
+ }
+ });
+
this.addListener(SWT.Resize, new Listener() {
@Override
@@ -522,60 +575,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
100, -1 * (portSize.y + 10));
}
});
-
- // TODO: localize ...
- Group grpSignatureNote = new Group(this, SWT.NONE);
- FormData fd_grpSignatureNote = new FormData();
- fd_grpSignatureNote.right = new FormAttachment(100, -5);
- fd_grpSignatureNote.top = new FormAttachment(grpProxy, 5);
- fd_grpSignatureNote.left = new FormAttachment(0, 5);
- grpSignatureNote.setLayoutData(fd_grpSignatureNote);
- grpSignatureNote.setLayout(new GridLayout(2, false));
- grpSignatureNote.setText("Signature Note");
-
- FontData[] fD_grpSignatureNote = grpSignatureNote.getFont().getFontData();
- fD_grpSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- grpSignatureNote.setFont(new Font(Display.getCurrent(), fD_grpSignatureNote[0]));
-
-
- Label lblSignatureNote = new Label(grpSignatureNote, SWT.NONE);
- GridData gd_lblSignatureNote = new GridData(SWT.LEFT, SWT.CENTER, false,
- false, 1, 1);
- gd_lblSignatureNote.widthHint = 66;
- lblSignatureNote.setLayoutData(gd_lblSignatureNote);
- lblSignatureNote.setBounds(0, 0, 57, 15);
- lblSignatureNote.setText("Text:");
-
- FontData[] fD_lblSignatureNote = lblSignatureNote.getFont().getFontData();
- fD_lblSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- lblSignatureNote.setFont(new Font(Display.getCurrent(), fD_lblSignatureNote[0]));
-
- this.txtSignatureNote = new Text(grpSignatureNote, SWT.BORDER);
- this.txtSignatureNote.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
- 1, 1));
-
- FontData[] fD_txtSignatureNote = this.txtProxyHost.getFont().getFontData();
- fD_txtSignatureNote[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.txtSignatureNote.setFont(new Font(Display.getCurrent(),
- fD_txtSignatureNote[0]));
-
- this.txtSignatureNote.addFocusListener(new FocusAdapter() {
-
- @Override
- public void focusLost(FocusEvent e) {
- processSignatureNoteChanged();
- }
- });
-
- this.txtSignatureNote.addTraverseListener(new TraverseListener() {
-
- @Override
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processSignatureNoteChanged();
- }
- }
- });
}
/**
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index 733c4724..a60175fa 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -102,6 +102,9 @@ simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button
simple_config.Emblem_Title=Signature &logo
simple_config.ExampleNumber=+43676123456789
simple_config.MobileBKU_Title=&Mobile signature
+simple_config.Note=Text:
+simple_config.Note_Title=Signature &Note
+simple_config.Note_Tooltip=Add an optional note to display on your Signature
simple_config.PhoneNumber=Mobile number:
simple_config.ProxyHost=Host:
simple_config.ProxyHostTemplate=Hostname or IP of the proxy server
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 24cb36c7..e61117ab 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -102,6 +102,9 @@ simple_config.EmblemEmpty=Ziehen Sie ein Bild hierher\noder verwenden sie Durchs
simple_config.Emblem_Title=&Bildmarke
simple_config.ExampleNumber=+43676123456789
simple_config.MobileBKU_Title=&Handy-Signatur
+simple_config.Note=Text:
+simple_config.Note_Title=Signaturhi&nweis
+simple_config.Note_Tooltip=Ein optionaler Hinweis der in Ihrer Signatur angezeigt wird
simple_config.PhoneNumber=Handynummer:
simple_config.ProxyHost=Host:
simple_config.ProxyHostTemplate=Hostname oder IP des Proxy-Servers