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;
/** 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;
/* 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 */
+ }
+ };
}
/**
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));
fileNameTextField.setText(projectFile.getName());
fileSizeTextField.setText(String.valueOf(projectFile.getSize()));
}
+ } else if ((selectedPaths != null) && (selectedPaths.length > 1)) {
+ /* TODO */
}
}
fileManager.menu.item.insert.accelerator: VK_UNDEFINED
fileManager.menu.item.insert.shortDescription: Toggles the insert state of this file
fileManager.menu.item.insert.longDescription Toggles the insert state of this file
+
+fileManager.menu.override.name: Override
+fileManager.menu.override.mnemonic: VK_O
+fileManager.menu.override.accelerator: VK_UNDEFINED
+fileManager.menu.override.shortDescription: Overrides certain settings
+fileManager.menu.override.longDescription: Overrides ceratin settings
+
+fileManager.menu.item.applyInsertOverride.name: Insert
+fileManager.menu.item.applyInsertOverride.mnemonic: VK_I
+fileManager.menu.item.applyInsertOverride.accelerator: Ctrl-VK_I
+fileManager.menu.item.applyInsertOverride.shortDescription: Overrides default \u201cInsert\u201d setting
+fileManager.menu.item.applyInsertOverride.longDescription: Overrides default \u201cInsert\u201d setting
+
+fileManager.menu.item.applyMimeTypeOverride.name: Content Type
+fileManager.menu.item.applyMimeTypeOverride.mnemonic: VK_C
+fileManager.menu.item.applyMimeTypeOverride.accelerator: Ctrl-VK_C
+fileManager.menu.item.applyMimeTypeOverride.shortDescription: Overrides default \u201cContent Type\u201d setting
+fileManager.menu.item.applyMimeTypeOverride.longDescription: Overrides default \u201cContent Type\u201d setting
fileManager.menu.item.setDefaultFile.shortDescription: Macht diese Datei zur Indexdatei
fileManager.menu.item.setDefaultFile.longDescription: Macht diese Datei zur Indexdatei
-fileManager.menu.item.insert.name: Datei einfügen
+fileManager.menu.item.insert.name: Datei einf\u00fcgen
fileManager.menu.item.insert.mnemonic: VK_E
fileManager.menu.item.insert.accelerator: VK_UNDEFINED
-fileManager.menu.item.insert.shortDescription: Wechselt den Einfügestatus dieser Datei
-fileManager.menu.item.insert.longDescription Wechselt den Einfügestatus dieser Datei
+fileManager.menu.item.insert.shortDescription: Wechselt den Einf\u00fcgestatus dieser Datei
+fileManager.menu.item.insert.longDescription Wechselt den Einf\u00fcgestatus dieser Datei
+
+fileManager.menu.override.name: Vorgaben
+fileManager.menu.override.mnemonic: VK_V
+fileManager.menu.override.accelerator: VK_UNDEFINED
+fileManager.menu.override.shortDescription: \u00dcberschreibt bestimmte Einstellungen
+fileManager.menu.override.longDescription: \u00dcberschreibt bestimmte Einstellungen
+
+fileManager.menu.item.applyInsertOverride.name: Einf\u00fcgen
+fileManager.menu.item.applyInsertOverride.mnemonic: VK_E
+fileManager.menu.item.applyInsertOverride.accelerator: Ctrl-VK_E
+fileManager.menu.item.applyInsertOverride.shortDescription: \u00dcberschreibt die \u201eEinf\u00fcgen\u201c-Einstellung
+fileManager.menu.item.applyInsertOverride.longDescription: \u00dcberschreibt die \u201eEinf\u00fcgen\u201c-Einstellung
+
+fileManager.menu.item.applyMimeTypeOverride.name: MIME-Typ
+fileManager.menu.item.applyMimeTypeOverride.mnemonic: VK_M
+fileManager.menu.item.applyMimeTypeOverride.accelerator: Ctrl-VK_M
+fileManager.menu.item.applyMimeTypeOverride.shortDescription: \u00dcberschreibt die \u201eMIME-Typ\u201c-Einstellung
+fileManager.menu.item.applyMimeTypeOverride.longDescription: \u00dcberschreibt die \u201eMIME-Typ\u201c-Einstellung