Examples of ItsNatSVGOMDocumentBatik


Examples of org.itsnat.batik.applet.ItsNatSVGOMDocumentBatik

        registerXMLHttpRequest(winWrapper);

        canvas.createWrapperDocuments();

        ItsNatSVGOMDocumentBatik batikDoc = canvas.getItsNatSVGOMDocumentBatik();
        // Cambiamos "document" por el nuestro que exporta getItsNatDoc() via Java para obtener
        // el objeto gestor del documento de ItsNat.
        // Podríamos no recubrir con javaToJS y funcionaría igual excepto un detalle,
        // el typeof NO funciona, si es recubierto el typeof devuelve "object".
View Full Code Here

Examples of org.itsnat.batik.applet.ItsNatSVGOMDocumentBatik

        // http://xmlgraphics.apache.org/batik/faq.html#display-does-not-update
        // http://xmlgraphics.apache.org/batik/faq.html#must-mouseover-to-change

        final Scriptable thisObj = getScriptable();

        final ItsNatSVGOMDocumentBatik batikDoc = getItsNatSVGOMDocBatikInBrowser().getItsNatSVGOMDocumentBatik();
        JSVGCanvasApplet canvas = batikDoc.getJSVGCanvasApplet();
        UpdateManager um = canvas.getUpdateManager();
        RunnableQueue queue = um.getUpdateRunnableQueue();
        try
        {
            queue.invokeAndWait(
                new Runnable()
                {
                    public void run()
                    {
                        Object[] jsParams;
                        if (params != null)
                        {
                            if (params.length == 0) jsParams = params;
                            else
                            {
                                jsParams = new Object[params.length];
                                for(int i = 0; i < params.length; i++)
                                {
                                    Object param = params[i];
                                    if (param != null)
                                    {
                                        // Este es un intento de hacer lo más interoperable posible Batik y el browser
                                        if (param instanceof ObjectBatikInBrowser)
                                            jsParams[i] = ((ObjectBatikInBrowser)param).getScriptable();
                                        else
                                            jsParams[i] = param;
                                    }
                                }
                            }
                        }
                        else jsParams = new Object[0];

                        RhinoInterpreterFixed interpreter = batikDoc.getRhinoInterpreterFixed();
                        Function func = (Function)ScriptableObject.getProperty(thisObj,name);
                        res[0] = interpreter.callJSMethod(func, thisObj,params);
                    }
                }
            );
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.