Package jadx.gui.treemodel

Examples of jadx.gui.treemodel.JClass


  private void treeClickAction() {
    Object obj = tree.getLastSelectedPathComponent();
    if (obj instanceof JNode) {
      JNode node = (JNode) obj;
      JClass cls = node.getRootClass();
      if (cls != null) {
        tabbedPane.showCode(new Position(cls, node.getLine()));
      }
    }
  }
View Full Code Here


  private void syncWithEditor() {
    CodePanel selectedCodePanel = tabbedPane.getSelectedCodePanel();
    if (selectedCodePanel == null) {
      return;
    }
    JClass jCls = selectedCodePanel.getCls();
    if (jCls.getParent() == null && treeRoot != null) {
      // node not register in tree
      jCls = treeRoot.searchClassInTree(jCls);
      if (jCls == null) {
        LOG.error("Class not found in tree");
        return;
View Full Code Here

      @Override
      public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
        TreePath path = event.getPath();
        Object node = path.getLastPathComponent();
        if (node instanceof JClass) {
          JClass cls = (JClass) node;
          cls.getRootClass().load();
        }
      }

      @Override
      public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException {
View Full Code Here

  CodePanel getSelectedCodePanel() {
    return (CodePanel) getSelectedComponent();
  }

  private Component makeTabComponent(final CodePanel codePanel) {
    JClass cls = codePanel.getCls();
    String name = cls.getCls().getFullName();

    final JPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 3, 0));
    panel.setOpaque(false);

    final JLabel label = new JLabel(name);
    label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
    label.setIcon(cls.getIcon());

    final JButton button = new JButton();
    button.setIcon(ICON_CLOSE_INACTIVE);
    button.setRolloverIcon(ICON_CLOSE);
    button.setRolloverEnabled(true);
View Full Code Here

      for (final Map.Entry<JClass, CodePanel> entry : openTabs.entrySet()) {
        final CodePanel cp = entry.getValue();
        if (cp == selectedCodePanel) {
          continue;
        }
        JClass jClass = entry.getKey();
        final String clsName = jClass.getCls().getFullName();
        JMenuItem item = new JMenuItem(clsName);
        item.addActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            setSelectedComponent(cp);
          }
        });
        item.setIcon(jClass.getIcon());
        menu.add(item);
      }
    }
    return menu;
  }
View Full Code Here

public class Position {
  private final JClass cls;
  private final int line;

  public Position(CodePosition pos) {
    this.cls = new JClass(pos.getJavaClass());
    this.line = pos.getLine();
  }
View Full Code Here

TOP

Related Classes of jadx.gui.treemodel.JClass

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.