Examples of pixels()


Examples of com.volantis.mcs.themes.StyleLength.pixels()

       
        String result = null;
        if (value instanceof StyleLength) {
            StyleLength length = (StyleLength) value;
            if (length.getUnit() == LengthUnit.PX) {
                result = StringConvertor.valueOf(length.pixels());
            }
        }
        return result;
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleLength.pixels()

            // React to LENGTH values. Note that percentage/em/ex sizes
            // and bolder/lighter are explicitly not handled here.
            StyleLength styleLength = (StyleLength) value;
            if (styleLength.getUnit() == LengthUnit.PX) {
                // Pixels
                int pixels = styleLength.pixels();
                result = determineFontSize(pixels,
                        PIXELS_FONT_SIZE_LOOKUP);
            } else if (styleLength.getUnit() == LengthUnit.PT) {
                // Points.
                double point = styleLength.getNumber();
View Full Code Here

Examples of com.volantis.mcs.themes.StyleLength.pixels()

    private int getPixelLength(StyleValue styleValue) {
        int value = 0;
        if (styleValue instanceof StyleLength) {
            StyleLength styleLength = (StyleLength) styleValue;
            if (styleLength.getUnit() == LengthUnit.PX) {
                value = styleLength.pixels();
            }
        }
        return value;
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleLength.pixels()

            StyleValue value) {
        if (value instanceof StyleLength) {
            StyleLength length = (StyleLength) value;
            if (length.getUnit() == LengthUnit.PX) {
                element.setAttribute(attribute,
                        String.valueOf(length.pixels()));
            }
        }
    }

    /**
 
View Full Code Here

Examples of com.volantis.mcs.themes.StyleLength.pixels()

        StyleValue value = styles.getStyleValue(
                StylePropertyDetails.MCS_PARAGRAPH_GAP);
        if (value instanceof StyleLength) {
            StyleLength length = (StyleLength) value;
            if (length.getUnit() == LengthUnit.PX) {
                int result = (length.pixels() + 1) / 2;
                element.setAttribute(attribute, String.valueOf(result));
            }
        }
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleLength.pixels()

        if (value != null) {
            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;
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.