Package tv.porst.jhexview

Examples of tv.porst.jhexview.JHexView$InternalListener


    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


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

    hexView = new JHexView();

    add(hexView);
  }
View Full Code Here

TOP

Related Classes of tv.porst.jhexview.JHexView$InternalListener

Copyright © 2018 www.massapicom. 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.