Package org.openide.nodes

Examples of org.openide.nodes.Node


    protected boolean enable(Node[] activatedNodes) {
        if (activatedNodes.length == 0 || activatedNodes.length > 1) {
            return false;
        }

        Node node = activatedNodes[0];
        AddCookieInterface add = node.getCookie(AddCookieInterface.class);
        //if (server != null && server.isConnected()) {
        if (add != null) {
            return true;
        }
View Full Code Here


    protected boolean enable(Node[] activatedNodes) {
        if (activatedNodes.length == 0) {
            return false;
        }

        Node node = activatedNodes[0];
        ConnectCookieInterface connect = node.getCookie(ConnectCookieInterface.class);
        if (connect != null && !connect.getIsConnected()) {
            return true;
        }

        return false;
View Full Code Here

    private static final String ICON = "org/netbeans/modules/languages/pl_sql/editor/resources/myuser.gif";

    @Override
    protected void performAction(Node[] arg0) {
        Node nd = arg0[0];
        ChangeOAccess(nd, ObjectAccessed.User);
    }
View Full Code Here

    protected boolean enable(Node[] activatedNodes) {
        if (activatedNodes.length == 0 || activatedNodes.length > 1) {
            return false;
        }

        Node node = activatedNodes[0];
        ChangeOAccessCookieInterface acc = node.getCookie(ChangeOAccessCookieInterface.class);
        if (acc != null) {
            return true;
        }

        return false;
View Full Code Here

    private static final String ICON = "org/netbeans/modules/languages/pl_sql/editor/resources/myall.gif";

    @Override
    protected void performAction(Node[] arg0) {
        Node nd = arg0[0];
        ChangeOAccess(nd, ObjectAccessed.All);
    }
View Full Code Here

        changeSupport.removeChangeListener(l);
    }

    @Override
    public Node node(IvyNodeList.NodeKeys key) {
        Node retVal = null;
        switch (key) {
            case FILE_NODE:
                retVal = getFileNode();
                break;
        }
View Full Code Here

        return manager;
    }

    private void expandFirstLevel(BeanTreeView btv) {
       
        Node root = manager.getRootContext();
        Children ch = root.getChildren();
        if ( ch == Children.LEAF ) {
            return;
        }
        Node nodes[] = ch.getNodes(true);

        btv.expandNode(root);
        for ( int i = 0; i < nodes.length; i++ ) {           
            btv.expandNode( nodes[i] );
            if ( i == 0 ) {
View Full Code Here

    }


    private FileObject getSelectedFileObject() {
        Node selection[] = getExplorerManager().getSelectedNodes();
        if (selection != null && selection.length > 0) {
            DataObject dobj = selection[0].getLookup().lookup(DataObject.class);
            return dobj.getPrimaryFile();
        }
        return null;
View Full Code Here

    }

    private void openFileInIDE(FileObject file) {
        try {
            DataObject newDo = DataObject.find(file);
            final Node node = newDo.getNodeDelegate();
            Action a = node.getPreferredAction();
            if (a instanceof ContextAwareAction) {
                a = ((ContextAwareAction) a).createContextAwareInstance(node.getLookup());
            }
            if (a != null) {
                a.actionPerformed(new ActionEvent(node, ActionEvent.ACTION_PERFORMED, "")); // NOI18N
            }
        } catch (DataObjectNotFoundException ex) {
View Full Code Here

    }

    @Override
    protected void performAction(Node[] nodes) {

        Node cNode = nodes[0].getParentNode().getParentNode().getParentNode();
        DatabaseConnection dbconn = cNode.getLookup().lookup(DatabaseConnection.class);
        if (dbconn.getJDBCConnection() == null) {
            ConnectionManager.getDefault().showConnectionDialog(dbconn);
        }

        Thread t = new Thread(new MapperRunnable(dbconn));
View Full Code Here

TOP

Related Classes of org.openide.nodes.Node

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.