Examples of BeanContextSupport


Examples of java.beans.beancontext.BeanContextSupport

  // 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

Examples of java.beans.beancontext.BeanContextSupport

    public void test_writeObject_java_beans_beancontext_BeanContextSupport() throws PropertyVetoException{
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
            byteArrayOutputStream));
        BeanContextSupport support = new BeanContextSupport();

        encoder.writeObject(support);
        encoder.close();
        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray()));
        XMLDecoder decoder = new XMLDecoder(stream);
        BeanContextSupport aSupport = (BeanContextSupport) decoder.readObject();
        assertEquals(Locale.getDefault(), aSupport.getLocale());
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  }
 
  public void testConstructor1(TestHarness harness)
  {
    harness.checkPoint("()");
    BeanContextSupport bcs = new BeanContextSupport();
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bcs);
    harness.check(bcs.beanContextChildPeer, bcs);
    harness.check(!bcs.needsGui());
    harness.check(!bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  }
 
  public void testConstructor2(TestHarness harness)
  {
    harness.checkPoint("(BeanContext)");
    BeanContext bc = new BeanContextSupport();
    BeanContextSupport bcs = new BeanContextSupport(bc);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bc);
    harness.check(bcs.beanContextChildPeer, bc);
    harness.check(!bcs.needsGui());
    harness.check(!bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
   
    // try null
    bcs = new BeanContextSupport(null);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bcs);
    harness.check(bcs.beanContextChildPeer, bcs);
    harness.check(!bcs.needsGui());
    harness.check(!bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  }
 
  public void testConstructor3(TestHarness harness)
  {
    harness.checkPoint("(BeanContext, Locale)");
    BeanContext bc = new BeanContextSupport();
    BeanContextSupport bcs = new BeanContextSupport(bc, Locale.FRANCE);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bc);
    harness.check(bcs.beanContextChildPeer, bc);
    harness.check(!bcs.needsGui());
    harness.check(!bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.FRANCE);
    harness.check(bcs.size(), 0);
   
    // try null
    bcs = new BeanContextSupport(null, null);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bcs);
    harness.check(!bcs.needsGui());
    harness.check(!bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  }
 
  public void testConstructor4(TestHarness harness)
  {
    harness.checkPoint("(BeanContext, Locale, boolean)");
    BeanContext bc = new BeanContextSupport();
    BeanContextSupport bcs = new BeanContextSupport(bc, Locale.FRANCE, true);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bc);
    harness.check(bcs.beanContextChildPeer, bc);
    harness.check(!bcs.needsGui());
    harness.check(bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.FRANCE);
     
    // try null
    bcs = new BeanContextSupport(null, null, true);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bcs);
    harness.check(bcs.beanContextChildPeer, bcs);
    harness.check(!bcs.needsGui());
    harness.check(bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

 
  public void testConstructor5(TestHarness harness)
  {
    harness.checkPoint("()");
    harness.checkPoint("(BeanContext, Locale, boolean, boolean)");
    BeanContext bc = new BeanContextSupport();
    BeanContextSupport bcs = new BeanContextSupport(bc, Locale.FRANCE, true, true);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bc);
    harness.check(bcs.beanContextChildPeer, bc);
    harness.check(!bcs.needsGui());
    harness.check(bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.FRANCE);
     
    // try null
    bcs = new BeanContextSupport(null, null, true, true);
    harness.check(bcs.getBeanContext(), null);
    harness.check(bcs.getBeanContextPeer(), bcs);
    harness.check(bcs.beanContextChildPeer, bcs);
    harness.check(!bcs.needsGui());
    harness.check(bcs.isDesignTime());
    harness.check(!bcs.avoidingGui());
    harness.check(bcs.getLocale(), Locale.getDefault());
    harness.check(bcs.size(), 0);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  /**
   * See bug parade entry 4295174
   */
  public void test(TestHarness harness)
  {
    BeanContextSupport bcs = new BeanContextSupport();
    bcs.addPropertyChangeListener("designTime", this);
    harness.check(bcs.isDesignTime(), false);
    bcs.setDesignTime(true);
    harness.check(lastEvent, null);
    bcs.addPropertyChangeListener("designMode", this);
    bcs.setDesignTime(false);
    harness.check(lastEvent.getPropertyName(), "designMode");
    harness.check(lastEvent.getNewValue(), Boolean.FALSE);
    harness.check(lastEvent.getOldValue(), Boolean.TRUE);
    harness.check(lastEvent.getSource(), bcs);
  }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

public class getBeanContextPeer implements Testlet
{
  public void test(TestHarness harness)
  {
    BeanContextSupport bcs1 = new BeanContextSupport();
    BeanContextSupport bcs2 = new BeanContextSupport(bcs1);
    harness.check(bcs1.getBeanContextPeer(), bcs1);
    harness.check(bcs2.getBeanContextPeer(), bcs1);
   
    // we can determine that this method actually returns the
    // beanContextChildPeer field as follows...
    boolean pass = true;
    bcs2.beanContextChildPeer = new BeanContextChildSupport();
    try
    {
      bcs2.getBeanContextPeer();
    }
    catch (ClassCastException e)
    {
      pass = true;
    }
View Full Code Here

Examples of java.beans.beancontext.BeanContextSupport

  }
 
  public void testMethod1(TestHarness harness)
  {
    harness.checkPoint("()");
    BeanContextSupport bcs = new BeanContextSupport();
    Object[] array = bcs.toArray();
    harness.check(array.length, 0);
    BeanContextSupport child1 = new BeanContextSupport();
    bcs.add(child1);
    array = bcs.toArray();
    harness.check(array.length, 1);
    harness.check(array[0] == child1);
    bcs.add("Child2");
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.