Re: Problem with JSVGCanvas class (getting an UpdateManager)

Robert Marcano <[email protected]> Wed, 07 Jan 2015 07:59:04 -0430
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
On 01/06/2015 10:54 PM, Craig Ugoretz wrote:

...
>
> WHAT DO I NEED TO DO SO THE VARIABLE um IS NOT NULL?
>

Greetings, check the API javadoc:

https://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/swing/svg/AbstractJSVGComponent.html#getUpdateManager%28%29

"Returns the current update manager. The update manager becomes 
available after the first rendering completes. You can be notifed when 
the rendering completes by registering a GVTTreeRendererListener with 
the component and waiting for the gvtRenderingCompleted event. An 
UpdateManager is only created for Dynamic documents. By default the 
Canvas attempts to autodetect dynamic documents by looking for script 
elements and/or event attributes in the document, if it does not find 
these it assumes the document is static. Callers of this method will 
almost certainly want to call setDocumentState(ALWAYS_DYNAMIC) before 
loading the document (with setURI, setDocument, setSVGDocument etc.) so 
that an UpdateManager is always created (even for apparently static 
documents)."