use of jadx.gui.treemodel.JResource in project jadx by skylot.
the class TabbedPane method makeContentPanel.
@Nullable
private ContentPanel makeContentPanel(JNode node) {
if (node instanceof JResource) {
JResource res = (JResource) node;
ResourceFile resFile = res.getResFile();
if (resFile != null) {
if (resFile.getType() == ResourceType.IMG) {
return new ImagePanel(this, res);
}
} else {
return null;
}
}
return new CodePanel(this, node);
}
use of jadx.gui.treemodel.JResource in project jadx by skylot.
the class MainWindow method treeClickAction.
private void treeClickAction() {
try {
Object obj = tree.getLastSelectedPathComponent();
if (obj instanceof JResource) {
JResource res = (JResource) obj;
ResourceFile resFile = res.getResFile();
if (resFile != null && JResource.isSupportedForView(resFile.getType())) {
tabbedPane.showResource(res);
}
} else if (obj instanceof JNode) {
JNode node = (JNode) obj;
JClass cls = node.getRootClass();
if (cls != null) {
tabbedPane.codeJump(new Position(cls, node.getLine()));
}
}
} catch (Exception e) {
LOG.error("Content loading error", e);
}
}
Aggregations