mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 08:24:53 +00:00
Load from browser cache removed
Old "debugger" tool removed in favor of new real debugger Hotkeys unified
This commit is contained in:
@@ -28,6 +28,7 @@ import javax.swing.JMenu;
|
||||
import javax.swing.JMenuBar;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JRadioButtonMenuItem;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.MenuElement;
|
||||
import javax.swing.event.MenuEvent;
|
||||
import javax.swing.event.MenuListener;
|
||||
@@ -97,9 +98,12 @@ public class MainFrameClassicMenu extends MainFrameMenu {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, final ActionListener subLoader, boolean isLeaf) {
|
||||
public void addMenuItem(String path, String title, String icon, ActionListener action, int priority, final ActionListener subLoader, boolean isLeaf, HotKey key) {
|
||||
path = mapping(path);
|
||||
|
||||
menuHotkeys.put(path, key);
|
||||
menuActions.put(path, action);
|
||||
|
||||
if (!isLeaf) {
|
||||
//action is ignored
|
||||
addMenu(path, title, icon, subLoader);
|
||||
@@ -123,6 +127,9 @@ public class MainFrameClassicMenu extends MainFrameMenu {
|
||||
if (action != null) {
|
||||
menuItem.addActionListener(action);
|
||||
}
|
||||
if (key != null) {
|
||||
menuItem.setAccelerator(KeyStroke.getKeyStroke(key.key, key.getModifier()));
|
||||
}
|
||||
if (parentMenu instanceof JMenu) {
|
||||
((JMenu) parentMenu).add(menuItem);
|
||||
} else {
|
||||
@@ -132,8 +139,10 @@ public class MainFrameClassicMenu extends MainFrameMenu {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addToggleMenuItem(String path, String title, String group, String icon, ActionListener action, int priority) {
|
||||
public void addToggleMenuItem(String path, String title, String group, String icon, ActionListener action, int priority, HotKey key) {
|
||||
path = mapping(path);
|
||||
menuHotkeys.put(path, key);
|
||||
|
||||
String parentPath = "";
|
||||
if (path.contains("/")) {
|
||||
parentPath = path.substring(0, path.lastIndexOf('/'));
|
||||
|
||||
Reference in New Issue
Block a user