mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-05 10:44:19 +00:00
ABCExplorer - copy whole row
This commit is contained in:
@@ -333,6 +333,11 @@ public class ABCExplorerDialog extends AppDialog {
|
||||
return null;
|
||||
}
|
||||
Object selection = tree.getLastSelectedPathComponent();
|
||||
if (selection != null) {
|
||||
JMenuItem copyRowMenuItem = new JMenuItem(translate("copy.row"), View.getIcon("copy16"));
|
||||
copyRowMenuItem.addActionListener(this::copyRowActionPerformed);
|
||||
menu.add(copyRowMenuItem);
|
||||
}
|
||||
if (selection instanceof ValueWithIndex) {
|
||||
ValueWithIndex vwi = (ValueWithIndex) selection;
|
||||
|
||||
@@ -384,6 +389,13 @@ public class ABCExplorerDialog extends AppDialog {
|
||||
return menu;
|
||||
}
|
||||
|
||||
private void copyRowActionPerformed(ActionEvent e) {
|
||||
Object selection = getCurrentTree().getLastSelectedPathComponent();
|
||||
if (selection != null) {
|
||||
copyToClipboard(selection.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private void copyTitleActionPerformed(ActionEvent e) {
|
||||
Object selection = getCurrentTree().getLastSelectedPathComponent();
|
||||
if (selection instanceof SimpleValue) {
|
||||
@@ -589,7 +601,7 @@ public class ABCExplorerDialog extends AppDialog {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public String toString() {
|
||||
return title + (!value.isEmpty() ? ": " + value : "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user