Package com.volantis.mcs.protocols.widgets.styles

Examples of com.volantis.mcs.protocols.widgets.styles.EffectRule


    protected String getEffectRulesList(StylesExtractor stylesExtractor){
        StringBuffer result = new StringBuffer();
        Iterator effectsIterator = stylesExtractor.getEffectRules().iterator();
        result.append("[");
        while(effectsIterator.hasNext()){
            EffectRule rule = (EffectRule)effectsIterator.next();
            result.append(rule.toScriptConstructor());
            if(effectsIterator.hasNext()){
                result.append(",");
            }
        }
        result.append("]");
View Full Code Here


   
            String effectStyle = getEffectStyle(effectValue);           
            double duration = getEffectDuration(durationValue);
            double fps = getFrameRate(fpsValue);
           
            EffectRule rule = EffectRule.parse(effectStyle);
            rule.setDuration(duration);
            rule.setFps(fps);
   
            resultList.add(rule);
        }
        return resultList;
    }
View Full Code Here

        StyleValueFactory.getDefaultInstance();   
  
    public void testStyleListExtractor()  throws Exception {
        List expectedList = new ArrayList();
       
        expectedList.add(new EffectRule(
                new EffectDescriptor("none", null, 1.0, 1.0, null),
                "none",
                "none"));
        expectedList.add(new EffectRule(
                new EffectDescriptor("grow", "top-left", 2.0, 2.0, null),
                "none",
                "8"));       
        String randomParams = "wipe- top, wipe-top, slide-left, slide-right, random";
        EffectParameters params
            = EffectParameters.getParser("random").parse(randomParams);
        expectedList.add(new EffectRule(
                new EffectDescriptor("random", null, 3.0, 3.0, params),
                "16",
                "none"));
               
        List frameList = new ArrayList();
View Full Code Here

    }

    public void testDefaultStyleListExtractor(){
        List expectedList = new ArrayList();
       
        expectedList.add(new EffectRule(
                new EffectDescriptor("none", null, 1.0, 10.0, null),
                "none",
                "none"));
        expectedList.add(new EffectRule(
                new EffectDescriptor("grow", "top-left", 1.0, 10.0, null),
                "none",
                "8"));
        expectedList.add(new EffectRule(
                new EffectDescriptor("grow", "center", 1.0, 10.0 , null),
                "10",
                "none"));
       
        List effectList = new ArrayList();
View Full Code Here

   
    public void testFillWithDefaultValues(){
        List expectedList = new ArrayList();
       
        expectedList.add(new EffectRule(
                new EffectDescriptor("none", null, 5.0, 15.0, null),
                "none",
                "none"));
        expectedList.add(new EffectRule(
                new EffectDescriptor("grow", "top-left", 5.0, 10.0, null),
                "none",
                "8"));
        expectedList.add(new EffectRule(
                new EffectDescriptor("grow", "center", 1.0, 10.0 , null),
                "10",
                "none"));
 
        List effectList = new ArrayList();
View Full Code Here

   
    public void testDefaultEffect() throws Exception {       
        StylesMock styles = buildEffectStyles(null, null, null);
        StylesExtractor extractor = new StylesExtractor(styles);

        EffectRule rule = checkAndGetRule(extractor);
        assertEquals(createEffectRule(), rule);
    }
View Full Code Here

    
    public void testSimpleEffect() throws Exception {
        StylesMock styles = buildEffectStyles(MCSEffectStyleKeywords.PULSATE, null, null);
        StylesExtractor extractor = new StylesExtractor(styles);

        EffectRule rule = checkAndGetRule(extractor);
        assertEquals(createEffectRule("pulsate"), rule);
    }
View Full Code Here

  
    public void testEffectWithDirection() throws Exception {
        StylesMock styles = buildEffectStyles(MCSEffectStyleKeywords.GROW_CENTER, null, null);
        StylesExtractor extractor = new StylesExtractor(styles);

        EffectRule rule = checkAndGetRule(extractor);
        assertEquals(createEffectRule("grow", "center"), rule);
    }
View Full Code Here

 
    public void testEffectWithDoubleDirection() throws Exception {
        StylesMock styles = buildEffectStyles(MCSEffectStyleKeywords.GROW_TOP_LEFT, null, null);
        StylesExtractor extractor = new StylesExtractor(styles);

        EffectRule rule = checkAndGetRule(extractor);
        assertEquals(createEffectRule("grow", "top-left"), rule);
    }
View Full Code Here

        assertTrue(effects.get(0) instanceof EffectRule);
        return (EffectRule)effects.get(0);        
    }

    private EffectRule createEffectRule(String name, String direction,  double duration, double fps) {
        return new EffectRule(
            new EffectDescriptor(name, direction, duration, fps, null),
            "none",
            "none");
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.styles.EffectRule

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.