Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StylePair


            boolean handled = false;
            if (newPropertyValue != null) {
                StyleValue newValue = newPropertyValue.getValue();
                if (newValue instanceof StylePair) {
                    StylePair pairValue = (StylePair) newValue;
                    updateEditorValue(first, pairValue.getFirst());
                    updateEditorValue(second, pairValue.getSecond());
                    Priority priority = newPropertyValue.getPriority();
                    boolean important = priority == Priority.IMPORTANT;
                    importantCheckbox.setSelection(important);
                    handled = true;
                } else if (newValue instanceof StyleFraction) {
View Full Code Here


        Element node = domFactory.createElement();
        node.setName("table");

        StyleValue first = styleValueFactory.getLength(null, 15, LengthUnit.PX);
       
        StylePair pair = styleValueFactory.getPair(first, null);

        renderer.apply(node, pair);
        assertEquals("Buffer should match",
                "<table cellspacing=\"15\"/>",
                DOMUtilities.toString(node));
View Full Code Here

        context.setFirstKeywordMapper(
                RuntimeBackgroundXPositionKeywordMapper.getSingleton());
        context.setSecondKeywordMapper(
                RuntimeBackgroundYPositionKeywordMapper.getSingleton());

        StylePair pair = styleValueFactory.getPair(first, second);
        context.renderValue(pair);
        assertEquals(expectedResult, context.getWriter().toString());

    }
View Full Code Here

    // Javadoc inherited.
    public String render(StyleValue value) {
       
        String result = null;
        if (value instanceof StylePair) {
            final StylePair pair = (StylePair) value;
            final StyleValue first = pair.getFirst();
            result = PIXELS_RENDERER.render(first);
        }
        return result;
    }
View Full Code Here

                LengthUnit.PX);

        StyleLength borderVerticalSpacing = styleValueFactory.getLength(null, 20,
                LengthUnit.PX);

        StylePair borderSpacing = styleValueFactory.getPair(
            borderHorizontalSpacing, borderVerticalSpacing);

        properties.setComputedValue(
                StylePropertyDetails.BORDER_SPACING, borderSpacing);
View Full Code Here

                LengthUnit.PX);

        StyleLength borderVerticalSpacing = styleValueFactory.getLength(null, 20,
                LengthUnit.PX);

        StylePair borderSpacing = styleValueFactory.getPair(
            borderHorizontalSpacing, borderVerticalSpacing);

        properties.setComputedValue(
                StylePropertyDetails.BORDER_SPACING, borderSpacing);
View Full Code Here

        StyleLength styleX = styleValueFactory.getLength(null, 25.0, LengthUnit.PX);

        StyleLength styleY = styleValueFactory.getLength(null, 50.0, LengthUnit.PX);

        StylePair pair = styleValueFactory.
                getPair(styleX, styleY);
        properties.setComputedValue(
                StylePropertyDetails.BACKGROUND_POSITION, pair);

        Element element = domFactory.createElement();
View Full Code Here

                pixels = convertToCharCount(length.pixels());
            } else if (value instanceof StylePercentage) {
                StylePercentage percent = (StylePercentage)value;
                validatePercentageValue(percent);
            } else if (value instanceof StylePair) {
                StylePair stylePair = (StylePair) value;
                String firstCharCount =
                        convertToCharCount(stylePair.getFirst());
                String secondCharCount =
                        convertToCharCount(stylePair.getSecond());

                pixels = Integer.toString(Integer.parseInt(firstCharCount) +
                        Integer.parseInt(secondCharCount));
            }
        }
View Full Code Here

TOP

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

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.