use of org.freeinternals.commonlib.ui.JBinaryViewer in project selenium_java by sergueik.
the class JSplitPaneClassFile method createAndShowGUI.
private void createAndShowGUI(JFrame top) {
// Construct class file viewer
final JTreeClassFile jTreeClassFile = new JTreeClassFile(this.classFile);
jTreeClassFile.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(final javax.swing.event.TreeSelectionEvent evt) {
jTreeClassFileSelectionChanged(evt);
}
});
final JPanelForTree panel = new JPanelForTree(jTreeClassFile, top);
final JTabbedPane tabbedPane = new JTabbedPane();
// Construct binary viewer
this.binaryViewer = new JBinaryViewer();
this.binaryViewer.setData(this.classFile.getClassByteArray());
this.binaryViewerView = new JScrollPane(this.binaryViewer);
this.binaryViewerView.getVerticalScrollBar().setValue(0);
tabbedPane.add("Class File", this.binaryViewerView);
// Construct opcode viewer
this.opcode = new JTextPane();
this.opcode.setAlignmentX(Component.LEFT_ALIGNMENT);
// this.opcode.setFont(new Font(Font.DIALOG_INPUT, Font.PLAIN, 14));
this.opcode.setEditable(false);
this.opcode.setBorder(null);
this.opcode.setContentType("text/html");
tabbedPane.add("Opcode", new JScrollPane(this.opcode));
// Class report
this.report = new JTextPane();
this.report.setAlignmentX(Component.LEFT_ALIGNMENT);
this.report.setEditable(false);
this.report.setBorder(null);
this.report.setContentType("text/html");
tabbedPane.add("Report", new JScrollPane(this.report));
this.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
this.setDividerSize(5);
this.setDividerLocation(280);
this.setLeftComponent(panel);
this.setRightComponent(tabbedPane);
this.binaryViewerView.getVerticalScrollBar().setValue(0);
}
Aggregations