X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FFileManager.java;h=6b48fa107914d1851f0ba0fe354eaeeb68fcc703;hb=c647e3c2d780c95c1668068a86b7dc29536adf8d;hp=580aedd5bee9c138b91ba3f479614808cf530adf;hpb=13c5648feec9d69eff5a237c9ac360060fc8d0e8;p=jSite2.git 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; }