Examples of BeanProxy


Examples of com.volantis.mcs.interaction.BeanProxy

         */
        private String getColumnTextProperty(Proxy property, int i) {
            String stringValue = "";

            if (i == COLUMN_PROPERTY) {
                BeanProxy parent = (BeanProxy) property.getParentProxy();
                PropertyIdentifier identifier = parent.getPropertyForProxy(property);
                StyleProperty styleProperty = ThemeModel.getStylePropertyForPropertyIdentifier(identifier);
                stringValue = styleProperty.getName();
                stringValue = EclipseCommonMessages.getString("PolicyName." + stringValue);
            } else if (i == COLUMN_VALUE) {
                PropertyValue propertyValue = (PropertyValue) property.getModelObject();
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

           
           
             ListProxy rules = getRulesFromVariant(variant);
             if (rules != null) {
                 for (int i = 0; i < rules.size(); i++) {
                     BeanProxy rule = (BeanProxy) rules.getItemProxy(i);
                     Object[] styleProperties = getStylePropertyProxies(
                             (BeanProxy) rule.getPropertyProxy(
                                     Rule.STYLE_PROPERTIES));
                     for (int j = 0; j < styleProperties.length; j++) {
                         parents.put(styleProperties[j], rule);
                     }
                 }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

        private ListProxy getRulesFromVariant(BeanProxy variant) {
            ListProxy rules = null;

            BaseProxy content = (BaseProxy)
                    variant.getPropertyProxy(PolicyModel.CONTENT);
            BeanProxy themeContent = (BeanProxy) content.getConcreteProxy();
            if (themeContent != null) {
                BeanProxy stylesheet = (BeanProxy)
                        themeContent.getPropertyProxy(ThemeModel.STYLE_SHEET);
                rules = (ListProxy) stylesheet.
                        getPropertyProxy(ThemeModel.RULES);
            }

            return rules;
        }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

        }

        // Javadoc inherited
        public Object[] getChildren(Object o) {
            Object[] returnValue = null;
            BeanProxy proxy = (BeanProxy) o;
            if (proxy.getModelObject() instanceof Rule) {
                returnValue = getStylePropertyProxies((BeanProxy) proxy.getPropertyProxy(Rule.STYLE_PROPERTIES));
            } else {
                returnValue = new Object[0];
            }
            return returnValue;
        }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

        String label = "";

        if (o != null) {
            Proxy proxy = (Proxy) o;
            if (property != null) {
                BeanProxy bean = (BeanProxy) o;
                proxy = bean.getPropertyProxy(property);
            }

            label = render(proxy.getModelObject());
        }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     * @param descriptor The descriptor of the property that has changed
     * @param newValue The new value of the property
     */
    private void metadataPropertyChanged(PropertyDescriptor descriptor, Object newValue) {
        if (handlingPropertyChanges) {
            BeanProxy metadataProxy = getMetadataProxy();
            if (metadataProxy != null) {
                PropertyIdentifier identifier = descriptor.getIdentifier();
                if (identifier == PolicyModel.CONVERSION_MODE) {
                    updateImagePreserveControlState((ImageConversionMode) newValue);
                }

                Proxy propertyProxy = metadataProxy.getPropertyProxy(descriptor.getIdentifier());
                Operation setValue = propertyProxy.prepareSetModelObjectOperation(newValue);
                context.executeOperation(setValue);
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     * Respond to changes in the selected variant.
     */
    private void selectedVariantChanged(BuilderSelectionEvent event) {
        handlingPropertyChanges = false;

        BeanProxy oldVariant =
                (BeanProxy) (event == null ? null : event.getOldSelection());
        BeanProxy newVariant = context.getSelectedVariant();

        Proxy oldType = null;
        if (oldVariant != null) {
            oldVariant.removeListener(readOnlyListener);

            oldType = oldVariant.getPropertyProxy(PolicyModel.VARIANT_TYPE);
            oldType.removeListener(typeListener);
        }

        if (newVariant == null) {
            composite.clear();
            setEnabled(false);
        } else {

            // Assume that all the controls are enabled.
            setEnabled(true);

            // The variant type has changed then make sure that the controls
            // are enabled properly.
            Proxy newType =
                newVariant.getPropertyProxy(PolicyModel.VARIANT_TYPE);
            boolean newTypeIsNull = newType.getModelObject() == VariantType.NULL;

            BeanProxy metadata = getMetadataProxy();

            if (metadata == null || newTypeIsNull) {
                composite.clear();
                setEnabled(false);
            } else {
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     */
    private boolean updateMetaDataProxy(Object newVariantType) {
        boolean enabled;
        if (newVariantType == VariantType.NULL) {

            BeanProxy selectedVariant = context.getSelectedVariant();
            if (selectedVariant != null) {
                BaseProxy metadataBase =
                    (BaseProxy)selectedVariant
                        .getPropertyProxy(PolicyModel.META_DATA);
                if (metadataBase != null) {
                    Operation setValue =
                        metadataBase.prepareSetModelObjectOperation(null);
                    context.executeOperation(setValue);
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     * Gets the metadata proxy for the currently selected variant.
     *
     * @return The metadata proxy, or null if none exists
     */
    private BeanProxy getMetadataProxy() {
        BeanProxy metadataProxy = null;
        BeanProxy selectedVariant = context.getSelectedVariant();
        if (selectedVariant != null) {
            BaseProxy metadataBase = (BaseProxy) selectedVariant.getPropertyProxy(PolicyModel.META_DATA);
            if (metadataBase != null) {
                metadataProxy = (BeanProxy) metadataBase.getConcreteProxy();
                // If we have no concrete metadata, create an empty one of the
                // appropriate type unless the data is read only or the variant
                // type precludes this.
                Proxy typeProxy = selectedVariant.getPropertyProxy(PolicyModel.VARIANT_TYPE);
                if (metadataProxy == null && !metadataBase.isReadOnly() &&
                        typeProxy.getModelObject() != VariantType.NULL) {
                    MetaDataBuilder metaDataBuilder = getDefaultMetaDataBuilder();
                    metadataBase.setModelObject(metaDataBuilder);

View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

                                          Object newValue) {
        if (handlingEvents) {
            PropertyIdentifier identifier = descriptor.getIdentifier();
            Proxy selectionProxy = getSelectionProxy();
            if (selectionProxy instanceof BeanProxy) {
                BeanProxy selectionBeanProxy = (BeanProxy) selectionProxy;
                if (selectionBeanProxy != null &&
                        selectionBeanProxy.getBeanClassDescriptor().
                        getPropertyDescriptor(identifier) != null) {
                    Proxy propertyProxy =
                            selectionBeanProxy.getPropertyProxy(identifier);
                    Operation setValue = propertyProxy.
                            prepareSetModelObjectOperation(newValue);
                    context.executeOperation(setValue);
                }
            }
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.