Examples of BeanProxy


Examples of com.volantis.mcs.interaction.BeanProxy

                    setEmbeddedCheckbox(false);
                    setEmbeddedText("");
                    setURLText("");
                    setEnabled(false);
                } else {
                    BeanProxy selectedVariant = (BeanProxy) event.getSelection();
                    selectedVariant.addListener(readOnlyListener, false);
                    setDisplayContent(selectedVariant);
                    setEnabled(!selectedVariant.isReadOnly());
                }
            }
        });

        BeanProxy selectedVariant = this.context.getSelectedVariant();
        setEnabled(selectedVariant != null && !selectedVariant.isReadOnly());
    }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     * Called by null assset button listener to update the type of the currently
     * selected variant. Toggles variant type between NULL and the default
     * type specified in the context object.
     */
    private void updateVariantType() {
        BeanProxy selectedVariant = context.getSelectedVariant();
        Proxy variantType = selectedVariant.getPropertyProxy(PolicyModel.VARIANT_TYPE);
        if (nullCheckbox.getSelection()) {
            variantType.setModelObject(VariantType.NULL);
        } else {
            VariantType defaultType = context.getDefaultVariantType();
            variantType.setModelObject(defaultType);
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     */
    private void updateThemeModel() {
        BaseProxy baseContentProxy = (BaseProxy) context.getSelectedVariant().getPropertyProxy(PolicyModel.CONTENT);
        Proxy contentProxy = baseContentProxy.getConcreteProxy();
        if (contentProxy != null) {
            BeanProxy contentBeanProxy = (BeanProxy) contentProxy;
            Proxy importParent = contentBeanProxy.getPropertyProxy(ThemeModel.IMPORT_PARENT_DEVICE_THEME);
            importParent.setModelObject(Boolean.valueOf(importParentCheckbox.getSelection()));
        } else {
            // add a content builder to avoid "variant no content
            final ThemeContentBuilder contentBuilder =
                InternalPolicyFactory.getInternalInstance().
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     * variant.
     *
     * @param content The new content for the current variant
     */
    private void setModelContent(ContentBuilder content) {
        BeanProxy selectedVariant = context.getSelectedVariant();
        if (selectedVariant != null) {
            Proxy contentProxy = selectedVariant.getPropertyProxy(PolicyModel.CONTENT);
            Operation setContent = contentProxy.prepareSetModelObjectOperation(content);
            context.executeOperation(setContent);
        }
    }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

     *
     * @return The content builder for the currently selected variant
     */
    private ContentBuilder getModelContent() {
        ContentBuilder contentBuilder = null;
        BeanProxy selectedVariant = context.getSelectedVariant();
        if (selectedVariant != null) {
            Proxy contentProxy = selectedVariant.getPropertyProxy(PolicyModel.CONTENT);
            Object model = contentProxy.getModelObject();
            if (model instanceof ContentBuilder) {
                contentBuilder = (ContentBuilder) model;
            }
        }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

                    }

                    if (event.getSelection() == null) {
                        readOnly = true;
                    } else {
                        BeanProxy selectedVariant = (BeanProxy) event.getSelection();
                        selectedVariant.addListener(readOnlyListener, false);
                    }
                }
            });
            this.actions = actions;
        }
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

        }

        if (previouslySelectedBuilder == null) {
            context.setSelectedVariant(null);
        } else {
            BeanProxy modelProxy = (BeanProxy) context.getInteractionModel();
            ListProxy variants = (ListProxy)
                    modelProxy.getPropertyProxy(PolicyModel.VARIANTS);
            boolean setSelection = false;
            for (int i = 0; !setSelection && i < variants.size(); i++) {
                VariantBuilder builder = (VariantBuilder)
                        variants.getItemProxy(i).getModelObject();
                if (previouslySelectedBuilder.equals(builder)) {
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

                RESOURCE_PREFIX + "allToInherit.") {
            // Javadoc inherited
            public void run() {
                ISelection selection = categoryTreeViewer.getSelection();
                if (selection instanceof IStructuredSelection) {
                    BeanProxy stylePropertiesProxy =
                            (BeanProxy) stylePropertiesProxyProvider.getProxy();
                    IStructuredSelection structuredSelection =
                            (IStructuredSelection) selection;
                    Iterator categories = structuredSelection.iterator();
                    while (categories.hasNext()) {
                        StyleCategory category = (StyleCategory) categories.next();
                        Iterator it = category.getProperties().iterator();
                        while (it.hasNext()) {
                            StyleProperty details = (StyleProperty) it.next();
                            PropertyIdentifier identifier = ThemeModel.
                                getPropertyIdentifierForStyleProperty(details);
                            Proxy propertyProxy =
                                    stylePropertiesProxy.getPropertyProxy(identifier);
                            PropertyValue value =
                                ThemeFactory.getDefaultInstance().
                                    createPropertyValue(
                                        details, THEME_FACTORY.getInherit());
                            propertyProxy.setModelObject(value);
                        }
                    }
                    stylePropertiesProxyReceiver.setProxy(stylePropertiesProxy);
                }
            }
        };

        priorityAction = new ResourceAction(
                    ThemesMessages.getResourceBundle(),
                    RESOURCE_PREFIX + "allToImportant.") {
            // Javadoc inherited
            public void run() {
                ISelection selection = categoryTreeViewer.getSelection();
                if (selection instanceof IStructuredSelection) {
                    BeanProxy stylePropertiesProxy =
                            (BeanProxy) stylePropertiesProxyProvider.getProxy();
                    IStructuredSelection structuredSelection =
                            (IStructuredSelection) selection;
                    Iterator categories = structuredSelection.iterator();
                    while (categories.hasNext()) {
                        StyleCategory category = (StyleCategory) categories.next();
                        Iterator it = category.getProperties().iterator();
                        while (it.hasNext()) {
                            StyleProperty details = (StyleProperty) it.next();
                            PropertyIdentifier identifier = ThemeModel.
                                getPropertyIdentifierForStyleProperty(details);
                            Proxy propertyProxy =
                                    stylePropertiesProxy.getPropertyProxy(identifier);
                            PropertyValue value = (PropertyValue) propertyProxy.getModelObject();
                            if (value != null) {
                                value = ThemeFactory.getDefaultInstance().
                                    createPropertyValue(value.getProperty(),
                                        value.getValue(), Priority.IMPORTANT);
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

            public void run() {
                IStructuredSelection selection =
                        (IStructuredSelection) viewer.getSelection();

                Object[] selectedObjects = selection.toArray();
                BeanProxy theme = (BeanProxy) context.getInteractionModel();
                ListProxy variants = (ListProxy)
                        theme.getPropertyProxy(PolicyModel.VARIANTS);
                for (int i = 0; i < selectedObjects.length; i++) {
                    variants.removeItemProxy((Proxy) selectedObjects[i]);
                }
            }
        };
View Full Code Here

Examples of com.volantis.mcs.interaction.BeanProxy

                    if (contents != null && contents.length > 0) {
                        for (int i = 0; i < contents.length; i++) {
                            Object newAsset = contents[i];
                            if (newAsset instanceof VariantBuilder) {
                                BeanProxy theme = (BeanProxy) context.getInteractionModel();
                                ListProxy variants = (ListProxy)
                                        theme.getPropertyProxy(PolicyModel.VARIANTS);
                                // TODO better We should probably check that we have the right sort of variant (or at least a compatible one)
                                Operation addOperation = variants.prepareAddModelItemOperation(newAsset);
                                context.executeOperation(addOperation);
                            }
                        }
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.