Examples of DomainEvent


Examples of org.apache.cayenne.map.event.DomainEvent

    protected void removeDomain() {
        ApplicationProject project = (ApplicationProject) getCurrentProject();
        ProjectController mediator = getProjectController();
        DataDomain domain = mediator.getCurrentDataDomain();
        project.getConfiguration().removeDomain(domain.getName());
        mediator.fireDomainEvent(new DomainEvent(
                Application.getFrame(),
                domain,
                MapEvent.REMOVE));
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

        Map properties = domain.getProperties();
        Object oldValue = properties.get(property);
        if (!Util.nullSafeEquals(value, oldValue)) {
            properties.put(property, value);

            DomainEvent e = new DomainEvent(this, domain);
            projectController.fireDomainEvent(e);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

        DataDomain matchingDomain = configuration.getDomain(newName);

        if (matchingDomain == null) {
            Domain prefs = projectController.getPreferenceDomainForDataDomain();

            DomainEvent e = new DomainEvent(this, domain, domain.getName());
            ProjectUtil.setDataDomainName(configuration, domain, newName);
            prefs.rename(newName);
            projectController.fireDomainEvent(e);
        }
        else if (matchingDomain != domain) {
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

            logObj.warn("domain properties BEFORE: " + domain.getProperties());
            model.storeProperties(domain.getProperties());

            logObj.warn("domain properties: " + domain.getProperties());

            eventController.fireDomainEvent(new DomainEvent(this, domain));
        }

        shutdown();
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

    public void removeDomain(DataDomain domain) {
        ApplicationProject project = (ApplicationProject) getCurrentProject();
        ProjectController mediator = getProjectController();

        project.getConfiguration().removeDomain(domain.getName());
        mediator.fireDomainEvent(new DomainEvent(
                Application.getFrame(),
                domain,
                MapEvent.REMOVE));
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

    public void createDomain(DataDomain domain) {
        ApplicationProject project = (ApplicationProject) getCurrentProject();
        ProjectController mediator = getProjectController();

        project.getConfiguration().addDomain(domain);
        mediator.fireDomainEvent(new DomainEvent(this, domain, MapEvent.ADD));
        mediator.fireDomainDisplayEvent(new DomainDisplayEvent(this, domain));
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

public class DomainEventTest extends TestCase {

    public void testConstructor1() throws Exception {
      Object src = new Object();
      DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, d);
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

    }
   
    public void testConstructor2() throws Exception  {
      Object src = new Object();
      DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, d, "oldname");
     
      assertSame(src, e.getSource());
      assertSame(d, e.getDomain());
      assertEquals("oldname", e.getOldName());
    }
View Full Code Here

Examples of org.apache.cayenne.map.event.DomainEvent

    }
   
    public void testDomain() throws Exception  {
      Object src = new Object();
         DataDomain d = new DataDomain("abc");
      DomainEvent e = new DomainEvent(src, null);
     
      e.setDomain(d);
      assertSame(d, e.getDomain());
    }
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.