mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-01 04:24:49 +00:00
#825 hot keys (and maybe new buttons on new panel) to switch to next or previous DefineText
This commit is contained in:
@@ -1361,10 +1361,10 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
}
|
||||
if (found) {
|
||||
String[] textArray = texts.toArray(new String[texts.size()]);
|
||||
textTag.setFormattedText(getMissingCharacterHandler(), textTag.getFormattedText(), textArray);
|
||||
textTag.setFormattedText(getMissingCharacterHandler(), textTag.getFormattedText().text, textArray);
|
||||
}
|
||||
} else {
|
||||
String text = textTag.getFormattedText();
|
||||
String text = textTag.getFormattedText().text;
|
||||
if (pat.matcher(text).find()) {
|
||||
textTag.setFormattedText(getMissingCharacterHandler(), text.replaceAll(txt, replacement), null);
|
||||
findCount++;
|
||||
@@ -1397,7 +1397,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
for (Tag tag : swf.tags) {
|
||||
if (tag instanceof TextTag) {
|
||||
TextTag textTag = (TextTag) tag;
|
||||
if (pat.matcher(textTag.getFormattedText()).find()) {
|
||||
if (pat.matcher(textTag.getFormattedText().text).find()) {
|
||||
found.add(textTag);
|
||||
}
|
||||
}
|
||||
@@ -2075,6 +2075,34 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean previousTag() {
|
||||
if (getCurrentView() == VIEW_RESOURCES) {
|
||||
if (tagTree.getSelectionRows().length > 0) {
|
||||
int row = tagTree.getSelectionRows()[0];
|
||||
if (row > 0) {
|
||||
tagTree.setSelectionRow(row - 1);
|
||||
previewPanel.focusTextPanel();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean nextTag() {
|
||||
if (getCurrentView() == VIEW_RESOURCES) {
|
||||
if (tagTree.getSelectionRows().length > 0) {
|
||||
int row = tagTree.getSelectionRows()[0];
|
||||
if (row < tagTree.getRowCount() - 1) {
|
||||
tagTree.setSelectionRow(row + 1);
|
||||
previewPanel.focusTextPanel();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
switch (e.getActionCommand()) {
|
||||
|
||||
Reference in New Issue
Block a user