ClassInheritanceTreeNode classNode = (ClassInheritanceTreeNode)node;
navigateTo( new ClassEntry( classNode.getObfClassName() ) );
}
else if( node instanceof MethodInheritanceTreeNode )
{
MethodInheritanceTreeNode methodNode = (MethodInheritanceTreeNode)node;
if( methodNode.isImplemented() )
{
navigateTo( methodNode.getMethodEntry() );
}
}
}
}
} );
JPanel inheritancePanel = new JPanel();
inheritancePanel.setLayout( new BorderLayout() );
inheritancePanel.add( new JScrollPane( m_inheritanceTree ) );
// init implementations panel
m_implementationsTree = new JTree();
m_implementationsTree.setModel( null );
m_implementationsTree.addMouseListener( new MouseAdapter( )
{
@Override
public void mouseClicked( MouseEvent event )
{
if( event.getClickCount() == 2 )
{
// get the selected node
TreePath path = m_implementationsTree.getSelectionPath();
if( path == null )
{
return;
}
Object node = path.getLastPathComponent();
if( node instanceof ClassImplementationsTreeNode )
{
ClassImplementationsTreeNode classNode = (ClassImplementationsTreeNode)node;
navigateTo( classNode.getClassEntry() );
}
else if( node instanceof MethodImplementationsTreeNode )
{
MethodImplementationsTreeNode methodNode = (MethodImplementationsTreeNode)node;
navigateTo( methodNode.getMethodEntry() );
}
}
}
} );
JPanel implementationsPanel = new JPanel();