Package jadx.gui

Source Code of jadx.gui.JadxGUI

package jadx.gui;

import jadx.cli.JadxCLIArgs;
import jadx.gui.ui.MainWindow;

import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.WindowConstants;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JadxGUI {
  private static final Logger LOG = LoggerFactory.getLogger(JadxGUI.class);

  public static void main(String[] args) {
    try {
      final JadxCLIArgs jadxArgs = new JadxCLIArgs();
      if (!jadxArgs.processArgs(args)) {
        return;
      }
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
      SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          JadxWrapper wrapper = new JadxWrapper(jadxArgs);
          MainWindow window = new MainWindow(wrapper);
          window.pack();
          window.setLocationAndPosition();
          window.setVisible(true);
          window.setLocationRelativeTo(null);
          window.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

          if (jadxArgs.getInput().isEmpty()) {
            window.openFile();
          } else {
            window.openFile(jadxArgs.getInput().get(0));
          }
        }
      });
    } catch (Throwable e) {
      LOG.error("Error: " + e.getMessage());
      System.exit(1);
    }
  }
}
TOP

Related Classes of jadx.gui.JadxGUI

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.