Package org.openide.nodes

Examples of org.openide.nodes.Node


        setIconBaseWithExtension("org/gephi/desktop/filters/query/resources/queries.png");
    }

    @Override
    public PasteType getDropType(Transferable t, int action, int index) {
        final Node dropNode = NodeTransfer.node(t, DnDConstants.ACTION_COPY_OR_MOVE);

        if (t.isDataFlavorSupported(FilterBuilderNode.DATA_FLAVOR)) {
            try {
                final FilterBuilder fb = (FilterBuilder) t.getTransferData(FilterBuilderNode.DATA_FLAVOR);
                return new PasteType() {
View Full Code Here


        return new Action[0];
    }

    @Override
    public PasteType getDropType(final Transferable t, int action, int index) {
        final Node dropNode = NodeTransfer.node(t, DnDConstants.ACTION_COPY_OR_MOVE);
        if (dropNode != null && dropNode instanceof QueryNode) {
            Query q = ((QueryNode) dropNode).getQuery();
            if (!Arrays.asList(q.getDescendantsAndSelf()).contains(parent)) { //Check if not parent
                return new PasteType() {
View Full Code Here

            if (uiModel == null) {
                return;
            }
            Node[] nodeArray = (Node[]) evt.getNewValue();
            if (nodeArray.length > 0) {
                Node node = ((Node[]) evt.getNewValue())[0];
                if (node instanceof RootNode) {
                    uiModel.setSelectedQuery(null);
                    filterController.setCurrentQuery(null);
                    return;
                }
                while (!(node instanceof QueryNode)) {
                    node = node.getParentNode();
                    if (node.getParentNode() == null) {
                        uiModel.setSelectedQuery(null);
                        filterController.setCurrentQuery(null);
                        return;
                    }
                }
View Full Code Here

        } else if (node instanceof QueryNode) {
            QueryNode queryNode = (QueryNode) node;
            if (uiModel.isExpanded(queryNode.getQuery())) {
                expandNode(queryNode);
            }
            Node firstChild = queryNode.getChildren().getNodeAt(0);
            if (firstChild != null && firstChild instanceof ParameterNode) {
                if (uiModel.isParametersExpanded(queryNode.getQuery())) {
                    expandNode(firstChild);
                }
            }
View Full Code Here

            for (Node n : rootNode.getChildren().getNodes()) {
                saveExpandStatus(n);
            }
        } else if (node instanceof QueryNode) {
            QueryNode queryNode = (QueryNode) node;
            Node firstChild = queryNode.getChildren().getNodeAt(0);
            boolean parameterExpanded = false;
            if (firstChild != null && firstChild instanceof ParameterNode) {
                parameterExpanded = isExpanded(firstChild);
            }
            uiModel.setExpand(queryNode.getQuery(), isExpanded(queryNode), parameterExpanded);
View Full Code Here

    @Override
    public PasteType getDropType(final Transferable t, int action, int index) {
        if (category == null || !category.equals(FiltersExplorer.QUERIES)) {
            return null;
        }
        final Node dropNode = NodeTransfer.node(t, DnDConstants.ACTION_COPY_OR_MOVE);
        if (dropNode != null && dropNode instanceof QueryNode) {
            return new PasteType() {

                @Override
                public Transferable paste() throws IOException {
View Full Code Here

        Children children = new Children.Array();
        children.add(new Node[] { cameraNode, projectorNode, markerNode, detectorNode,
                geometricCalibratorNode, colorCalibratorNode });

        Node root = new AbstractNode(children);
        root.setName("Settings");
        manager.setRootContext(root);
    }
View Full Code Here

        Children children = new Children.Array();
        children.add(new Node[] { cameraNode, projectorNode, objectFinderNode,
                markerDetectorNode, alignerNode, handMouseNode, virtualBallNode,
                realityAugmentorNode, trackingNode });

        Node root = new AbstractNode(children);
        root.setName("Settings");
        manager.setRootContext(root);
    }
View Full Code Here

        if (name.equals("<system>"))
            return createNode("<system>", "system");

        if (service.getApplications().get(name).isDisabled()) {
            Node node = new AbstractNode(Children.LEAF);
            node.setDisplayName(name);
            return node;
        }
               
        return createNode(name, name);
    }
View Full Code Here

        args.put("password", service.getPassword());
        args.put("app", app);
        args.put("owner", "-");
        Service scope = Service.connect(args);

        Node node = new ExplorerNode(scope, new NamespaceKids(scope));
        node.setDisplayName(displayName);
        return node;
    }
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.