Package org.apache.cayenne.modeler.event

Examples of org.apache.cayenne.modeler.event.AttributeDisplayEvent


        final ModelMergeDelegate delegate = new ModelMergeDelegate (){

            public void dbAttributeAdded(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void dbAttributeModified(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void dbAttributeRemoved(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void dbEntityAdded(DbEntity ent) {
                c.fireDbEntityEvent(new EntityEvent(src, ent, MapEvent.ADD));
                c.fireDbEntityDisplayEvent(new EntityDisplayEvent(src, ent, dataMap, node, domain));
            }

            public void dbEntityRemoved(DbEntity ent) {
                c.fireDbEntityEvent(new EntityEvent(src, ent, MapEvent.REMOVE));
                c.fireDbEntityDisplayEvent(new EntityDisplayEvent(src, ent, dataMap, node, domain));
            }

            public void dbRelationshipAdded(DbRelationship rel) {
                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel, rel.getSourceEntity(), dataMap, domain));
                }
            }

            public void dbRelationshipRemoved(DbRelationship rel) {
                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(src, rel, rel.getSourceEntity(), dataMap, domain));
                }
            }

            public void objAttributeAdded(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void objAttributeModified(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void objAttributeRemoved(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att.getEntity(), dataMap, domain));
                }
            }

            public void objEntityAdded(ObjEntity ent) {
                c.fireObjEntityEvent(new EntityEvent(src, ent, MapEvent.ADD));
View Full Code Here


            if (sel.length == 1) {
                // scroll table
                UIUtil.scrollToSelectedRow(table);
            }
        }
        mediator.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(
                this,
                attrs,
                mediator.getCurrentDbEntity(),
                mediator.getCurrentDataMap(),
                (DataChannelDescriptor) mediator.getProject().getRootNode()));
View Full Code Here

        }
        else {
            resolve.setEnabled(false);
        }

        AttributeDisplayEvent ev = new AttributeDisplayEvent(
                this,
                attrs,
                mediator.getCurrentObjEntity(),
                mediator.getCurrentDataMap(),
                (DataChannelDescriptor) mediator.getProject().getRootNode());
View Full Code Here

            // scroll table
            UIUtil.scrollToSelectedRow(table);
        }

        AttributeDisplayEvent ev = new AttributeDisplayEvent(this, attribute, mediator
                .getCurrentObjEntity(), mediator.getCurrentDataMap(), mediator
                .getCurrentDataDomain());

        mediator.fireObjAttributeDisplayEvent(ev);
    }
View Full Code Here

                this,
                attr,
                objEntity,
                MapEvent.ADD));

        AttributeDisplayEvent ade = new AttributeDisplayEvent(
                this,
                attr,
                objEntity,
                mediator.getCurrentDataMap(),
                mediator.getCurrentDataDomain());
View Full Code Here

        ProjectController mediator = getProjectController();
        mediator.fireDbAttributeEvent(
            new AttributeEvent(this, attr, dbEntity, MapEvent.ADD));

        AttributeDisplayEvent ade = new AttributeDisplayEvent(
                this,
                attr,
                dbEntity,
                mediator.getCurrentDataMap(),
                mediator.getCurrentDataDomain());
View Full Code Here

        }

    }

    public void displayField(ProjectController mediator, JFrame frame) {
        AttributeDisplayEvent event = new AttributeDisplayEvent(
                frame,
                attribute,
                entity,
                map,
                domain);
View Full Code Here

            // scroll table
            UIUtil.scrollToSelectedRow(table);
        }

        mediator.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(
                this,
                att,
                mediator.getCurrentDbEntity(),
                mediator.getCurrentDataMap(),
                mediator.getCurrentDataDomain()));
View Full Code Here

        final ModelMergeDelegate delegate = new ModelMergeDelegate() {

            public void dbAttributeAdded(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att
                            .getEntity(), dataMap, domain));
                }
            }

            public void dbAttributeModified(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att
                            .getEntity(), dataMap, domain));
                }
            }

            public void dbAttributeRemoved(DbAttribute att) {
                if (c.getCurrentDbEntity() == att.getEntity()) {
                    c.fireDbAttributeDisplayEvent(new AttributeDisplayEvent(src, att, att
                            .getEntity(), dataMap, domain));
                }
            }

            public void dbEntityAdded(DbEntity ent) {
                c.fireDbEntityEvent(new EntityEvent(src, ent, MapEvent.ADD));
                c.fireDbEntityDisplayEvent(new EntityDisplayEvent(
                        src,
                        ent,
                        dataMap,
                        node,
                        domain));
            }

            public void dbEntityRemoved(DbEntity ent) {
                c.fireDbEntityEvent(new EntityEvent(src, ent, MapEvent.REMOVE));
                c.fireDbEntityDisplayEvent(new EntityDisplayEvent(
                        src,
                        ent,
                        dataMap,
                        node,
                        domain));
            }

            public void dbRelationshipAdded(DbRelationship rel) {
                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(
                            src,
                            rel,
                            rel.getSourceEntity(),
                            dataMap,
                            domain));
                }
            }

            public void dbRelationshipRemoved(DbRelationship rel) {
                if (c.getCurrentDbEntity() == rel.getSourceEntity()) {
                    c.fireDbRelationshipDisplayEvent(new RelationshipDisplayEvent(
                            src,
                            rel,
                            rel.getSourceEntity(),
                            dataMap,
                            domain));
                }
            }

            public void objAttributeAdded(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(
                            src,
                            att,
                            att.getEntity(),
                            dataMap,
                            domain));
                }
            }

            public void objAttributeModified(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(
                            src,
                            att,
                            att.getEntity(),
                            dataMap,
                            domain));
                }
            }

            public void objAttributeRemoved(ObjAttribute att) {
                if (c.getCurrentObjEntity() == att.getEntity()) {
                    c.fireObjAttributeDisplayEvent(new AttributeDisplayEvent(
                            src,
                            att,
                            att.getEntity(),
                            dataMap,
                            domain));
View Full Code Here

        mediator.fireObjEntityDisplayEvent(event);

        mediator.fireObjAttributeEvent(new AttributeEvent(this, attributeSaved, model
                .getEntity(), MapEvent.CHANGE));

        AttributeDisplayEvent eventAttr = new AttributeDisplayEvent(
                this,
                attributeSaved,
                mediator.getCurrentObjEntity(),
                mediator.getCurrentDataMap(),
                (DataChannelDescriptor)mediator.getProject().getRootNode());
View Full Code Here

TOP

Related Classes of org.apache.cayenne.modeler.event.AttributeDisplayEvent

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.