From 5e5d4cb3b2789b4d3ba801e297da27f09003f306 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 30 May 2008 18:21:07 +0200 Subject: [PATCH] add override checkbox --- src/net/pterodactylus/jsite/gui/FileManager.java | 28 +++++++++++++++++++++- src/net/pterodactylus/jsite/i18n/jSite.properties | 9 +++++++ .../pterodactylus/jsite/i18n/jSite_de.properties | 9 +++++++ 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index e827008..af1637e 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -46,6 +46,7 @@ import java.util.logging.Logger; import javax.swing.BorderFactory; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JCheckBoxMenuItem; import javax.swing.JDialog; import javax.swing.JLabel; @@ -137,6 +138,15 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /** The “file size” text field. */ private JTextField fileSizeTextField; + /** The “override” label. */ + private I18nLabel overrideLabel; + + /** The “override active” action. */ + private I18nAction overrideAction; + + /** The “override action” checkbox. */ + private JCheckBox overrideCheckBox; + /** The context menu for the tree. */ private JPopupMenu treeContextMenu; @@ -242,6 +252,14 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /* TODO */ } }; + overrideAction = new I18nAction("fileManager.checkbox.overrideActive") { + /** + * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) + */ + public void actionPerformed(ActionEvent actionEvent) { + /* TODO */ + } + }; } /** @@ -319,8 +337,16 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr propertiesPanel.add(fileSizeLabel, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 24, 0, 0), 0, 0)); propertiesPanel.add(fileSizeTextField, new GridBagConstraints(1, 3, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 12, 0, 0), 0, 0)); + /* override settings. */ + overrideLabel = new I18nLabel("fileManager.label.override"); + overrideLabel.setFont(overrideLabel.getFont().deriveFont(Font.BOLD)); + propertiesPanel.add(overrideLabel, new GridBagConstraints(0, 4, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(24, 0, 0, 0), 0, 0)); + + overrideCheckBox = new JCheckBox(overrideAction); + propertiesPanel.add(overrideCheckBox, new GridBagConstraints(0, 5, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(12, 24, 0, 0), 0, 0)); + /* glue panel. */ - propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 4, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); + propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 6, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); /* action button panel */ JPanel actionButtonPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 12, 12)); diff --git a/src/net/pterodactylus/jsite/i18n/jSite.properties b/src/net/pterodactylus/jsite/i18n/jSite.properties index 6e3e3cc..7ed7c3e 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite.properties @@ -355,6 +355,15 @@ fileManager.label.fileName.mnemonic: VK_UNDEFINED fileManager.label.fileSize.name: File size fileManager.label.fileSize.mnemonic: VK_UNDEFINED +fileManager.label.override.name: Override +fileManager.label.override.mnemonic: VK_UNDEFINED + +fileManager.checkbox.overrideActive.name: Override active +fileManager.checkbox.overrideActive.mnemonic: VK_A +fileManager.checkbox.overrideActive.accelerator: Ctrl-VK_A +fileManager.checkbox.overrideActive.shortDescription: Whether the settings for this file should be overridden +fileManager.checkbox.overrideActive.longDescription: Whether the settings for this file should be overridden + fileManager.checkbox.insertFile.name: Insert file fileManager.checkbox.insertFile.mnemonic: VK_I fileManager.checkbox.insertFile.accelerator: Ctrl-VK_I diff --git a/src/net/pterodactylus/jsite/i18n/jSite_de.properties b/src/net/pterodactylus/jsite/i18n/jSite_de.properties index c3c4a94..11cfc6a 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite_de.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite_de.properties @@ -355,6 +355,15 @@ fileManager.label.fileName.mnemonic: VK_UNDEFINED fileManager.label.fileSize.name: Dateigr\u00f6\u00dfe fileManager.label.fileSize.mnemonic: VK_UNDEFINED +fileManager.label.override.name: Vorgaben +fileManager.label.override.mnemonic: VK_UNDEFINED + +fileManager.checkbox.overrideActive.name: Andere Einstellungen +fileManager.checkbox.overrideActive.mnemonic: VK_A +fileManager.checkbox.overrideActive.accelerator: Ctrl-VK_A +fileManager.checkbox.overrideActive.shortDescription: Anderen Einstellungen für diese Datei aktivieren +fileManager.checkbox.overrideActive.longDescription: Anderen Einstellungen für diese Datei aktivieren + fileManager.checkbox.insertFile.name: Datei einf\u00fcgen fileManager.checkbox.insertFile.mnemonic: VK_E fileManager.checkbox.insertFile.accelerator: Ctrl-VK_E -- 2.7.4