Package com.volantis.styling

Examples of com.volantis.styling.StylesMerger.merge()


        Styles contentStyles = listItemStyles;

        // Styles for the list item are calculated by overriding the styles
        // for the list item with the styles from the marker. This will
        // modify and return the marker styles.
        listItemStyles = stylesMerger.merge(markerStyles, listItemStyles);

        // Update the list item styles associated with the element.
        element.setStyles(listItemStyles);

        DOMFactory domFactory = element.getDOMFactory();
View Full Code Here


                // save the display style property value as the parent.setStyles
                // may change it and we don't want that
                final StyleValue oldValue =
                    parent.getStyles().getPropertyValues().getStyleValue(
                        StylePropertyDetails.DISPLAY);
                parent.setStyles(merger.merge(attributes.getStyles(),
                        parent.getStyles()));
                parent.getStyles().getPropertyValues().
                    setComputedAndSpecifiedValue(StylePropertyDetails.DISPLAY, oldValue);
            } else if (rendering == PaneRendering.CREATE_ENCLOSING_ELEMENT) {
                // write out a div element so that the wrapped elements
View Full Code Here

        // preserve any Styles information on the pane element
        if (styles != null) {
            StylesMerger merger = StylingFactory.getDefaultInstance().
                    getStylesMerger();
            final Styles mergedStyles = merger.merge(
                    styles, element.getStyles());
            // restore the table-cell display style
            mergedStyles.getPropertyValues().setComputedValue(
                StylePropertyDetails.DISPLAY, DisplayKeywords.TABLE_CELL);
            mergedStyles.getPropertyValues().setSpecifiedValue(
View Full Code Here

        private void promoteStylesAsNeeded(Element innerDiv,
                                           Element outerDiv) {
            if (innerDiv.getStyles() != null) {
                StylesMerger merger = StylingFactory.
                        getDefaultInstance().getStylesMerger();
                outerDiv.setStyles(merger.merge(innerDiv.getStyles(),
                        outerDiv.getStyles()));
            }
        }

        /**
 
View Full Code Here

                    if (newParent.getName() != null) {
                        // new parent is not null named, and will appear in the
                        // output, therefore the styles can be pushed up
                        StylesMerger merger = StylingFactory.
                                getDefaultInstance().getStylesMerger();
                        newParent.setStyles(merger.merge(styles,
                                newParent.getStyles()));
                    } else {
                        // the new parent is null named, and will not appear in
                        // the output, so the styles should be pushed down to
                        // be preserved. merge the element's styles with those
View Full Code Here

    public void visit(Element element) {
        Element parent = element.getParent();
        StylesMerger merger = StylingFactory.
                getDefaultInstance().getStylesMerger();
        Styles mergedStyles = merger.merge(element.getStyles(),
                parent.getStyles());
        element.setStyles(mergedStyles);
    }
}
View Full Code Here

        if (originalParentStyles != null) {
            StylesMerger merger =
                    StylingFactory.getDefaultInstance().getStylesMerger();
            final Styles oldTableStyles = table.getStyles();
            final Styles tableStyles =
                    merger.merge(oldTableStyles, originalParentStyles);

            // Make sure that the table gets the correct display.
            tableStyles.getPropertyValues().setComputedValue(
                    StylePropertyDetails.DISPLAY, DisplayKeywords.TABLE);
            table.setStyles(tableStyles);
View Full Code Here

        Element row = cell.getParent();
        Element tableSection = row.getParent();

        // 1. containing row
        preserveStyleAttributes(cell, row, attributes);
        mergedStyles = merger.merge(cellStyles, row.getStyles());

        if (tableSection != table) {
            // 2. optional containing table section
            preserveStyleAttributes(cell, tableSection, attributes);
            mergedStyles = merger.merge(mergedStyles, tableSection.getStyles());
View Full Code Here

        mergedStyles = merger.merge(cellStyles, row.getStyles());

        if (tableSection != table) {
            // 2. optional containing table section
            preserveStyleAttributes(cell, tableSection, attributes);
            mergedStyles = merger.merge(mergedStyles, tableSection.getStyles());
        }

        // 3. containing table
        preserveStyleAttributes(cell, table, attributes);
View Full Code Here

        // 3. containing table
        preserveStyleAttributes(cell, table, attributes);


        mergedStyles = merger.merge(mergedStyles, table.getStyles());

        // 4. original cell
        preserveStyleAttributes(cell, originalCell, attributes);
        if (firstRow) {
            mergeSizeAttribute(cell, originalCell, "width",
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.