opensubscriber
   Find in this group all groups
 
Unknown more information…

b : batik-users@xmlgraphics.apache.org 21 August 2009 • 11:25PM -0400

Update Manager Failing
by vyang

REPLY TO AUTHOR
 
REPLY TO GROUP





Hello,

I'm having a bit of a problem with update manager failing.  On a faster
computer there seems to be no problem but on a slower computer update
manager seems to fail.  It seems like there is an interruption to update
manager so it fails thus not updating my canvas.  I always thought that
update managers runnables are put into a queue and gets called when one is
finished.  

my code is as follows:

Vector finalDrawingLayers = drawingLayers;
Vector finalLayerSetLayers = layerSetLayers;

SwingWorker worker = new SwingWorker(){
                public Object construct() {
                    try {
                      
finalDrawingPanel.getUpdateManager().getUpdateRunnableQueue().invokeAndWait(new
Runnable(){
                            public void run() {
                                if (!finalIsFirstLoad) {
                                    updateLayers(finalDrawingLayers);
//layers to turn off
                                    updateLayers(finalLayerSetLayers);
//layers to turn on
                                } else {
                                    updateLayersOnLoad(finallayerstorender);
                                }
                            }
                        });
                    } catch (InterruptedException ie) {
                        ie.printStackTrace();
                    }
                    
                    return null;
                }
                
                public void finished() {
                    renderColoring();
                }
            };
            
            worker.start();

updateLayers and updateLayersOnLoad just iterate through the vector turning
on/off visibility of the svg element.

I thought it might be because its using invokeandwait but
interruptedexception is never thrown.  Could it be because its inside a
swing worker?

Any help is much appreciated.  Thanks.

vyang
--
View this message in context: http://www.nabble.com/Update-Manager-Failing-tp25081949p25081949.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlg...
For additional commands, e-mail: batik-users-help@xmlg...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.