Package com.volantis.mcs.protocols.widgets

Examples of com.volantis.mcs.protocols.widgets.JavaScriptStringFactory


    /**
     * Generates JavaScript representations of this class
     */   
    public String toScriptConstructor() {
        JavaScriptStringFactory jsf = JavaScriptStringFactory.getInstance();
        StringBuffer ctor = new StringBuffer("new Widget.EffectRule(");               
        ctor.append(effectDesc.toScriptConstructor()).append(", ")
            .append(jsf.createJavaScriptString(repetitions)).append(", ")
            .append(jsf.createJavaScriptString(timeInSeconds))
            .append(")");
        return ctor.toString();
    }
View Full Code Here


            .append(")");
        return ctor.toString();
    }

    public String toString() {
        JavaScriptStringFactory jsf = JavaScriptStringFactory.getInstance();
        StringBuffer out = new StringBuffer("{");               
        out.append(effectDesc.toString()).append(", ")
           .append(jsf.createJavaScriptString(repetitions)).append(", ")
           .append(jsf.createJavaScriptString(timeInSeconds))
           .append("}");
        return out.toString();
    }
View Full Code Here

    /**
     * Generates JavaScript representations of this class
     */
    public String toScriptConstructor() {
        JavaScriptStringFactory jsf = JavaScriptStringFactory.getInstance();
        StringBuffer ctor = new StringBuffer("new Widget.EffectDesc(");
        ctor.append(jsf.createJavaScriptString(name)).append(", ")           
            .append(jsf.createJavaScriptString(direction)).append(", ")           
            .append(duration).append(", ")           
            .append(fps).append(", ")           
            .append((null != params) ? params.toScript() : "null")
            .append(")");           
        return ctor.toString();
View Full Code Here

            .append(")");           
        return ctor.toString();
    }

    public String toString() {
        JavaScriptStringFactory jsf = JavaScriptStringFactory.getInstance();
        StringBuffer out = new StringBuffer("{");
        out.append(jsf.createJavaScriptString(name)).append(", ")           
           .append(jsf.createJavaScriptString(direction)).append(", ")           
           .append(duration).append(", ")           
           .append(fps).append(", ")           
           .append((null != params) ? params.toString() : "null")
           .append("}");           
        return out.toString();
View Full Code Here

     * @param array [a,b,c]
     * @return "'a','b','c'"
     */
    protected String splitIds(String[] array) {
        StringBuffer ret = new StringBuffer();
        JavaScriptStringFactory jsStringFactory =
            JavaScriptStringFactory.getInstance();
        for (int i = 0 ; i < array.length-1 ; i++) {
            ret.append(jsStringFactory.createJavaScriptString(array[i]))
            .append(",");
        }
        ret.append(jsStringFactory.createJavaScriptString(array[array.length-1]));
        return ret.toString();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.protocols.widgets.JavaScriptStringFactory

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.