Package org.openide.explorer

Examples of org.openide.explorer.ExplorerManager


        initToolbar();
        initReceivers();
    }

    private void initListView() {
        manager = new ExplorerManager();
        organizer = new StandardGroupOrganizer();
        root = new FolderNode("", organizer, new ArrayList<String>(), document.getGroups());
        manager.setRootContext(root);
        ((BeanTreeView) this.jScrollPane1).setRootVisible(false);
View Full Code Here


     * This constructor can be used by AbstractDataResultViewers that do not
     * need to make Node selections available to Actions via the action global
     * context lookup.
     */
    public AbstractDataResultViewer() {
        em = new ExplorerManager();
        initialize();
    }
View Full Code Here

                Node generated = new DirectoryTreeFilterNode(new AbstractNode(new RootContentChildren(hierarchy)), true);
                Children genChilds = generated.getChildren();

                final DirectoryTreeTopComponent dirTree = DirectoryTreeTopComponent.findInstance();
                TreeView dirTreeView = dirTree.getTree();
                ExplorerManager dirTreeExplorerManager = dirTree.getExplorerManager();
                Node dirTreeRootNode = dirTreeExplorerManager.getRootContext();
                Children dirChilds = dirTreeRootNode.getChildren();
                Children currentChildren = dirChilds.findChild(DataSourcesNode.NAME).getChildren();

                Node dirExplored = null;

                // Find the parent node of the content in the directory tree
                for (int i = 0; i < genChilds.getNodesCount() - 1; i++) {
                    Node currentGeneratedNode = genChilds.getNodeAt(i);
                    for (int j = 0; j < currentChildren.getNodesCount(); j++) {
                        Node currentDirectoryTreeNode = currentChildren.getNodeAt(j);
                        if (currentGeneratedNode.getDisplayName().equals(currentDirectoryTreeNode.getDisplayName())) {
                            dirExplored = currentDirectoryTreeNode;
                            dirTreeView.expandNode(dirExplored);
                            currentChildren = currentDirectoryTreeNode.getChildren();
                            break;
                        }
                    }
                }

                // Set the parent node of the content as the selection in the
                // directory tree
                try {
                    if (dirExplored != null) {
                        dirTreeView.expandNode(dirExplored);
                        dirTreeExplorerManager.setExploredContextAndSelection(dirExplored, new Node[]{dirExplored});
                    }
                } catch (PropertyVetoException ex) {
                    logger.log(Level.WARNING, "Couldn't set selected node", ex); //NON-NLS
                }
View Full Code Here

        super(title);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        ExplorerManager em = DirectoryTreeTopComponent.findInstance().getExplorerManager();
        Node[] selectedNode = em.getSelectedNodes();

        // Collapse all

        BeanTreeView tree = DirectoryTreeTopComponent.findInstance().getTree();
        collapseAll(tree, selectedNode[0]);
View Full Code Here

    void setSelection(RepositoryRevision container) {
        RevisionNode node = (RevisionNode) getNode(rootNode, container);
        if (node == null) {
            return;
        }
        ExplorerManager em = ExplorerManager.find(this);
        try {
            em.setSelectedNodes(new Node[]{node});
        } catch (PropertyVetoException e) {
            ErrorManager.getDefault().notify(e);
        }
    }
View Full Code Here

    void setSelection(RepositoryRevision.Event revision) {
        RevisionNode node = (RevisionNode) getNode(rootNode, revision);
        if (node == null) {
            return;
        }
        ExplorerManager em = ExplorerManager.find(this);
        try {
            em.setSelectedNodes(new Node[]{node});
        } catch (PropertyVetoException e) {
            ErrorManager.getDefault().notify(e);
        }
    }
View Full Code Here

    }

    @Override
    public void addNotify() {
        super.addNotify();
        ExplorerManager em = ExplorerManager.find(this);
        em.setRootContext(rootNode);
        setDefaultColumnSizes();
    }
View Full Code Here

    }

    public void setResults(List results) {
        this.results = results;
        rootNode = new RevisionsRootNode();
        ExplorerManager em = ExplorerManager.find(this);
        if (em != null) {
            em.setRootContext(rootNode);
        }
    }
View Full Code Here

     */
    public VersioningPanel(GitVersioningTopComponent parent) {
        this.parentTopComponent = parent;
        this.git = Git.getInstance();
        refreshViewTask = rp.create(new RefreshViewTask());
        explorerManager = new ExplorerManager();
        displayStatuses = StatusInfo.STATUS_LOCAL_CHANGE;
        noContentComponent.setLabel(NbBundle.getMessage(VersioningPanel.class, "MSG_No_Changes_All")); // NOI18N
        syncTable = new SyncTable();

        initComponents();
View Full Code Here

        this.bIncomingSearch = false;
        this.roots = roots;
        this.repositoryUrl = null;
        this.criteria = criteria;
        criteriaVisible = true;
        explorerManager = new ExplorerManager();
        initComponents();
        setupComponents();
        refreshComponents(true);
    }
View Full Code Here

TOP

Related Classes of org.openide.explorer.ExplorerManager

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.