Examples of JHexView


Examples of tv.porst.jhexview.JHexView

    final JFrame frame = new JFrame();
    frame.setLayout(new BorderLayout());
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setSize(800, 600);

    final JHexView hexView = new JHexView();
    frame.add(hexView);

    final JMenuBar menuBar = new JMenuBar();

    final JMenu menu = new JMenu("File");
    menu.add(new AbstractAction("Open") {

      @Override
      public void actionPerformed(final ActionEvent arg0) {

        final JFileChooser chooser = new JFileChooser();

        if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(frame)) {

          final File file = chooser.getSelectedFile();

          try {
            hexView.setData(new SimpleDataProvider(readFile(file)));
            hexView.setDefinitionStatus(DefinitionStatus.DEFINED);
            hexView.setEnabled(true);
          } catch (final IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
        }
View Full Code Here

Examples of tv.porst.jhexview.JHexView

   * Creates a new hex view object.
   */
  public FlashHexView() {
    super(new BorderLayout());

    hexView = new JHexView();

    add(hexView);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.