Package com.volantis.styling.values

Examples of com.volantis.styling.values.MutablePropertyValues


                PseudoStyleEntity entity = entities[i];
                styles = styles.getNestedStyles(entity);
            }
        }

        MutablePropertyValues target = styles.getPropertyValues();

        for (int i = 0; i < propertyValues.length; i++) {
            PropertyValue propertyValue = propertyValues[i];
            target.setSpecifiedValue(propertyValue.getProperty(),
                    propertyValue.getValue());
        }
    }
View Full Code Here


            iterator = StylePropertyDetails.getDefinitions()
                    .stylePropertyIterator();
            parentValues = StylePropertyDetails.getDefinitions()
                    .getStandardDetailsSet().getRootStyleValues();
        } else {
            MutablePropertyValues parentPropertyValues =
                    parent.getPropertyValues();
            iterator = parentPropertyValues.stylePropertyIterator();
            parentValues = parentPropertyValues;
        }

        Styles styles = createInheritedStyles(iterator, parentValues, display);
View Full Code Here

            Iterator iterator, StyleValues parentValues,
            StyleKeyword display) {

        InitialValueFinder initialValueFinder = new InitialValueFinder();
        Styles styles = new StylesImpl();
        MutablePropertyValues propertyValues = styles.getPropertyValues();
        while (iterator.hasNext()) {
            StyleProperty property = (StyleProperty) iterator.next();
            StyleValue value;
            if (property.getStandardDetails().isInherited()) {
                value = parentValues.getStyleValue(property);
            } else  {
                value = initialValueFinder.getInitialValue(
                        propertyValues, property.getStandardDetails());
            }

            propertyValues.setComputedValue(property, value);
        }

        propertyValues.setComputedValue(StylePropertyDetails.DISPLAY, display);
        return styles;
    }
View Full Code Here

        checkValue(checker, DEFAULT_VALUE, PropertyStatus.REQUIRED);
    }

    private PropertyValues createDefaultParentValues() {

        final MutablePropertyValues propertyValues =
                STYLING_FACTORY.createPropertyValues();
        propertyValues.setComputedValue(STYLE_PROPERTY, DEFAULT_VALUE);
        return propertyValues;
    }
View Full Code Here

        return propertyValues;
    }

    private PropertyValues createOtherParentValues() {

        final MutablePropertyValues propertyValues =
                STYLING_FACTORY.createPropertyValues();
        propertyValues.setComputedValue(STYLE_PROPERTY, OTHER_VALUE);
        return propertyValues;
    }
View Full Code Here

        // this method. This must be done in order to preserve order which is
        // important for styling.
        int index = flattened.size();
        flattened.add(null);

        MutablePropertyValues inputValues = styles.findPropertyValues();

        styles.iterate(this);

        DeviceValues deviceValues = deviceStyles.getValues();
View Full Code Here

        final CSSParserFactory parserFactory = CSSParserFactory.getDefaultInstance();
        parser = parserFactory.createStrictParser();
    }

    public PropertyValues parseDeclarations(String css) {
        final MutablePropertyValues values = STYLING_FACTORY.createPropertyValues();
        final MutableStyleProperties properties = parser.parseDeclarations(css);
        properties.iteratePropertyValues(new PropertyValueIteratee() {
            public IterationAction next(PropertyValue propertyValue) {
                values.setComputedValue(propertyValue.getProperty(),
                        propertyValue.getValue());
                return IterationAction.CONTINUE;
            }
        });
View Full Code Here

        privateSetUp();
        protocol.setMarinerPageContext(pageContext);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        buffer.initialise();

        MutablePropertyValues tableCellProperties = createPropertyValues();
        tableCellProperties.setComputedValue(
                StylePropertyDetails.VERTICAL_ALIGN,
                VerticalAlignKeywords.BOTTOM);

        TableCellAttributes tableCellAttributes = new TableCellAttributes();
        tableCellAttributes.setStyles(StylesBuilder.getInitialValueStyles());
View Full Code Here

        privateSetUp();
        protocol.setMarinerPageContext(pageContext);
        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();
        buffer.initialise();

        MutablePropertyValues properties = createPropertyValues();

        // The middle attribute has to be set in the image attribute and not int the SSP
        // Since images do not go through the emulation renderer
        // - perhaps they will one day
        // ssp.setVerticalAlign(createKeywordStyleValue(
        //       VerticalAlignKeywordMapper.getSingleton(), "middle"));

        // this should be ignored - invalid.
        properties.setComputedValue(StylePropertyDetails.FONT_SIZE,
                FontSizeKeywords.SMALL);

        ImageAttributes imageAttributes = new ImageAttributes();
        imageAttributes.setSrc("images/background.jpg");
        imageAttributes.setAlign("middle");
View Full Code Here

        DoSelectInputTestHelper helper = new DoSelectInputTestHelper();

        XFSelectAttributes atts = helper.buildSelectAttributes();
        Styles styles = atts.getStyles();
        MutablePropertyValues propertyValues = styles.getPropertyValues();

        if (!multiSelect) {
            for (int i = 0; i < selectedOtions.length; i++) {
                if (selectedOtions[i]) {
                    atts.setInitial("Value" + (i + 1));
                    break;
                }
            }
        }

        atts.setMultiple(multiSelect);
        // add some options
        helper.addOption(atts, "Caption1", "Prompt1", "Value1",
                selectedOtions[0]);
        helper.addOption(atts, "Caption2", "Prompt2", "Value2",
                selectedOtions[1]);


        SelectOptionGroup group = null;
        String caption, prompt;
        int count = 0;
        do {
            caption = "Group" + (count + 1);
            prompt = "Prompt" + (count + 1);
            if (0 == count) {
                group = helper.addOptionGroup(atts, caption, prompt);
            } else {
                group = helper.addOptionGroup(group, caption, prompt);
            }
        } while (++count < optGroupCount);


        helper.addOption(group, "Caption3", "Prompt3", "Value3",
                selectedOtions[2]);

        TestDOMOutputBuffer buffer = new TestDOMOutputBuffer();

        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_SELECTION_LIST_STYLE,
                MCSSelectionListStyleKeywords.CONTROLS);
        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_SELECTION_LIST_OPTION_LAYOUT,
                rightAlignCaption ? MCSSelectionListOptionLayoutKeywords.CONTROL_FIRST
                : MCSSelectionListOptionLayoutKeywords.CAPTION_FIRST);
        propertyValues.setComputedValue(
                StylePropertyDetails.MCS_MENU_ORIENTATION,
                vertical ? MCSMenuOrientationKeywords.VERTICAL
                : MCSMenuOrientationKeywords.HORIZONTAL);

        TestMarinerPageContext testPageContext =
View Full Code Here

TOP

Related Classes of com.volantis.styling.values.MutablePropertyValues

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.