Package com.volantis.mcs.eclipse.builder.editors.common

Examples of com.volantis.mcs.eclipse.builder.editors.common.PropertiesComposite


    public void setStyleProperties(BeanProxy styleProperties) {
        this.styleProperties = styleProperties;
        if (styleProperties != null) {
            Iterator it = categoryComposites.values().iterator();
            while (it.hasNext()) {
                PropertiesComposite composite = (PropertiesComposite) it.next();
                composite.setEnabled(isEnabled());
                composite.updateFromProxy(styleProperties);
            }
            styleCategoriesComposite.setEnabled(true);
            styleCategoriesComposite.redraw();
        } else {
            Iterator it = categoryComposites.values().iterator();
            while (it.hasNext()) {
                PropertiesComposite composite = (PropertiesComposite) it.next();
                composite.clear();
                composite.setEnabled(false);
            }
            styleCategoriesComposite.setEnabled(false);
            styleCategoriesComposite.redraw();
        }
    }
View Full Code Here


                    PropertyDescriptor[] descriptors = new PropertyDescriptor[propertyDescriptors.size()];
                    descriptors = (PropertyDescriptor[]) propertyDescriptors.toArray(descriptors);

                    // build the category
                    categoryComposite = new PropertiesComposite(categoryContainer, SWT.NONE, descriptors, context, category.isIsSynchronizable());
                    categoryComposite.setBackground(getDisplay().
                            getSystemColor(SWT.COLOR_LIST_BACKGROUND));

                    // store the category composite in the map
                    categoryComposites.put(category, categoryComposite);

                    // disable the composite if there are no rules selected
                    categoryComposite.setEnabled(styleProperties != null && isEnabled());

                    PropertiesComposite propertiesComposite = (PropertiesComposite) categoryComposite;
                    if (styleProperties != null) {
                        propertiesComposite.updateFromProxy(styleProperties);
                    }
                    propertiesComposite.addPropertiesCompositeChangeListener(new PropertiesCompositeChangeListener() {
                        public void propertyChanged(PropertiesComposite composite, PropertyDescriptor property, Object newValue) {
                            stylePropertyChanged(composite, property.getIdentifier());
                        }
                    });
                }
View Full Code Here

        Set styleCategories = categoryComposites.keySet();
        Iterator it = styleCategories.iterator();
        boolean seekingProperty = true;
        while (it.hasNext() && seekingProperty) {
            StyleCategory category = (StyleCategory) it.next();
            PropertiesComposite composite = (PropertiesComposite) categoryComposites.get(category);
            Set styleProperties = composite.getSupportedPropertyIdentifiers();
            Iterator propertiesIterator = styleProperties.iterator();
            while (propertiesIterator.hasNext()) {
                PropertyIdentifier identifier = (PropertyIdentifier) propertiesIterator.next();
                if (identifier.getName().equals(propertyName)) {
                    seekingProperty = false;
                    styleCategoriesComposite.selectCategory(category);
                    composite.selectProperty(identifier);
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.eclipse.builder.editors.common.PropertiesComposite

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.