Package java.beans.beancontext

Examples of java.beans.beancontext.BeanContext


    }

    public void setName(String name) {
        super.setName(name);

        BeanContext bc = getBeanContext();
        if (bc != null && bc instanceof MapHandler) {
            LayerHandler lh = (LayerHandler) ((MapHandler) bc).get("com.bbn.openmap.LayerHandler");

            if (lh != null) {
                lh.setLayers();
View Full Code Here


        }
        if (lsListeners != null) {
            lsListeners.removeAll();
        }

        BeanContext bc = getBeanContext();
        if (bc != null) {
            bc.removeBeanContextMembershipListener(this);
        }
    }
View Full Code Here

     * Gets the current BeanContext from itself, if it's been set and
     * the provided PlugIn wants/can be added to the BeanContext, it
     * will be added..
     */
    public void addPlugInToBeanContext(PlugIn pi) {
        BeanContext bc = getBeanContext();

        if (bc != null
                && pi != null
                &&

                (pi instanceof BeanContextChild || (pi instanceof AbstractPlugIn && ((AbstractPlugIn) pi).getAddToBeanContext()))) {

            bc.add(pi);
        }
    }
View Full Code Here

     * Gets the current BeanContext from itself, if it's been set and
     * the provided PlugIn wants/can be added to the BeanContext, it
     * assumes it was and removes it from the BeanContext.
     */
    public void removePlugInFromBeanContext(PlugIn pi) {
        BeanContext bc = getBeanContext();

        if (bc != null
                && pi != null
                &&

                (pi instanceof BeanContextChild || (pi instanceof AbstractPlugIn && ((AbstractPlugIn) pi).getAddToBeanContext()))) {

            // Of course, we don't need all these conditions met to
            // order the removal, but they are the ones in place that would
            // cause it to be added, so we don't waste the effort
            // unless the same conditions are met.
            bc.remove(pi);
        }
    }
View Full Code Here

    public void removeAll() {
        if (allLayers == null || allLayers.length == 0) {
            return;
        }

        BeanContext bc = getBeanContext();
        Layer[] oldLayers = allLayers;
        Vector nonRemoveableLayers = null;

        for (int i = 0; i < oldLayers.length; i++) {
            Layer layer = oldLayers[i];
            if (layer.isRemovable()) {
                turnLayerOn(false, layer);
                layer.clearListeners();
                if (bc != null) {
                    // Remove the layer from the BeanContext
                    bc.remove(layer);
                }
                oldLayers[i] = null;
            } else {
                if (nonRemoveableLayers == null) {
                    nonRemoveableLayers = new Vector(oldLayers.length);
View Full Code Here

                newLayers,
                index,
                currentLayers.length - index - 1);

        // Remove the layer to the BeanContext, if it wants to be.
        BeanContext bc = getBeanContext();
        if (bc != null) {
            bc.remove(rLayer);
        }
        turnLayerOn(false, rLayer);
        rLayer.clearListeners();
        rLayer = null;
View Full Code Here

     * duplicates aren't allowed.
     *
     * @param layers layers to add, if they want to be.
     */
    public void addLayersToBeanContext(Layer[] layers) {
        BeanContext bc = getBeanContext();
        if (bc == null || layers == null) {
            return;
        }

        for (int i = 0; i < layers.length; i++) {
            if (layers[i].getAddToBeanContext()
                    && layers[i].getBeanContext() == null) {
                bc.add(layers[i]);
            }
        }
    }
View Full Code Here

     * duplicates aren't allowed.
     *
     * @param layers layers to add, if they want to be.
     */
    public void removeLayersFromBeanContext(Layer[] layers) {
        BeanContext bc = getBeanContext();
        if (bc == null || layers == null) {
            return;
        }

        for (int i = 0; i < layers.length; i++) {
            bc.remove(layers[i]);
        }
    }
View Full Code Here

        // config (WEB-INF/applicationContext.xml, or whatever has been configured in the
        // loader servlet) to be used.
        //
        while (context != null && !(context instanceof ServletBeanContext))
        {
            BeanContext parentContext = context.getBeanContext();
            if (parentContext instanceof ControlBeanContext)
                context = (ControlBeanContext)parentContext;
            else
                context = null;
        }
View Full Code Here

            BeanContextServiceRevokedEvent ser) {
        assertNull(ser.getSource());

        // check propagatedFrom
        if (orig.getPropagatedFrom() instanceof Serializable) {
            BeanContext origFrom = orig.getPropagatedFrom();
            BeanContext serFrom = ser.getPropagatedFrom();
            assertEquals(origFrom.getClass(), serFrom.getClass());
            if (origFrom instanceof MockBeanContextDelegateS) {
                assertEquals(((MockBeanContextDelegateS) origFrom).id,
                        ((MockBeanContextDelegateS) serFrom).id);
            }
        }
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.