Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContextSupport


    }

    public void testSerialization_Peer() throws IOException,
            ClassNotFoundException {
        MockBeanContextDelegateS mock = new MockBeanContextDelegateS("main id");
        BeanContextSupport support = mock.support;
        support
                .addBeanContextMembershipListener(new MockBeanContextMembershipListener());
        support
                .addBeanContextMembershipListener(new MockBeanContextMembershipListenerS(
                        "l2"));
        support
                .addBeanContextMembershipListener(new MockBeanContextMembershipListenerS(
                        "l3"));
        support
                .addBeanContextMembershipListener(new MockBeanContextMembershipListener());
        support.add("abcd");
        support.add(new MockBeanContextChild());
        support.add(new MockBeanContextChildS("a child"));
        support.add(new MockBeanContextChild());
        support.add("1234");
        support.add(new MockBeanContextProxyS("proxy",
                new MockBeanContextChildS("b child")));

        MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) SerializationTester
                .getDeserilizedObject(mock);
        assertEquals(mock.id, serMock.id);
View Full Code Here


        assertEqualsSerially(mock.support, serMock.support);
    }

     public void testSerialization_Compatibility() throws Exception {
         MockBeanContextDelegateS mock = new MockBeanContextDelegateS("main id");
         BeanContextSupport support = mock.support;
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l2"));
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListenerS("l3"));
         support.addBeanContextMembershipListener(new MockBeanContextMembershipListener());
         support.add("abcd");
         support.add(new MockBeanContextChild());
         support.add(new MockBeanContextChildS("a child"));
         support.add(new MockBeanContextChild());
         support.add("1234");
         SerializationTest.verifyGolden(this, mock, new SerializableAssert(){
             public void assertDeserialized(Serializable orig, Serializable ser) {
                 MockBeanContextDelegateS serMock = (MockBeanContextDelegateS) ser;
                 MockBeanContextDelegateS mock = (MockBeanContextDelegateS) orig;
                 assertEquals(mock.id, serMock.id);
View Full Code Here

  }

  // Link the supplied beans into the KnowledgeFlow gui
  private void integrateFlow(Vector beans, Vector connections) {
    java.awt.Color bckC = getBackground();
    m_bcSupport = new BeanContextSupport();
    m_bcSupport.setDesignTime(true);

    // register this panel as a property change listener with each
    // bean
    for (int i = 0; i < beans.size(); i++) {
View Full Code Here

        connections = (Vector) ois.readObject();
        ois.close();
      }

      java.awt.Color bckC = getBackground();
      m_bcSupport = new BeanContextSupport();
      m_bcSupport.setDesignTime(true);

      // register this panel as a property change listener with each
      // bean
      for (int i = 0; i < beans.size(); i++) {
View Full Code Here

      dbl.setUser(user);
      dbl.setPassword(password);
      dbl.setUrl(uRL);
      dbl.setQuery(query);
     
      BeanContextSupport bc = new BeanContextSupport();
      bc.setDesignTime(true);
     
      Loader loaderComp = new Loader();
      bc.add(loaderComp);
      loaderComp.setLoader(dbl);
     
      KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();     
      m_mainPerspective.addTab("DBSource");
      BeanInstance beanI =
View Full Code Here

  // Link the supplied beans into the KnowledgeFlow gui
  protected void integrateFlow(Vector beans, Vector connections, boolean replace,
      boolean notReplaceAndSourcedFromBinary) {
    java.awt.Color bckC = getBackground();
    m_bcSupport = new BeanContextSupport();
    m_bcSupport.setDesignTime(true);

    // register this panel as a property change listener with each
    // bean
    for (int i = 0; i < beans.size(); i++) {
View Full Code Here

import java.beans.beancontext.BeanContextChildSupport;
import java.beans.beancontext.BeanContextSupport;

public class Test4233980 {
    public static void main(String[] args) {
        BeanContextSupport context = new BeanContextSupport(); // The BeanContext
        BeanContextChildSupport bean = new BeanContextChildSupport(); // The JavaBean
        // add the bean to the context
        context.add(bean);
        try {
            context.getResourceAsStream("Readme.txt", bean);
        }
        catch (Exception exception) {
            throw new Error("unexpected exception", exception);
        }
    }
View Full Code Here

import java.beans.beancontext.BeanContextMembershipEvent;
import java.beans.beancontext.BeanContextSupport;

public class Test4132698 extends BeanContextMembershipEvent {
    public static void main(String[] args) throws Exception {
        BeanContextSupport bcs = new BeanContextSupport();
        try {
            new Test4132698(bcs, null);
        }
        catch (NullPointerException exception) {
            return; // expected null pointer exception
View Full Code Here

        new Test4652928().test(true);
    }

    protected List getObject() {
        List<BeanContext> list = new ArrayList<BeanContext>();
        list.add(fill(new BeanContextSupport()));
        list.add(fill(new BeanContextServicesSupport()));
        return list;
    }
View Full Code Here

TOP

Related Classes of java.beans.beancontext.BeanContextSupport

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.