From 86e89a98ea5bd97c007db7061cd65491320587cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 7 Apr 2008 11:01:51 +0000 Subject: [PATCH] fix un-i18n-ed checkbox git-svn-id: http://trooper/svn/projects/jSite/trunk@642 c3eda9e8-030b-0410-8277-bc7414b0a119 --- src/net/pterodactylus/jsite/gui/EditNodeDialog.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/net/pterodactylus/jsite/gui/EditNodeDialog.java b/src/net/pterodactylus/jsite/gui/EditNodeDialog.java index a8597ef..12c91cb 100644 --- a/src/net/pterodactylus/jsite/gui/EditNodeDialog.java +++ b/src/net/pterodactylus/jsite/gui/EditNodeDialog.java @@ -90,6 +90,9 @@ public class EditNodeDialog extends JDialog implements I18nable { /** The same machine checkbox. */ private JCheckBox sameMachineCheckBox; + + /** The same machine action. */ + private I18nAction sameMachineAction; /** Whether the dialog was cancelled. */ private boolean cancelled; @@ -233,6 +236,12 @@ public class EditNodeDialog extends JDialog implements I18nable { cancel(); } }; + sameMachineAction = new I18nAction("editNodeDialog.checkbox.sameMachine") { + + public void actionPerformed(ActionEvent e) { + /* don't do anything. */ + } + }; } /** @@ -267,12 +276,7 @@ public class EditNodeDialog extends JDialog implements I18nable { contentPanel.add(portLabel = new I18nLabel("editNodeDialog.label.port", portTextField), new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0)); contentPanel.add(portTextField, new GridBagConstraints(1, 2, 1, 1, 1, 0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 0), 0, 0)); - sameMachineCheckBox = new JCheckBox(new I18nAction("editNodeDialog.checkbox.sameMachine") { - - public void actionPerformed(ActionEvent e) { - /* don't do anything. */ - } - }); + sameMachineCheckBox = new JCheckBox(sameMachineAction); contentPanel.add(sameMachineCheckBox, new GridBagConstraints(0, 3, 2, 1, 1, 1, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0)); } @@ -377,6 +381,7 @@ public class EditNodeDialog extends JDialog implements I18nable { nameLabel.updateI18n(); hostnameLabel.updateI18n(); portLabel.updateI18n(); + sameMachineAction.updateI18n(); setTitle(I18n.get("editNodeDialog.title") + " – jSite " + Version.getVersion()); SwingUtils.repackCentered(this); } -- 2.7.4