Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StylePercentage


            if (value instanceof StyleLength) {
                StyleLength length = (StyleLength)value;

                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());
View Full Code Here


            // device. Note that only a percentage width of 100% is valid.
            StyleValue paneWidth = styleProperties.getComputedValue(
                StylePropertyDetails.WIDTH);
            if (paneWidth instanceof StylePercentage) {

                StylePercentage percentage = (StylePercentage)paneWidth;
                validatePercentageValue(percentage);
                width = Integer.toString(
                            context.getDevice().getPixelsX()/PIXELS_PER_CHAR);
            } else {
                width = convertToCharCount(styleProperties.getComputedValue(
View Full Code Here

            // device. Note that only a percentage width of 100% is valid.
            StyleValue paneHeight = styleProperties.getComputedValue(
                    StylePropertyDetails.HEIGHT);
            if (paneHeight instanceof StylePercentage) {

                StylePercentage percentage = (StylePercentage)paneHeight;
                validatePercentageValue(percentage);
                height = Integer.toString(
                            context.getDevice().getPixelsY()/PIXELS_PER_CHAR);
            } else {
                height = convertToCharCount(styleProperties.getComputedValue(
View Full Code Here

                WIDTH, "100%", "10%", INNER);

        // ===================================================================
        //   Test when setting Styles values
        // ===================================================================
        StylePercentage optimizeValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 100);
        StylePercentage noOptValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 10);

        checkCanOptimizeWithParticularPropertyValues(StylePropertyDetails.WIDTH,
                optimizeValue, noOptValue, STYLES, INNER);
    }
View Full Code Here

        checkCanOptimizeWithParticularAttributeValues(WIDTH, "0", "10%", CELL);

        // ===================================================================
        //   Test when setting Styles values
        // ===================================================================
        StylePercentage optimizeValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 0);
        StylePercentage noOptValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 10);

        checkCanOptimizeWithParticularPropertyValues(StylePropertyDetails.WIDTH,
                optimizeValue, noOptValue, STYLES, INNER);
        checkCanOptimizeWithParticularPropertyValues(StylePropertyDetails.WIDTH,
View Full Code Here

                HEIGHT, "0", "10%", CELL);

        // ===================================================================
        //   Test when setting Styles values
        // ===================================================================
        StylePercentage optimizeValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 0);
        StylePercentage noOptValue =
            StyleValueFactory.getDefaultInstance().getPercentage(null, 10);

        checkCanOptimizeWithParticularPropertyValues(
                StylePropertyDetails.HEIGHT, optimizeValue, noOptValue,
                STYLES, INNER);
View Full Code Here

TOP

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

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.