diff options
Diffstat (limited to 'pdf-over-gui/src/main')
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 | 
