#825 hot keys (and maybe new buttons on new panel) to switch to next or previous DefineText

This commit is contained in:
honfika@gmail.com
2015-03-07 22:55:09 +01:00
parent 7b23b1670f
commit 18af792012
17 changed files with 245 additions and 105 deletions

View File

@@ -224,6 +224,14 @@ public abstract class MainFrameMenu {
mainFrame.getPanel().refreshDecompiled();
}
protected boolean previousTag() {
return mainFrame.getPanel().previousTag();
}
protected boolean nextTag() {
return mainFrame.getPanel().nextTag();
}
protected void checkResources() {
ByteArrayOutputStream os = new ByteArrayOutputStream();
PrintStream stream = new PrintStream(os);
@@ -323,7 +331,7 @@ public abstract class MainFrameMenu {
@Override
public boolean dispatchKeyEvent(KeyEvent e) {
if (((JFrame) mainFrame).isActive()) {
if (((JFrame) mainFrame).isActive() && e.getID() == KeyEvent.KEY_RELEASED) {
int code = e.getKeyCode();
if (e.isControlDown() && e.isShiftDown()) {
switch (code) {
@@ -346,6 +354,13 @@ public abstract class MainFrameMenu {
case KeyEvent.VK_E:
return export(false);
}
} else if (e.isControlDown() && !e.isShiftDown()) {
switch (code) {
case KeyEvent.VK_UP:
return previousTag();
case KeyEvent.VK_DOWN:
return nextTag();
}
}
}