use of org.freeinternals.javaclassviewer.ui.JTreeZipFile in project selenium_java by sergueik.
the class Main method open_JarFile.
private void open_JarFile(final File file) {
try {
this.zftree = new JTreeZipFile(new JarFile(file, false, JarFile.OPEN_READ));
this.zftree.addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(final MouseEvent e) {
if (e.getClickCount() != 2) {
return;
}
if (zftree.getRowForLocation(e.getX(), e.getY()) == -1) {
return;
}
zftree_DoubleClick(zftree.getPathForLocation(e.getX(), e.getY()));
}
});
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
JOptionPane.showMessageDialog(this, ex.toString(), this.getTitle(), JOptionPane.ERROR_MESSAGE);
}
if (this.zftree != null) {
this.zftreeContainer = new JPanelForTree(this.zftree, this);
this.add(this.zftreeContainer, BorderLayout.CENTER);
this.resizeForContent();
}
}
Aggregations