summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2019-12-02 13:24:44 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2019-12-02 13:24:44 +0100
commitfafcb2679c1a82a1d8961d04480067da5dfe33c8 (patch)
tree05f475e209a185054dc4f52924ac72bcfebd1e6f
parent20f7969c2d338ee9f7eb99ad327a6ea01f6e4667 (diff)
downloadpdf-over-fafcb2679c1a82a1d8961d04480067da5dfe33c8.tar.gz
pdf-over-fafcb2679c1a82a1d8961d04480067da5dfe33c8.tar.bz2
pdf-over-fafcb2679c1a82a1d8961d04480067da5dfe33c8.zip
added message properties and fixed gui
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java55
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties5
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties1
3 files changed, 33 insertions, 28 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
index d7f75a33..16b8cf59 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/PlaceholderSelectionGui.java
@@ -29,10 +29,11 @@ import org.eclipse.swt.widgets.Dialog;
import java.util.List;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Label;
/**
@@ -44,12 +45,12 @@ public class PlaceholderSelectionGui extends Dialog {
**/
private static final Logger log = LoggerFactory.getLogger(PlaceholderSelectionGui.class);
protected Object result;
- protected Shell shell;
+ protected Shell shlInfo;
protected Combo placeholderNameDropDown;
protected String lblString;
protected List<String> placeholderList;
- private Button btnNewButton;
- private Button btnNewButton_1;
+ private Button btnCancel;
+ private Button btnOk;
protected int returnValue;
@@ -75,10 +76,10 @@ public class PlaceholderSelectionGui extends Dialog {
public int open() {
createContents();
- this.shell.open();
- this.shell.layout();
+ this.shlInfo.open();
+ this.shlInfo.layout();
Display display = getParent().getDisplay();
- while (!this.shell.isDisposed()) {
+ while (!this.shlInfo.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
@@ -97,45 +98,45 @@ public class PlaceholderSelectionGui extends Dialog {
* Create contents of the dialog.
*/
private void createContents() {
- this.shell = new Shell(getParent(), getStyle());
- this.shell.setSize(290, 195);
- this.shell.setText(getText());
- this.shell.setLayout(null);
+ this.shlInfo = new Shell(getParent(), getStyle());
+ this.shlInfo.setSize(290, 195);
+ this.shlInfo.setText("Info"); //$NON-NLS-1$
+ this.shlInfo.setLayout(null);
- this.placeholderNameDropDown = new Combo(this.shell, SWT.NONE);
- this.placeholderNameDropDown.setBounds(27, 58, 223, 23);
+ this.placeholderNameDropDown = new Combo(this.shlInfo, SWT.NONE);
+ this.placeholderNameDropDown.setBounds(27, 77, 223, 23);
addDropDownEntries(this.placeholderList);
this.placeholderNameDropDown.select(0);
- Label lblPlaceholder = new Label(this.shell, SWT.NONE);
- lblPlaceholder.setBounds(27, 25, 189, 15);
- lblPlaceholder.setText(Messages.getString("")); //$NON-NLS-1$
-
- this.btnNewButton = new Button(this.shell, SWT.NONE);
- this.btnNewButton.addSelectionListener(new SelectionAdapter() {
+ this.btnCancel = new Button(this.shlInfo, SWT.NONE);
+ this.btnCancel.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
PlaceholderSelectionGui.this.returnValue = -1;
- PlaceholderSelectionGui.this.shell.dispose();
+ PlaceholderSelectionGui.this.shlInfo.dispose();
}
});
- this.btnNewButton.setBounds(175, 95, 75, 25);
- this.btnNewButton.setText("Cancel"); //$NON-NLS-1$
+ this.btnCancel.setBounds(175, 118, 75, 25);
+ this.btnCancel.setText("Cancel"); //$NON-NLS-1$
- this.btnNewButton_1 = new Button(this.shell, SWT.NONE);
- this.btnNewButton_1.setBounds(94, 95, 75, 25);
- this.btnNewButton_1.addSelectionListener(new SelectionAdapter() {
+ this.btnOk = new Button(this.shlInfo, SWT.NONE);
+ this.btnOk.setBounds(94, 118, 75, 25);
+ this.btnOk.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
PlaceholderSelectionGui.this.returnValue = PlaceholderSelectionGui.this.placeholderNameDropDown.getSelectionIndex();
- PlaceholderSelectionGui.this.shell.dispose();
+ PlaceholderSelectionGui.this.shlInfo.dispose();
}
});
- this.btnNewButton_1.setText("Ok"); //$NON-NLS-1$
+ this.btnOk.setText("Ok"); //$NON-NLS-1$
+
+ Label lbLabel = new Label(this.shlInfo, SWT.NONE);
+ lbLabel.setBounds(27, 10, 223, 41);
+ lbLabel.setText(Messages.getString("positioning.placeholder")); //$NON-NLS-1$
}
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 a368693d..a9512f28 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
@@ -1,10 +1,12 @@
#Eclipse messages class
-#Mon Nov 04 16:17:29 CET 2019
+#Mon Dec 02 13:17:21 CET 2019
BKU.KS=Keystore
BKU.LOCAL=Local CCE
BKU.MOBILE=Mobile CCE
BKU.NONE=no default
BKUSelectionComposite.btnMobile.text=MOBILE
+PlaceholderSelectionGui.lblNewLabel.text=New Label
+PlaceholderSelectionGui.shlInfo.text=Info
TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
WaitingForAppComposite.btnCancel.text=Cancel
WaitingForAppComposite.btnCancel_1.text=Cancel
@@ -201,6 +203,7 @@ output.save_failed=Saving file %s failed\: %s
output.success_message=Signature was successful
positioning.newPage=Create &new Page
positioning.page=Page %d of %d
+positioning.placeholder=Please select the signature placeholder\nfrom the drop down list
positioning.removeNewPage=Undo &new Page
positioning.sign=&Sign
positioning.signature=Signature
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 50c75e6e..5559d10e 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
@@ -224,3 +224,4 @@ version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u0
version_check.UpdateTitle=Neue Version verf\u00FCgbar\!
waiting.message=Signaturerstellung l\u00E4uft...
waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App!
+positioning.placeholder=Bitte wählen Sie den gewünschte\nPlatzhalter aus der Liste aus