Hi James,
Thanks for your help. I am using JSVGComponent now. As you said, there are
no such exceptions anymore.  But there is a paint problem, too. After
rendering, the JSVGComponent is not painted in the JTree automatically. I
have call the paint method after the renderer sends its RenderingComplete
Event.



    jSVGComponent.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
      public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
        jSVGComponent.paint(tree.getGraphics());
      }
    });


I attached the source code, in case you are interested in that.

Thomas


(See attached file: Svg.zip)

Thomas Bitzer
EADS Dornier GmbH
D 88039 Friedrichshafen
Germany

Phone:    +49 7545 8-8537
Fax:         +49 7545 8-2443
e-Mail:  [EMAIL PROTECTED]


                                                                                       
                           
                    James                                                              
                           
                    McArthur             An:     Batik Users 
<[EMAIL PROTECTED]>                         
                    <james@pcorp.        Kopie:                                        
                           
                    com.au>              Thema:  Re: Repaint problems w/Batik 1.5b3    
                           
                                                                                       
                           
                    21.08.2002                                                         
                           
                    00:56                                                              
                           
                    Bitte                                                              
                           
                    antworten an                                                       
                           
                    "Batik Users"                                                      
                           
                                                                                       
                           
                                                                                       
                           




Hi,

On Tue, 2002-08-20 at 22:20, Thomas E Deweese wrote:
>     You are the second person to report redraw issues when the
> JSVGCanvas is embedded in other Swing components.  If possible can you
> send me a self contained example that shows this?

I've managed to implement a work around; I now extend JSVGComponent, and
call renderer.repaint (new Rectangle (0, 0, 100, 150)) in my
UpdateThread.

ie,
if (isRenderComplete())
{
   UpdateManager updateMgr = getUpdateManager();
   RunnableQueue svgEventQueue = updateMgr.getUpdateRunnableQueue();
   svgEventQueue.invokeLater(new Runnable()
   {
      public void run ()
      {
         try
         {
            svgElement.setAttribute (strAttribute, strAttrValue);
            renderer.repaint (new Rectangle (0, 0, 100, 150));
         } catch (Exception oE)
         {
            logger.fatal ("***** EXCEPTION ****");
            logger.fatal (oE);
         }
      } // run
   });
} // isRenderComplete

And from closer inspection of the API docs, it would appear that the
JSVGComponent is a lot more helpful then the JSVGCanvas.

If you're interested in seeing the code I had when I was using the
JSVGCanvas, then I'll try and pull out all of the un-necessary code and
email it to you off-list? .. Or I can just wait until it happens again
:)

As well, when using the JSVGCanvas and my own SVG's, I notice that they
tend to always bring up the 'Determinant is 0' popup all of the time.
When using the JSVGComponent, no such exception is thrown..

Very Curious..

James
(See attached file: signature.asc)

Attachment: Svg.zip
Description: .ZIP File

Attachment: signature.asc
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to