Examples of StyleKeyword


Examples of com.volantis.mcs.themes.StyleKeyword

        final AllowableKeywords allowableKeywords =
                property.getStandardDetails().getAllowableKeywords();
        if (allowableKeywords != null) {
            List keywords = allowableKeywords.getKeywords();
            for (int i = 0; i < keywords.size(); i++) {
                StyleKeyword keyword = (StyleKeyword) keywords.get(i);

                final String externalName =
                            CSS_NAME_MAPPER.getExternalString(property);
                String externalKeywordName =
                        CSS_NAME_MAPPER.getExternalString(keyword);
                String policy = "x-css.properties." + externalName +
                        ".keyword." + externalKeywordName + ".support";

                String value = getAncestorPolicyValue(device, policy);

                if ("full".equals(value)) {
                    // Add the property definition to the css version.
                    cssProperty.addKeyword(keyword);
                    if (logger.isDebugEnabled()) {
                        logger.debug("Adding device CSS property '" +
                                property.getName() + "' keyword '" +
                                keyword.getName() + "'");
                    }
                } else if ("none".equals(value)) {
                    // Remove the property definiton from the css version.
                    cssProperty.removeKeyword(keyword);
                    if (logger.isDebugEnabled()) {
                        logger.debug("Removing device CSS property '" +
                                property.getName() + "' keyword '" +
                                keyword.getName() + "'");
                    }
                } else if (value == null || "default".equals(value)) {
                    // Leave the original definition.

                } else {
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

    public String getDateTimeFormat() {
        String format = null;
        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_DATETIME_FORMAT);
        if (styleValue instanceof StyleKeyword) {
            StyleKeyword styleKeyword = (StyleKeyword) styleValue;
       
            if ("normal".equals(styleKeyword.getName())) {
                format = new String("%D %d %m %Y %h:%i:%s");
            }
        } else if (styleValue != null) {
            if (styleValue instanceof StyleString) {
                StyleString styleString = (StyleString)styleValue;
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_MARQUEE_REPETITION);

        if (styleValue != null) {
            if (styleValue instanceof StyleKeyword) {
                StyleKeyword styleKeyword = (StyleKeyword) styleValue;

                if ("infinite".equals(styleKeyword.getName())) {
                    repetitions = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_REPETITIONS);

        if (styleValue != null) {
            if (styleValue instanceof StyleKeyword) {
                StyleKeyword styleKeyword = (StyleKeyword) styleValue;

                if ("infinite".equals(styleKeyword.getName())) {
                    repetitions = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_ITEM_LIMIT);

        if (styleValue != null) {
            if (styleValue instanceof StyleKeyword) {
                StyleKeyword styleKeyword = (StyleKeyword) styleValue;

                if ("infinite".equals(styleKeyword.getName())) {
                    limits = Integer.MAX_VALUE;
                }
            } else if (styleValue instanceof StyleInteger) {
                StyleInteger styleInteger = (StyleInteger) styleValue;
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

       
        StyleValue styleValue = getStyleValue(property);
       
        if (styleValue != null) {
            if  (styleValue instanceof StyleKeyword) {
                StyleKeyword styleKeyword = (StyleKeyword) styleValue;
               
                result = (styleKeyword == keyword);
               
            } else if (styleValue instanceof StyleList) {
                StyleList styleList = (StyleList) styleValue;
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

    /**
     * Tests the values rendered for left and bottom value is correct.
     */
    public void testRenderLeftBottomValue() throws Exception {
        StyleKeyword styleValueXPosition = BackgroundXPositionKeywords.LEFT;
        StyleKeyword styleValueYPosition = BackgroundYPositionKeywords.BOTTOM;
        stylePairTest(styleValueXPosition, styleValueYPosition, "0% 100%");
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

     * Tests the values rendered for  a number and Top value is correct.
     */
    public void testRenderNumberTopValue() throws Exception {
        StyleLength styleValueXPosition = styleValueFactory.getLength(null, 20.0, LengthUnit.PX);

        StyleKeyword styleValueYPosition = BackgroundYPositionKeywords.TOP;
        stylePairTest(styleValueXPosition, styleValueYPosition, "20px 0%");
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

    /**
     * Tests the values rendered for Center and number value is correct.
     */
    public void testRenderCenterNumberValue() throws Exception {
        StyleKeyword styleValueXPosition = BackgroundXPositionKeywords.CENTER;

        StyleLength styleValueYPosition = styleValueFactory.getLength(null, 32.1, LengthUnit.EM);
        stylePairTest(styleValueXPosition, styleValueYPosition, "50% 32.1em");
    }
View Full Code Here

Examples of com.volantis.mcs.themes.StyleKeyword

    /**
     * Tests the values rendered for Right and number value is correct.
     */
    public void testRenderRightNumberValue() throws Exception {
        StyleKeyword styleValueXPosition = BackgroundXPositionKeywords.RIGHT;

        StyleLength styleValueYPosition = styleValueFactory.getLength(null, 18.1, LengthUnit.MM);
        stylePairTest(styleValueXPosition, styleValueYPosition, "100% 18.1mm");
    }
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.