Hi,

the problem is that I get occasionally a NullPointerException in the 
ScrollListener of the JSVGCanvas. The variable "newview" is null in the 
updateCompleted method .

Rectangle2D newview = getViewBoxRect();

So sometimes the canvas gets white and it has to be repaint. It's immediatly 
repainted when I resize the frame or when I'm using the scrollbars. But I've 
inserted

if (newview == null) {
                                
canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(new Runnable() {

                                        @Override
                                        public void run() {
                                                canvas.repaint();
                                        }

                                });
                                return;
                        }

and this does not have any effect. Another solution maybe would be to avoid to 
get the Exception. But I don't see what I'm doing wrong.


--- Cameron McCormack <[EMAIL PROTECTED]> schrieb am Mi, 28.5.2008:
Von: Cameron McCormack <[EMAIL PROTECTED]>
Betreff: Re: Repainting a JSVGCanvas
An: [email protected]
Datum: Mittwoch, 28. Mai 2008, 3:09

aaaa aaaa: > Hi,how can I force a JSVGCanvas to "repaint" itself? I do not 
mean > the repaint method but the kind of repaint when I resize the internal 
> frame the JSVGCanvas is located in or move the JSVGScrollPane > 
scrollbar.Thanks in advance.  Can you be a bit more specific about what 
behaviour you see and what you expect?  When you resize the frame the canvas is 
in, does it just paint white in the areas you’d expect to see more of your SVG 
document?  If so, then the solution might be as simple as putting an 
overflow="visible" attribute on your root <svg> element.  --  Cameron 
McCormack ≝ http://mcc.id.au/  
--------------------------------------------------------------------- To 
unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
PROTECTED]


      __________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang.
http://de.overview.mail.yahoo.com

Reply via email to