Package org.apache.beehive.controls.api.properties

Examples of org.apache.beehive.controls.api.properties.BeanPropertyMap


        if ( extImplBinding == null )
            extImplBinding = _extImplBindings.getProperty( beanClassName );

        if ( extImplBinding != null )
        {
            BeanPropertyMap bpm = props == null ? new BeanPropertyMap( beanClass ) : new BeanPropertyMap( props );
            PropertyKey propKey = new PropertyKey( org.apache.beehive.controls.api.properties.BaseProperties.class,
                                                   "controlImplementation" );

            bpm.setProperty( propKey, extImplBinding );
            props = bpm;
        }

        T ret = null;
        try
View Full Code Here


    {
        //
        // Return a wrapped copy of the original bean property map, so any edits
        // don't impact the bean properties.
        //
        return new BeanPropertyMap(_bean.getPropertyMap());
    }
View Full Code Here

            // incrementally compare oldInstance property values to newInstance property values.  
            // Because the bean instance PropertyMap holds only the values that have been
            // modified, this process can be optimized by directly writing out only the properties
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance,
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
View Full Code Here

            // map, and then create a wrapper map around it for storing per instance
            // properties.
            //
            if (annotElem != controlIntf)
                initProperties.setDelegateMap(classMap);
            _properties = new BeanPropertyMap(initProperties);
        }
        else
        {
            //
            // If no initial map was provided, simply create an empty map wrapping the
            // control class default.
            //
            _properties = new BeanPropertyMap(classMap);
        }

    }
View Full Code Here

            // incrementally compare oldInstance property values to newInstance property values.  
            // Because the bean instance PropertyMap holds only the values that have been
            // modified, this process can be optimized by directly writing out only the properties
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance,
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
View Full Code Here

    {
        //
        // Return a wrapped copy of the original bean property map, so any edits
        // don't impact the bean properties.
        //
        return new BeanPropertyMap(_bean.getPropertyMap());
    }
View Full Code Here

        if ( extImplBinding == null )
            extImplBinding = _extImplBindings.getProperty( beanClassName );

        if ( extImplBinding != null )
        {
            BeanPropertyMap bpm = props == null ? new BeanPropertyMap( beanClass ) : new BeanPropertyMap( props );
            PropertyKey propKey = new PropertyKey(org.apache.beehive.controls.api.properties.BaseProperties.class,
                                                  KEY_CONTROL_IMPLEMENTATION);

            bpm.setProperty( propKey, extImplBinding );
            props = bpm;
        }

        T ret = null;
        try
View Full Code Here

        if ( extImplBinding == null )
            extImplBinding = _extImplBindings.getProperty( beanClassName );

        if ( extImplBinding != null )
        {
            BeanPropertyMap bpm = props == null ? new BeanPropertyMap( beanClass ) : new BeanPropertyMap( props );
            PropertyKey propKey = new PropertyKey(org.apache.beehive.controls.api.properties.BaseProperties.class,
                                                  KEY_CONTROL_IMPLEMENTATION);

            bpm.setProperty( propKey, extImplBinding );
            props = bpm;
        }

        T ret = null;
        try
View Full Code Here

            // incrementally compare oldInstance property values to newInstance property values.  
            // Because the bean instance PropertyMap holds only the values that have been
            // modified, this process can be optimized by directly writing out only the properties
            // found in the map.
            //
            BeanPropertyMap beanMap = control.getPropertyMap();
            PropertyDescriptor [] propDescriptors = beanInfo.getPropertyDescriptors();
            for (PropertyKey pk : beanMap.getPropertyKeys())
            {
                //
                // Locate the PropertyDescriptor for the modified property, and use it to write
                // the property value to the encoder stream
                //
                String propName = pk.getPropertyName();
                boolean found = false;
                for (int i = 0; i < propDescriptors.length; i++)
                {
                    if (propName.equals(propDescriptors[i].getName()))
                    {
                        found = true;

                        // Only write the property if it is not flagged as transient
                        Object transientVal = propDescriptors[i].getValue("transient");
                        if (transientVal == null || transientVal.equals(Boolean.FALSE))
                        {
                            xmlOut.writeStatement(
                                new Statement(oldInstance,
                                      propDescriptors[i].getWriteMethod().getName(),
                                      new Object [] {beanMap.getProperty(pk)}));
                        }
                    }
                }
                if (found == false)
                {
View Full Code Here

            // map, and then create a wrapper map around it for storing per instance
            // properties.
            //
            if (annotElem != controlIntf)
                initProperties.setDelegateMap(classMap);
            _properties = new BeanPropertyMap(initProperties);
        }
        else
        {
            //
            // If no initial map was provided, simply create an empty map wrapping the
            // control class default.
            //
            _properties = new BeanPropertyMap(classMap);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.beehive.controls.api.properties.BeanPropertyMap

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.