From c647e3c2d780c95c1668068a86b7dc29536adf8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 27 May 2008 02:17:39 +0200 Subject: [PATCH] add insert file checkbox --- src/net/pterodactylus/jsite/gui/FileManager.java | 26 ++++++++++++++++++---- src/net/pterodactylus/jsite/i18n/jSite.properties | 11 ++++++--- .../pterodactylus/jsite/i18n/jSite_de.properties | 12 +++++++--- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 580aedd..6b48fa1 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -36,6 +36,7 @@ import java.util.logging.Logger; import javax.swing.BorderFactory; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JFrame; @@ -80,6 +81,12 @@ public class FileManager extends JDialog implements I18nable { /** The tree that shows the files. */ private JTree fileTree; + /** The “insert” action. */ + private I18nAction insertAction; + + /** The “insert” checkbox. */ + private JCheckBox insertCheckBox; + /** The “mime type” label. */ private I18nLabel mimeTypeLabel; @@ -122,6 +129,14 @@ public class FileManager extends JDialog implements I18nable { setVisible(false); } }; + insertAction = new I18nAction("fileManager.checkbox.insertFile") { + /** + * {@inheritDoc} + */ + public void actionPerformed(ActionEvent actionEvent) { + /* TODO - implements. */ + } + }; } /** @@ -153,12 +168,15 @@ public class FileManager extends JDialog implements I18nable { JPanel propertiesPanel = new JPanel(new GridBagLayout()); fileManagerPanel.add(propertiesPanel, BorderLayout.CENTER); + insertCheckBox = new JCheckBox(insertAction); + propertiesPanel.add(insertCheckBox, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); + mimeTypeComboBox = new JComboBox(MimeTypes.getAllMimeTypes().toArray(new String[0])); - mimeTypeLabel = new I18nLabel("projectPanel.label.mimeType", mimeTypeComboBox); - propertiesPanel.add(mimeTypeLabel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); - propertiesPanel.add(mimeTypeComboBox, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 6, 0, 0), 0, 0)); + mimeTypeLabel = new I18nLabel("fileManager.label.mimeType", mimeTypeComboBox); + propertiesPanel.add(mimeTypeLabel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 0, 0, 0), 0, 0)); + propertiesPanel.add(mimeTypeComboBox, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(6, 6, 0, 0), 0, 0)); - propertiesPanel.add(new JPanel(), new GridBagConstraints(0, 1, 1, 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, 2, 1, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); return fileManagerPanel; } diff --git a/src/net/pterodactylus/jsite/i18n/jSite.properties b/src/net/pterodactylus/jsite/i18n/jSite.properties index c5a8c54..1a513eb 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite.properties @@ -187,9 +187,6 @@ projectPanel.label.description.mnemonic: VK_D projectPanel.label.basePath.name: Base Path projectPanel.label.basePath.mnemonic: VK_B -projectPanel.label.mimeType.name: MIME Type -projectPanel.label.mimeType.mnemonic: VK_M - projectPanel.basePathInformation.scanning: Scanning the base path\u2026 projectPanel.basePathInformation.fileCount: Found {0} file{0,choice,0#s|1#|2#s}. @@ -328,3 +325,11 @@ fileManager.button.close.accelerator: VK_ESC fileManager.button.close.shortDescription: Close the file manager fileManager.button.close.longDescription: Close the file manager +fileManager.label.mimeType.name: MIME Type +fileManager.label.mimeType.mnemonic: VK_M + +fileManager.checkbox.insertFile.name: Insert file +fileManager.checkbox.insertFile.mnemonic: VK_I +fileManager.checkbox.insertFile.accelerator: Ctrl-VK_I +fileManager.checkbox.insertFile.shortDescription: Whether to insert this file +fileManager.checkbox.insertFile.longDescription: Whether to insert this file diff --git a/src/net/pterodactylus/jsite/i18n/jSite_de.properties b/src/net/pterodactylus/jsite/i18n/jSite_de.properties index 87e38af..3572501 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite_de.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite_de.properties @@ -187,9 +187,6 @@ projectPanel.label.description.mnemonic: VK_B projectPanel.label.basePath.name: Basispfad projectPanel.label.basePath.mnemonic: VK_B -projectPanel.label.mimeType.name: MIME Type -projectPanel.label.mimeType.mnemonic: VK_M - projectPanel.basePathInformation.scanning: Durchsuche den Basispfad\u2026 projectPanel.basePathInformation.fileCount: {0} Datei{0,choice,0#en|1#|2#en} gefunden. @@ -327,3 +324,12 @@ fileManager.button.close.mnemonic: VK_S fileManager.button.close.accelerator: VK_ESC fileManager.button.close.shortDescription: Beendet die Dateiverwaltung fileManager.button.close.longDescription: Beendet die Dateiverwaltung + +fileManager.label.mimeType.name: MIME Type +fileManager.label.mimeType.mnemonic: VK_M + +fileManager.checkbox.insertFile.name: Datei einf\u00fcgen +fileManager.checkbox.insertFile.mnemonic: VK_E +fileManager.checkbox.insertFile.accelerator: Ctrl-VK_E +fileManager.checkbox.insertFile.shortDescription: Legt fest, ob diese Datei eingef\u00fcgt werden soll +fileManager.checkbox.insertFile.longDescription: Legt fest, ob diese Datei eingef\u00fcgt werden soll -- 2.7.4