Examples of MutableStyleProperties


Examples of com.volantis.mcs.themes.MutableStyleProperties

    public void activate(StyleSheet styleSheet) {
        List rules = styleSheet.getRules();
        for (Iterator i = rules.iterator(); i.hasNext();) {
            Rule rule = (Rule) i.next();
            MutableStyleProperties properties = (MutableStyleProperties)
                    rule.getProperties();

            // Although it is a little stupid it is allowed, at least for now
            // to have no properties for a selector.
            if (properties != null) {
                Iterator p = properties.propertyValueIterator();
                while (p.hasNext()) {
                    PropertyValue propertyValue = (PropertyValue) p.next();
                    StyleProperty property = propertyValue.getProperty();
                    StyleValue value = propertyValue.getValue();
                    StyleValue activated = activateStyleValue(property, value);
                    if (activated != value) {
                        propertyValue =
                            ThemeFactory.getDefaultInstance().createPropertyValue(
                                property, activated,
                                propertyValue.getPriority());
                        properties.setPropertyValue(propertyValue);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

        // =====================================================================
        //   Test Expectations
        // =====================================================================

        MutableStyleProperties properties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();
        properties.setPropertyValue(normalPropertyValue);
        properties.setPropertyValue(importantPropertyValue);

        doSplitterTest(properties, new PropertyValue[]{importantPropertyValue},
                new PropertyValue[]{normalPropertyValue});

    }
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

        PropertyValue fontWeight =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                StylePropertyDetails.FONT_WEIGHT,
                FontWeightKeywords.BOLD, Priority.IMPORTANT);

        MutableStyleProperties properties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();
        properties.setPropertyValue(systemFont);
        properties.setPropertyValue(fontSize);
        properties.setPropertyValue(fontWeight);

        doSplitterTest(properties,
                new PropertyValue[]{
                    fontWeight,
                },
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

        PropertyValue fontWeight =
            ThemeFactory.getDefaultInstance().createPropertyValue(
                StylePropertyDetails.FONT_WEIGHT,
                FontWeightKeywords.BOLD, Priority.IMPORTANT);

        MutableStyleProperties properties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();
        properties.setPropertyValue(systemFont);
        properties.setPropertyValue(fontSize);
        properties.setPropertyValue(fontWeight);

        doSplitterTest(properties,
                new PropertyValue[]{
                    ThemeFactory.getDefaultInstance().createPropertyValue(
                        StylePropertyDetails.FONT_FAMILY,
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

        styleSheet.addRule(rule);
    }

    public StyleProperties createStyleProperties(Format format) {

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        initialiseStyleProperties(styleProperties, format);

        return styleProperties;
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

    public void addRules(StyleSheet styleSheet, Format format) {

        Rule rule = createRuleWithoutProperties(format);

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        // At the moment a spatial is equivalent to a CSS table but there is
        // really no reason why it could not also be a block.
        initialiseCommonProperties(styleProperties, format,
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

    }

    public void addRules(StyleSheet styleSheet, Format format) {
        Rule rule = createRuleWithoutProperties(format);

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        // A grid is equivalent to a CSS table.
        initialiseCommonProperties(styleProperties, format,
                DisplayKeywords.TABLE);
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

        List selectors = new ArrayList();
        selectors.add(selector);
        rule.setSelectors(selectors);

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        // A grid cell is equivalent to a CSS table cell.
        styleProperties.setStyleValue(StylePropertyDetails.DISPLAY,
                DisplayKeywords.TABLE_CELL);

        StyleValue value;
        if (child != null) {
            value = converter.getHorizontalAlign(child.getHorizontalAlignment());
            if (value != null) {
                styleProperties.setStyleValue(StylePropertyDetails.TEXT_ALIGN,
                                              value);
            }

            value = converter.getVerticalAlign(child.getVerticalAlignment());
            if (value != null) {
                styleProperties.setStyleValue(StylePropertyDetails.VERTICAL_ALIGN,
                                              value);
            }
        }

        // Apply the cell padding from the grid as padding on the cells.
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

    }

    private void addRowRules(StyleSheet styleSheet, Row row) {
        Rule rule = createRuleWithoutProperties(row);

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        // A grid row is equivalent to a CSS table row.
        styleProperties.setStyleValue(StylePropertyDetails.DISPLAY,
                DisplayKeywords.TABLE_ROW);

        StyleValue value = converter.getDimensionValue(row.getHeight(),
                row.getHeightUnits());
        if (value != null) {
            styleProperties.setStyleValue(StylePropertyDetails.HEIGHT, value);
        }

        rule.setProperties(styleProperties);
        styleSheet.addRule(rule);
    }
View Full Code Here

Examples of com.volantis.mcs.themes.MutableStyleProperties

    }

    private void addColumnRules(StyleSheet styleSheet, Column column) {
        Rule rule = createRuleWithoutProperties(column);

        MutableStyleProperties styleProperties =
            ThemeFactory.getDefaultInstance().createMutableStyleProperties();

        StyleValue value = converter.getDimensionValue(column.getWidth(),
                column.getWidthUnits());
        if (value != null) {
            styleProperties.setStyleValue(StylePropertyDetails.WIDTH, value);
        }

        rule.setProperties(styleProperties);
        styleSheet.addRule(rule);
    }
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.