Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleProperties


        if (styles != null) {
            styles.iterate(new PseudoStylePathIteratee() {
                public void next(PseudoStylePath pseudoPath) {
                    buffer.append(pseudoPath);
                    buffer.append("{");
                    StyleProperties properties =
                            styles.getPathProperties(pseudoPath);
                    buffer.append(properties.getStandardCSS());
                    buffer.append("},");
                }
            });
//        } else {
//            buffer.append("[STYLES=NULL]");
View Full Code Here


            }

            // Put the standard selector rules onto the styled element
            if (selectorBlock != null) {
                // Parse the values into a properties object.
                StyleProperties properties = parser.parseDeclarations(
                        selectorBlock);

                // Translate that to a property values object.
                setComputedValuesFromProperties(styles, properties, specified);
            }
View Full Code Here

        List stylers = new ArrayList();
        List rules = styleSheet.getRules();
        for (Iterator i = rules.iterator(); i.hasNext();) {
            Rule rule = (Rule) i.next();
            List selectors = rule.getSelectors();
            StyleProperties properties = rule.getProperties();

            if (properties != null) {
                addStylers(properties, selectors, source, stylers);
            }
        }
View Full Code Here

        Map propertiesToRule = new HashMap();
        Iterator rules = styleSheet.getRules().iterator();
        while (rules.hasNext()) {
            Rule rule = (Rule) rules.next();
            StyleProperties properties = rule.getProperties();
            // If the theme already has a rule with this properties ...
            Rule existingRule = (Rule) propertiesToRule.get(properties);
            if (existingRule != null) {
                // ... then we should add this rule's selectors to the existing
                // rule with those properties and throw this rule away.
View Full Code Here

     * @param element
     */
    public IterationAction next(OutputStyledElement element) {
        OutputStyles styles = element.getStyles();
        if (styles != null && !styles.isEmpty()) {
            StyleProperties properties =
                styles.getPathProperties(PseudoStylePath.EMPTY_PATH);
            try {
                element.getElement().setAttribute("style",
                        renderProperties(properties));
            } catch (IOException e){
View Full Code Here

                        elementTypeMatcher.match(selectorSequence.getType());

                // Calculate the intersection of all the sets of properties
                // associated with the matching entities to determine whether
                // the entities have any properties in common.
                StyleProperties commonProperties =
                        intersectionCalculator.intersection(
                                typedElementSubset, selectorSequence);

                // If we found some properties which were common in every
                // member of the set of properties for this selector...
View Full Code Here

     * @return StyleProperties that wraps the properties.
     */
    public static StyleProperties wrap(
            final PropertyValues propertyValues) {

        return new StyleProperties() {

            // Javadoc inherited.
            public boolean isEmpty() {
                return propertyValues.isEmpty();
            }
View Full Code Here

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

        StyleProperties styleProperties = createStyleProperties(format);
        rule.setProperties(styleProperties);

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

TOP

Related Classes of com.volantis.mcs.themes.StyleProperties

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.