mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 08:52:27 +00:00
do not recreate tree model every time
This commit is contained in:
@@ -90,6 +90,11 @@ public class DumpTree extends JTree implements ActionListener {
|
||||
setCellRenderer(new DumpTreeCellRenderer());
|
||||
setRootVisible(false);
|
||||
setBackground(Color.white);
|
||||
setUI(new BasicTreeUI() {
|
||||
{
|
||||
setHashColor(Color.gray);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void createContextMenu() {
|
||||
@@ -281,16 +286,15 @@ public class DumpTree extends JTree implements ActionListener {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DumpTreeModel getModel() {
|
||||
return (DumpTreeModel) super.getModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModel(TreeModel tm) {
|
||||
super.setModel(tm);
|
||||
|
||||
setUI(new BasicTreeUI() {
|
||||
{
|
||||
setHashColor(Color.gray);
|
||||
}
|
||||
});
|
||||
|
||||
if (tm != null) {
|
||||
int rowCount = tm.getChildCount(tm.getRoot());
|
||||
for (int i = rowCount - 1; i >= 0; i--) {
|
||||
|
||||
Reference in New Issue
Block a user