рефакторинг. вынес часть иконок в общую часть

This commit is contained in:
2024-10-15 16:58:20 +03:00
parent 01041ccf75
commit f353c1b90c
142 changed files with 294 additions and 158 deletions

View File

@@ -22,7 +22,7 @@ public class ProjectFilesMenu extends GraphMenu {
public ProjectFilesMenu(StyledTree tree) {
super(tree, "подпапки");
addSeparator();
JMenuItem m = new VisualiserMenuItem("Открыть в проводнике...", "/icons/Explorer.png");
JMenuItem m = new VisualiserMenuItem("Открыть в проводнике...", "/Common/icons/Explorer.png");
m.addActionListener(
new AbstractAction() {
@Override
@@ -36,7 +36,7 @@ public class ProjectFilesMenu extends GraphMenu {
});
add(m);
addSeparator();
add(new PassesSubMenu("Добавить", "/icons/RedAdd.png",
add(new PassesSubMenu("Добавить", "/Common/icons/RedAdd.png",
PassCode.AddFile,
PassCode.CreateEmptyDirectory,
PassCode.ImportFiles));
@@ -44,7 +44,7 @@ public class ProjectFilesMenu extends GraphMenu {
add(new PassesSubMenu("Переименовать", "/icons/Menu/Rename.png",
PassCode.RenameFile,
PassCode.RenameDirectory));
add(new VisualiserMenuItem("Удалить текущий проект", "/icons/Delete.png") {
add(new VisualiserMenuItem("Удалить текущий проект", "/Common/icons/Delete.png") {
{
addActionListener(e -> {
if (Global.mainModule.HasProject()) {
@@ -56,10 +56,10 @@ public class ProjectFilesMenu extends GraphMenu {
});
addSeparator();
m_multiselection = new VisualiserMenuItem("Массовый режим работы с файлами");
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
m_multiselection.addActionListener(e -> {
Global.files_multiselection = !Global.files_multiselection;
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/icons/Pick.png" : "/icons/NotPick.png"));
m_multiselection.setIcon(Utils_.getIcon(Global.files_multiselection ? "/Common/icons/Pick.png" : "/Common/icons/NotPick.png"));
Global.mainModule.getProject().SelectAllFiles(false);
Global.mainModule.getUI().getMainWindow().getProjectWindow().RefreshProjectFiles();
//-
@@ -67,13 +67,13 @@ public class ProjectFilesMenu extends GraphMenu {
add(m_multiselection);
addSeparator();
//-
m_select_all = new StableMenuItem("Выбрать всё", "/icons/SelectAll.png");
m_select_all = new StableMenuItem("Выбрать всё", "/Common/icons/SelectAll.png");
m_select_all.addActionListener(e -> {
Global.mainModule.getProject().SelectAllFiles(true);
tree.updateUI();
});
add(m_select_all);
m_unselect_all = new StableMenuItem("Отменить всё", "/icons/UnselectAll.png");
m_unselect_all = new StableMenuItem("Отменить всё", "/Common/icons/UnselectAll.png");
m_unselect_all.addActionListener(e -> {
Global.mainModule.getProject().SelectAllFiles(false);
tree.updateUI();