Package com.volantis.mcs.themes

Examples of com.volantis.mcs.themes.StyleTime


        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_DURATION);

        if (styleValue != null) {
            if (styleValue instanceof StyleTime) {
                StyleTime styleTime = (StyleTime) styleValue;

                duration = styleTime.getNumber();
            }
        }

        return duration;
    }
View Full Code Here


        StyleValue styleValue = getStyleValue(StylePropertyDetails.MCS_SLIDESHOW_LAUNCH_DELAY);

        if (styleValue != null) {
            if (styleValue instanceof StyleTime) {
                StyleTime styleTime = (StyleTime) styleValue;

                delay = styleTime.getNumber();
            }
        }

        return delay;
    }
View Full Code Here

            StyleValue styleDenominator = styleFraction.getDenominator();
           
            if ((styleNumerator instanceof StyleLength) &&
                    (styleDenominator instanceof StyleTime)) {
                StyleLength styleLength = (StyleLength) styleNumerator;
                StyleTime styleTime = (StyleTime) styleDenominator;

                // Convert time to seconds.
                double timeInSeconds = timeConverter.convert(styleTime.getNumber(), styleTime.getUnit(), TimeUnit.S);

                // If conversion succeded...
                if (!Double.isNaN(timeInSeconds)) {
                    // Return speed in em/sec.
                    if (styleLength.getUnit() == LengthUnit.EM) {
View Full Code Here

        return effectStyle;
    }

    private double getEffectDuration(StyleValue styleValue) {

        StyleTime styleTime = null;
       
        if (styleValue instanceof StyleTime) {
            styleTime = (StyleTime) styleValue;
        } else {           
            logger.warn("unexpected-mcs-effect-duration-type",
                    styleValue.getStyleValueType().getType());
            styleTime = DEFAULT_MCS_EFFECT_DURATION;
        }
       
        return timeConverter.convert(styleTime.getNumber(),
                styleTime.getUnit(), TimeUnit.S);
    }
View Full Code Here

        double value = defaultTime;

        StyleValue styleValue = getStyleValue(property);
       
        if ((styleValue != null) && (styleValue instanceof StyleTime)) {
            StyleTime styleTime = (StyleTime) styleValue;

            value = timeConverter.convert(styleTime.getNumber(), styleTime
                    .getUnit(), unit);
        }

        return value;
    }
View Full Code Here

TOP

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

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.