Examples of DataNodeEvent


Examples of org.apache.cayenne.configuration.event.DataNodeEvent

                dsi.setUserName(keyAsString(connection, "username"));
            }

            // send events after the node creation is complete
            getProjectController().fireDataNodeEvent(
                    new DataNodeEvent(this, node, MapEvent.ADD));
            getProjectController().fireDataNodeDisplayEvent(
                    new DataNodeDisplayEvent(
                            this,
                            (DataChannelDescriptor) getProjectController()
                                    .getProject()
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

        currentState.domain.getDataMaps().add(map);

        if (currentState.node != null
                && !currentState.node.getDataMapNames().contains(map.getName())) {
            currentState.node.getDataMapNames().add(map.getName());
            fireDataNodeEvent(new DataNodeEvent(this, currentState.node));
        }

        fireDataMapEvent(new DataMapEvent(src, map, MapEvent.ADD));
        if (makeCurrent) {
            fireDataMapDisplayEvent(new DataMapDisplayEvent(
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

        DataChannelDescriptor domain = (DataChannelDescriptor) getProjectController()
                .getProject()
                .getRootNode();
        domain.getNodeDescriptors().add(node);
        getProjectController().fireDataNodeEvent(
                new DataNodeEvent(this, node, MapEvent.ADD));
        getProjectController().fireDataNodeDisplayEvent(
                new DataNodeDisplayEvent(this, domain, node));
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

                    .getRootNode();
            domain.getNodeDescriptors().add(node);

            // send events after the node creation is complete
            getProjectController().fireDataNodeEvent(
                    new DataNodeEvent(this, node, MapEvent.ADD));
            getProjectController().fireDataNodeDisplayEvent(
                    new DataNodeDisplayEvent(
                            this,
                            (DataChannelDescriptor) getProjectController()
                                    .getProject()
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

    public void removeDataNode(DataNodeDescriptor node) {
        ProjectController mediator = getProjectController();
        DataChannelDescriptor domain = (DataChannelDescriptor) mediator
                .getProject()
                .getRootNode();
        DataNodeEvent e = new DataNodeEvent(Application.getFrame(), node, MapEvent.REMOVE);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        domain.getNodeDescriptors().remove(node);
        mediator.fireDataNodeEvent(e);
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

    }

    public void removeDataMapFromDataNode(DataNodeDescriptor node, DataMap map) {
        ProjectController mediator = getProjectController();

        DataNodeEvent e = new DataNodeEvent(Application.getFrame(), node);
        e.setDomain((DataChannelDescriptor) mediator.getProject().getRootNode());

        node.getDataMapNames().remove(map.getName());

        // Force reloading of the data node in the browse view
        mediator.fireDataNodeEvent(e);
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

            // Being paranoid, we will still scan through all.
            if (nextNode != node && nextNode.getDataMapNames().contains(map.getName())) {
                nextNode.getDataMapNames().remove(map.getName());

                // announce DataNode change
                eventController.fireDataNodeEvent(new DataNodeEvent(this, nextNode));
            }
        }

        // link to a selected node
        if (node != null) {
            node.getDataMapNames().add(map.getName());

            // announce DataNode change
            eventController.fireDataNodeEvent(new DataNodeEvent(this, node));
        }
    }
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

                break;
            }
            case MAP_FROM_NODE: {
                this.dataNode.getDataMapNames().add(map.getName());

                DataNodeEvent e = new DataNodeEvent(Application.getFrame(), this.dataNode);

                ProjectController controller = Application
                        .getInstance()
                        .getFrameController()
                        .getProjectController();

                e
                        .setDomain((DataChannelDescriptor) controller
                                .getProject()
                                .getRootNode());

                controller.fireDataNodeEvent(e);
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

            public void modelUpdated(
                    ObjectBinding binding,
                    Object oldValue,
                    Object newValue) {

                DataNodeEvent e = new DataNodeEvent(MainDataNodeEditor.this, node);
                if (binding != null && binding.getView() == view.getDataNodeName()) {
                    e.setOldName(oldValue != null ? oldValue.toString() : null);
                }

                ((ProjectController) getParent()).fireDataNodeEvent(e);
            }
        };
View Full Code Here

Examples of org.apache.cayenne.configuration.event.DataNodeEvent

            public void modelUpdated(
                    ObjectBinding binding,
                    Object oldValue,
                    Object newValue) {

                DataNodeEvent e = new DataNodeEvent(PasswordEncoderEditor.this, node);
                ((ProjectController) getParent()).fireDataNodeEvent(e);
            }
        };

        initController();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.