import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
-import java.util.PriorityQueue;
-import java.util.Random;
import java.util.TreeSet;
import javax.swing.event.TreeExpansionEvent;
private FragSeqNode _rootIDs = new FragSeqNode("IDs");
private FragSeqNode _rootFolders = new FragSeqNode("Folders");
- private TreeSet<String> _folders = new TreeSet<String>();
- private Hashtable<String,FragSeqNode> _folderPathToFolderNode = new Hashtable<String,FragSeqNode>();
+ private TreeSet<String> _folders = new TreeSet<>();
+ private Hashtable<String,FragSeqNode> _folderPathToFolderNode = new Hashtable<>();
- private Hashtable<String,FragSeqNode> _idsToNode = new Hashtable<String,FragSeqNode>();
- private Hashtable<String,ArrayList<FragSeqNode>> _pathToIDFileNodes = new Hashtable<String,ArrayList<FragSeqNode>>();
+ private Hashtable<String,FragSeqNode> _idsToNode = new Hashtable<>();
+ private Hashtable<String,ArrayList<FragSeqNode>> _pathToIDFileNodes = new Hashtable<>();
public enum SORT_MODE{
PATH,
if (parent.getChildCount()==0)
{
parent.removeFromParent();
- _folderPathToFolderNode.remove(parent);
+ // BH was just parent --
+ System.out.println("Varna FragSeqTreeModel removing " + parent + " "
+ + parent.toString());
+ _folderPathToFolderNode.remove(parent.toString());
if (parent.getUserObject() instanceof String)
{
String path = parent.getUserObject().toString();
public void removeFolder(String path)
{
- ArrayList<FragSeqNode> toBeRemoved = new ArrayList<FragSeqNode>();
+ ArrayList<FragSeqNode> toBeRemoved = new ArrayList<>();
Enumeration en = _folderPathToFolderNode.get(path).children();
while(en.hasMoreElements())
{
insertFileNode(_folderPathToFolderNode.get(folder), m);
}
+ @Override
public FragSeqNode getRoot()
{
return (FragSeqNode) super.getRoot();
public ArrayList<String> getFolders()
{
- ArrayList<String> result = new ArrayList<String>(_folders);
+ ArrayList<String> result = new ArrayList<>(_folders);
return result;
}
FilenameFilter _f = new FilenameFilter(){
- public boolean accept(File dir, String name) {
+ @Override
+ public boolean accept(File dir, String name) {
return name.toLowerCase().endsWith(".dbn")
|| name.toLowerCase().endsWith(".ct")
|| name.toLowerCase().endsWith(".bpseq")
}
-private Hashtable<FragSeqNode,Boolean> _isExpanded = new Hashtable<FragSeqNode,Boolean>();
+private Hashtable<FragSeqNode,Boolean> _isExpanded = new Hashtable<>();
public boolean isExpanded(FragSeqNode n)
{
return _isExpanded.get(n);
}
else
- return false;
+ {
+ return false;
+ }
}
+@Override
public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
if (event.getSource() instanceof FragSeqTree)
{
}
}
+@Override
public void treeWillCollapse(TreeExpansionEvent event)
throws ExpandVetoException {
// TODO Auto-generated method stub