Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContext


     * Class under test for void
     * BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale,
     * boolean, boolean)
     */
    public void testBeanContextSupportBeanContextLocalebooleanboolean() {
        BeanContext ctx = new MockBeanContext();
        MockBeanContextSupport support = new MockBeanContextSupport(ctx,
                Locale.CANADA_FRENCH, true, false);

        assertSame(ctx, support.getBeanContextPeer());
        assertTrue(support.bcmListeners().isEmpty());
View Full Code Here


                .publicGetChildVisibility(new Integer(129));
        assertNull(result);
    }

    public void testGetLocale() throws PropertyVetoException {
        BeanContext ctx = new MockBeanContext();
        MockBeanContextSupport support = new MockBeanContextSupport(ctx,
                Locale.CANADA_FRENCH);

        assertSame(Locale.CANADA_FRENCH, support.getLocale());
View Full Code Here

        //
        // Get the associated context object, then use it to locate the (parent) bean context.
        // Services are always provided by the parent context.
        //
        ControlBeanContext cbc = getControlBeanContext();
        BeanContext bc = cbc.getBeanContext();
        if (bc == null || !(bc instanceof BeanContextServices))
            throw new ControlException("Can't locate service context: " + bc);

        //
        // Call getService on the parent context, using this bean as the requestor and the
View Full Code Here

        //
        // The parent BeanContext is responsible for providing requested services.  If
        // no parent context is available or it is does not manage services, then no service.
        //
        BeanContext bc = getBeanContext();
        if (bc == null || !(bc instanceof BeanContextServices))
            return null;

        //
        // Call getService on the parent context, using this bean as the requestor and the
View Full Code Here

        // Initially set to the local beans relative ID
        String id = _bean.getLocalID();

        // If there is a parent context, prepend its ID and the ID separator
        BeanContext bc = getBeanContext();
        if (bc != null && bc instanceof ControlBeanContext)
        {
            String parentID = ((ControlBeanContext)bc).getControlID();
            if (parentID != null)
            {
View Full Code Here

                while (iter.hasNext())
                    classSet.add(iter.next());
            }
           
            // Go up to the parent, if it is a service provider as well
            BeanContext bc = getBeanContext();
            if (bc instanceof BeanContextServices && bcs != bc)
                bcs = (BeanContextServices)bc;
            else
                bcs = null;
        }
View Full Code Here

    public Iterator getCurrentServiceSelectors(Class serviceClass)
    {
        if (hasService(serviceClass))
            return super.getCurrentServiceSelectors(serviceClass);
       
        BeanContext bc = getBeanContext();
        if (bc instanceof BeanContextServices)
            return ((BeanContextServices)bc).getCurrentServiceSelectors(serviceClass);

        return null;
    }
View Full Code Here

            new InternalConcurrentHashMap/*< String, Map< Field, PropertyMap > >*/();

    public static void destroyControl( Object controlInstance )
    {
        assert controlInstance instanceof ControlBean : controlInstance.getClass().getName();
        BeanContext beanContext = ( ( ControlBean ) controlInstance ).getBeanContext();
        if ( beanContext != null ) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Removing control " + controlInstance + " from ControlBeanContext " + beanContext);
            }
            beanContext.remove( controlInstance );
        }
    }
View Full Code Here

                throw pve;
            }
        }

        releaseBeanContextResources();
        BeanContext oldValue = _beanContext;
        _beanContext = bc;
        _vetodOnce = false;
        firePropertyChange("beanContext", oldValue, _beanContext);
    }
View Full Code Here

     * @param controlInstance the Control instance
     */
    private static void destroyControl( Object controlInstance )
    {
        assert controlInstance instanceof ControlBean : controlInstance.getClass().getName();
        BeanContext beanContext = ( ( ControlBean ) controlInstance ).getBeanContext();
        if ( beanContext != null ) {
            if(LOG.isTraceEnabled())
                LOG.trace("Removing control " + controlInstance + " from ControlBeanContext " + beanContext);
            beanContext.remove( controlInstance );
        }
    }
View Full Code Here

TOP

Related Classes of java.beans.beancontext.BeanContext

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.