From 2510d4deffa1634593600076e7d5446d2982c9bb Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Wed, 7 Nov 2012 11:16:01 +0100 Subject: + implemented localization configuration and on the fly resource reloading --- .../gui/composites/BKUSelectionComposite.java | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java') 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 64c4d0a0..77bddf54 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 @@ -88,6 +88,10 @@ public class BKUSelectionComposite extends StateComposite { .getLogger(BKUSelectionComposite.class); private BKUs selected = BKUs.NONE; + + private Button btnMobile; + + private Button btnCard; /** * Gets selected BKU type @@ -156,25 +160,25 @@ public class BKUSelectionComposite extends StateComposite { btn_card.setImage(karte); - Button btnMobile = new Button(this, SWT.NONE); + this.btnMobile = new Button(this, SWT.NONE); FormData fd_btnMobile = new FormData(); fd_btnMobile.top = new FormAttachment(btn_mobile, 10); //fd_btnMobile.left = new FormAttachment(btn_mobile, 0); fd_btnMobile.right = new FormAttachment(50, -5); fd_btnMobile.width = btn_mobile.computeSize(SWT.DEFAULT, SWT.DEFAULT).x; - btnMobile.setLayoutData(fd_btnMobile); - btnMobile.setText(Messages.getString("bku_selection.mobile")); //$NON-NLS-1$ - btnMobile.addSelectionListener(new MobileSelectionListener()); + this.btnMobile.setLayoutData(fd_btnMobile); + this.btnMobile.setText(Messages.getString("bku_selection.mobile")); //$NON-NLS-1$ + this.btnMobile.addSelectionListener(new MobileSelectionListener()); - Button btnCard = new Button(this, SWT.NONE); + this.btnCard = new Button(this, SWT.NONE); FormData fd_btnCard = new FormData(); fd_btnCard.top = new FormAttachment(btn_card, 10); //fd_btnMobile.left = new FormAttachment(btn_mobile, 0); fd_btnCard.left = new FormAttachment(50, 5); fd_btnCard.width = btn_card.computeSize(SWT.DEFAULT, SWT.DEFAULT).x; - btnCard.setLayoutData(fd_btnCard); - btnCard.setText(Messages.getString("bku_selection.card")); //$NON-NLS-1$ - btnCard.addSelectionListener(new LocalSelectionListener()); + this.btnCard.setLayoutData(fd_btnCard); + this.btnCard.setText(Messages.getString("bku_selection.card")); //$NON-NLS-1$ + this.btnCard.addSelectionListener(new LocalSelectionListener()); //this.pack(); } @@ -190,4 +194,13 @@ public class BKUSelectionComposite extends StateComposite { public void doLayout() { this.layout(true, true); } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() + */ + @Override + public void reloadResources() { + this.btnMobile.setText(Messages.getString("bku_selection.mobile")); //$NON-NLS-1$ + this.btnCard.setText(Messages.getString("bku_selection.card")); //$NON-NLS-1$ + } } -- cgit v1.2.3