X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Fjsite%2Fgui%2FFileManager.java;h=ad4d0ab9871cb003802140a5308200d75a331764;hb=a5ebacd3beea5b83347f66cc8b8dac79d3f66e14;hp=77df5380225541ead137e20b90b4483089ce7ad3;hpb=5171f0d892b04dd504534cf2819c9578bcffcd1d;p=jSite2.git diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 77df538..ad4d0ab 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -68,6 +68,7 @@ import net.pterodactylus.jsite.i18n.I18n; import net.pterodactylus.jsite.i18n.I18nable; import net.pterodactylus.jsite.i18n.gui.I18nAction; import net.pterodactylus.jsite.i18n.gui.I18nLabel; +import net.pterodactylus.jsite.i18n.gui.I18nMenu; import net.pterodactylus.jsite.project.FileOverride; import net.pterodactylus.jsite.project.Project; import net.pterodactylus.jsite.project.ProjectFile; @@ -150,6 +151,15 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /** The context menu for the tree. */ private JPopupMenu treeContextMenu; + /** The “apply override” menu. */ + private I18nMenu overrideMenu; + + /** The “apply insert override” action. */ + private I18nAction applyInsertOverrideAction; + + /** The “apply mime type override” action. */ + private I18nAction applyMimeTypeOverrideAction; + /** The “insert” checkbox. */ private JCheckBoxMenuItem insertCheckBoxMenuItem; @@ -274,6 +284,22 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr /* TODO */ } }; + applyInsertOverrideAction = new I18nAction("fileManager.menu.item.applyInsertOverride") { + /** + * {@inheritDoc} + */ + public void actionPerformed(ActionEvent actionEvent) { + /* TODO */ + } + }; + applyMimeTypeOverrideAction = new I18nAction("fileManager.menu.item.applyMimeTypeOverride") { + /** + * {@inheritDoc} + */ + public void actionPerformed(ActionEvent actionEvent) { + /* TODO */ + } + }; } /** @@ -284,6 +310,12 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr treeContextMenu.add(setDefaultFileAction); insertCheckBoxMenuItem = new JCheckBoxMenuItem(insertAction); treeContextMenu.add(insertCheckBoxMenuItem); + + overrideMenu = new I18nMenu("fileManager.menu.override"); + treeContextMenu.add(overrideMenu); + + overrideMenu.add(applyInsertOverrideAction); + overrideMenu.add(applyMimeTypeOverrideAction); JPanel contentPanel = new JPanel(new BorderLayout(12, 12)); contentPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); @@ -497,6 +529,8 @@ public class FileManager extends JDialog implements I18nable, ActionListener, Tr fileNameTextField.setText(projectFile.getName()); fileSizeTextField.setText(String.valueOf(projectFile.getSize())); } + } else if ((selectedPaths != null) && (selectedPaths.length > 1)) { + /* TODO */ } }