JTree tree = (JTree)e.getSource();
if(tree.getSelectionCount() == 1){
Object selected =
((DefaultMutableTreeNode)e.getPath().getLastPathComponent()).getUserObject();
if(selected instanceof GoogleSearchResultElement){
GoogleSearchResultElement element = (GoogleSearchResultElement)selected;
getApplicationContext().publishEvent(new SearchResultsSelectionEvent(this,
element));
}
}
}