Package net.alteiar.campaign.player.gui.centerViews.explorer.tree

Examples of net.alteiar.campaign.player.gui.centerViews.explorer.tree.DocumentNode


    TreePath path = tree.getPathForLocation(e.getX(), e.getY());

    if (path == null) {
      rootClick(e);
    } else {
      DocumentNode node = (DocumentNode) path.getLastPathComponent();

      BeanBasicDocument doc = node.getUserObject();
      BeanDirectory parent = CampaignClient.getInstance().getBean(
          doc.getParent());
      dirClick(e, parent, doc);
    }
  }
View Full Code Here


  public PanelDocumentExplorer() {
    this.setLayout(new BorderLayout());

    BeanDirectory root = CampaignClient.getInstance().getRootDirectory();
    DocumentNode all = new DocumentNode(root, root.isDirectory());

    MyTreeModel treeModel = new MyTreeModel(all);
    tree = new JTree();
    tree.setModel(treeModel);
    tree.setRootVisible(false);
View Full Code Here

  @Override
  protected Transferable createTransferable(JComponent c) {
    JTree tree = (JTree) c;

    TreePath path = tree.getSelectionPath();
    DocumentNode doc = (DocumentNode) path.getLastPathComponent();

    return new UniqueIdTransferable(doc.getUserObject().getId());
  }
View Full Code Here

      BeanDirectory targetDir = null;
      if (path == null) {
        targetDir = CampaignClient.getInstance().getRootDirectory();
      } else {
        DocumentNode node = (DocumentNode) path.getLastPathComponent();

        if (node.getUserObject().isDirectory()) {
          targetDir = (BeanDirectory) node.getUserObject();
        } else {
          UniqueID dirBean = node.getUserObject().getParent();
          targetDir = CampaignClient.getInstance().getBean(dirBean);
        }
      }

      BeanDirectory previousDir = CampaignClient.getInstance().getBean(
View Full Code Here

TOP

Related Classes of net.alteiar.campaign.player.gui.centerViews.explorer.tree.DocumentNode

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.