mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 03:30:46 +00:00
better transparent gif support
This commit is contained in:
@@ -32,6 +32,7 @@ import com.jpexs.decompiler.flash.gui.proxy.ProxyFrame;
|
||||
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
|
||||
import com.jpexs.decompiler.flash.tags.base.FontTag;
|
||||
import com.jpexs.decompiler.flash.treeitems.SWFList;
|
||||
import com.jpexs.decompiler.flash.treeitems.TreeItem;
|
||||
import com.jpexs.helpers.Cache;
|
||||
import com.jpexs.helpers.CancellableWorker;
|
||||
import com.jpexs.helpers.Helper;
|
||||
@@ -92,6 +93,7 @@ import javax.swing.SwingWorker;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
import javax.swing.tree.TreePath;
|
||||
|
||||
/**
|
||||
* Main executable class
|
||||
@@ -1101,7 +1103,10 @@ public class Main {
|
||||
String pathStr = filesToOpen[filesToOpen.length - 1];
|
||||
if (pathStr.length() > 0) {
|
||||
String[] path = pathStr.split("\\|");
|
||||
View.selectTreeNode(mainFrame.getPanel().tagTree, Arrays.asList(path));
|
||||
|
||||
MainPanel mainPanel = mainFrame.getPanel();
|
||||
TreePath tp = View.getTreePathByPathStrings(mainPanel.tagTree, Arrays.asList(path));
|
||||
mainPanel.setTagTreeSelectedNode((TreeItem) tp.getLastPathComponent());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -531,6 +531,12 @@ public class View {
|
||||
}
|
||||
|
||||
private static TreePath expandTreeNode(JTree tree, List<String> pathAsStringList) {
|
||||
TreePath tp = getTreePathByPathStrings(tree, pathAsStringList);
|
||||
tree.expandPath(tp);
|
||||
return tp;
|
||||
}
|
||||
|
||||
public static TreePath getTreePathByPathStrings(JTree tree, List<String> pathAsStringList) {
|
||||
TreeModel model = tree.getModel();
|
||||
Object node = model.getRoot();
|
||||
|
||||
@@ -558,17 +564,9 @@ public class View {
|
||||
}
|
||||
|
||||
TreePath tp = new TreePath(path.toArray(new Object[path.size()]));
|
||||
tree.expandPath(tp);
|
||||
return tp;
|
||||
}
|
||||
|
||||
public static void selectTreeNode(JTree tree, List<String> pathAsStringList) {
|
||||
TreePath tp = expandTreeNode(tree, pathAsStringList);
|
||||
if (tp != null) {
|
||||
tree.setSelectionPath(tp);
|
||||
}
|
||||
}
|
||||
|
||||
public static void expandTreeNodes(JTree tree, TreePath parent, boolean expand) {
|
||||
expandTreeNodesRecursive(tree, parent, expand);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user