add tree models (tagtraa, dumpviewtree) onlywhen the tree is visible, better preserving the expanded states of the tree nodes

This commit is contained in:
honfika@gmail.com
2014-11-12 19:01:21 +01:00
parent e5c2a76e0a
commit 96e0b368ff
4 changed files with 53 additions and 45 deletions

View File

@@ -75,27 +75,10 @@ public class DumpTree extends JTree implements ActionListener {
public class DumpTreeCellRenderer extends DefaultTreeCellRenderer {
@Override
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean sel,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus) {
super.getTreeCellRendererComponent(
tree, value, sel,
expanded, leaf, row,
hasFocus);
//DumpInfo dumpInfo = (DumpInfo) value;
public DumpTreeCellRenderer() {
setUI(new BasicLabelUI());
setOpaque(false);
setBackgroundNonSelectionColor(Color.white);
return this;
}
}
@@ -313,5 +296,4 @@ public class DumpTree extends JTree implements ActionListener {
}
}
}
}