org.apache.batik.swing.svg

Class AbstractJSVGComponent

public class AbstractJSVGComponent extends JGVTComponent

This class represents a swing component that can display SVG documents. This component also lets you translate, zoom and rotate the document being displayed. This is the fundamental class for rendering SVG documents in a swing application. This class is made abstract so that concrete versions can be made for different JDK versions. In particular, this is for MouseWheelEvent support, which only exists in JDKs >= 1.4.

Rendering Process

The rendering process can be broken down into five phases. Not all of those steps are required - depending on the method used to specify the SVG document to display, but basically the steps in the rendering process are:

  1. Building a DOM tree
    If the loadSVGDocument method is used, the SVG file is parsed and an SVG DOM Tree is built.
  2. Building a GVT tree
    Once an SVGDocument is created (using the step 1 or if the setSVGDocument method has been used) - a GVT tree is constructed. The GVT tree is the data structure used internally to render an SVG document. see the org.apache.batik.gvt package.
  3. Executing the SVGLoad event handlers
    If the document is dynamic, the scripts are initialized and the SVGLoad event is dispatched before the initial rendering.
  4. Rendering the GVT tree
    Then the GVT tree is rendered. see the org.apache.batik.gvt.renderer package.
  5. Running the document
    If the document is dynamic, the update threads are started.

Those steps are performed in a separate thread. To be notified to what happens and eventually perform some operations - such as resizing the window to the size of the document or get the SVGDocument built via a URI, five different listeners are provided (one per step): SVGDocumentLoaderListener, GVTTreeBuilderListener, SVGLoadEventDispatcherListener, GVTTreeRendererListener, UpdateManagerListener.

Each listener has methods to be notified of the start of a phase, and methods to be notified of the end of a phase. A phase cannot start before the preceding has finished.

The following example shows how you can get the size of an SVG document. Note that due to how SVG is designed (units, percentages...), the size of an SVG document can be known only once the SVGDocument has been analyzed (ie. the GVT tree has been constructed).

 final JSVGComponent svgComp = new JSVGComponent();
 svgComp.loadSVGDocument("foo.svg");
 svgComp.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
     public void gvtBuildCompleted(GVTTreeBuilderEvent evt) {
         Dimension2D size = svgComp.getSVGDocumentSize();
         // ...
     }
 });
 

The second example shows how you can access to the DOM tree when a URI has been used to display an SVG document.

 final JSVGComponent svgComp = new JSVGComponent();
 svgComp.loadSVGDocument("foo.svg");
 svgComp.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
     public void documentLoadingCompleted(SVGDocumentLoaderEvent evt) {
         SVGDocument svgDoc = svgComp.getSVGDocument();
         //...
     }
 });
 

Conformed to the single thread rule of swing, the listeners are executed in the swing thread. The sequence of the method calls for a particular listener and the order of the listeners themselves are guaranteed.

User Agent

The JSVGComponent can pick up some informations to a user agent. The SVGUserAgent provides a way to control the resolution used to display an SVG document (controling the pixel to millimeter conversion factor), perform an operation in respond to a click on an hyperlink, control the default language to use, or specify a user stylesheet, or how to display errors when an error occured while building/rendering a document (invalid XML file, missing attributes...).

Nested Class Summary
protected classAbstractJSVGComponent.BridgeUserAgent
To hide the user-agent methods.
protected static classAbstractJSVGComponent.BridgeUserAgentWrapper
The user-agent wrapper, which call the methods in the event thread.
protected classAbstractJSVGComponent.JSVGComponentListener
protected classAbstractJSVGComponent.SVGListener
To hide the listener methods.
Field Summary
static intALWAYS_DYNAMIC
Means that all document must be considered as dynamic.
static intALWAYS_INTERACTIVE
Means that all document must be considered as interactive.
static intALWAYS_STATIC
Means that all document must be considered as static.
static intAUTODETECT
Means that the component must auto detect whether the current document is static or dynamic.
protected RunnableafterStopRunnable
protected floatanimationLimitingAmount
The amount of animation limiting.
protected intanimationLimitingMode
The animation limiting mode.
protected BridgeContextbridgeContext
The current bridge context.
static StringBROKEN_LINK_TITLE
String constant for the resource with the text for the title of the info tooltip for brokin link images.
protected SVGDocumentLoaderdocumentLoader
The document loader.
protected intdocumentState
The document state.
protected StringfragmentIdentifier
The current document fragment identifier.
protected static SetFEATURES
protected GVTTreeBuildergvtTreeBuilder
The GVT tree builder.
protected ListgvtTreeBuilderListeners
The GVT tree builder listeners.
protected booleanisDynamicDocument
Whether the current document has dynamic features.
protected booleanisInteractiveDocument
Whether the current document has dynamic features.
protected AbstractJSVGComponent.JSVGComponentListenerjsvgComponentListener
The JGVTComponentListener.
protected ListlinkActivationListeners
The link activation listeners.
protected DocumentLoaderloader
The concrete bridge document loader.
protected SVGDocumentLoadernextDocumentLoader
The next document loader to run.
protected GVTTreeBuildernextGVTTreeBuilder
The next GVT tree builder to run.
protected UpdateManagernextUpdateManager
The next update manager.
protected DimensionprevComponentSize
protected booleanrecenterOnResize
protected booleanselfCallingDisableInteractions
Set to true before component calls setDisableInteractors so it knows that the users isn't the one calling it.
protected SVGDocumentsvgDocument
The current SVG document.
protected ListsvgDocumentLoaderListeners
The document loader listeners.
protected SVGLoadEventDispatchersvgLoadEventDispatcher
The SVGLoadEventDispatcher.
protected ListsvgLoadEventDispatcherListeners
The SVG onload dispatcher listeners.
protected SVGUserAgentsvgUserAgent
The SVG user agent.
static StringSCRIPT_ALERT
String constant for the resource with the text for a script alert dialog.
static StringSCRIPT_CONFIRM
String constant for the resource with the text for a script confim dialog.
static StringSCRIPT_PROMPT
String constant for the resource with the text for a script prompt dialog.
protected UpdateManagerupdateManager
The update manager.
protected ListupdateManagerListeners
The update manager listeners.
protected SVGUpdateOverlayupdateOverlay
protected UserAgentuserAgent
The user agent.
protected booleanuserSetDisableInteractions
Set to true if the user ever calls setDisableInteractions
protected AffineTransformviewingTransform
Constructor Summary
AbstractJSVGComponent()
Creates a new AbstractJSVGComponent.
AbstractJSVGComponent(SVGUserAgent ua, boolean eventsEnabled, boolean selectableText)
Creates a new AbstractJSVGComponent.
Method Summary
voidaddGVTTreeBuilderListener(GVTTreeBuilderListener l)
Adds a GVTTreeBuilderListener to this component.
voidaddLinkActivationListener(LinkActivationListener l)
Adds a LinkActivationListener to this component.
voidaddSVGDocumentLoaderListener(SVGDocumentLoaderListener l)
Adds a SVGDocumentLoaderListener to this component.
voidaddSVGLoadEventDispatcherListener(SVGLoadEventDispatcherListener l)
Adds a SVGLoadEventDispatcherListener to this component.
voidaddUpdateManagerListener(UpdateManagerListener l)
Adds a UpdateManagerListener to this component.
protected AffineTransformcalculateViewingTransform(String fragIdent, SVGSVGElement svgElt)
voidclearUserSetDisableInteractions()
Clears the boolean that indicates the 'user' has set disable interactions so that the canvas uses the value from documents.
protected booleancomputeRenderingTransform()
Computes the transform used for rendering.
protected BridgeContextcreateBridgeContext(SVGOMDocument doc)
Creates a new bridge context.
protected ImageRenderercreateImageRenderer()
Creates a new renderer.
protected ListenercreateListener()
Creates an instance of Listener.
protected UserAgentcreateUserAgent()
Creates a UserAgent.
voiddispose()
voidflushImageCache()
Removes all images from the image cache.
CanvasGraphicsNodegetCanvasGraphicsNode()
protected CanvasGraphicsNodegetCanvasGraphicsNode(GraphicsNode gn)
StringgetFragmentIdentifier()
Returns the current's document fragment identifier.
booleangetRecenterOnResize()
Indicates if the canvas should recenter the content after the canvas is resized.
SVGDocumentgetSVGDocument()
Returns the current SVG document.
Dimension2DgetSVGDocumentSize()
Returns the size of the SVG document.
UpdateManagergetUpdateManager()
Returns the current update manager.
AffineTransformgetViewBoxTransform()
Returns the transform from viewBox coords to screen coords
AffineTransformgetViewingTransform()
protected voidhandleException(Exception e)
Handles an exception.
protected voidinstallSVGDocument(SVGDocument doc)
This does the real work of installing the SVG Document after the update manager from the previous document (if any) has been properly 'shut down'.
booleanisDynamic()
Tells whether the component use dynamic features to process the current document.
booleanisInteractive()
Tells whether the component use dynamic features to process the current document.
voidloadSVGDocument(String url)
Loads a SVG document from the given URL.
voidremoveGVTTreeBuilderListener(GVTTreeBuilderListener l)
Removes a GVTTreeBuilderListener from this component.
voidremoveLinkActivationListener(LinkActivationListener l)
Removes a LinkActivationListener from this component.
voidremoveSVGDocumentLoaderListener(SVGDocumentLoaderListener l)
Removes a SVGDocumentLoaderListener from this component.
voidremoveSVGLoadEventDispatcherListener(SVGLoadEventDispatcherListener l)
Removes a SVGLoadEventDispatcherListener from this component.
voidremoveUpdateManagerListener(UpdateManagerListener l)
Removes a UpdateManagerListener from this component.
protected voidrenderGVTTree()
Renders the GVT tree.
voidresumeProcessing()
Resumes the processing of the current document.
voidsetAnimationLimitingCPU(float pc)
Sets the animation limiting mode to a percentage of CPU.
voidsetAnimationLimitingFPS(float fps)
Sets the animation limiting mode to a number of frames per second.
voidsetAnimationLimitingNone()
Sets the animation limiting mode to "none".
protected voidsetBridgeContextAnimationLimitingMode()
Sets the animation limiting mode on the current bridge context.
voidsetDisableInteractions(boolean b)
voidsetDocument(Document doc)
Sets the Document to display.
voidsetDocumentState(int state)
Sets the document state.
voidsetFragmentIdentifier(String fi)
Sets the current fragment identifier.
voidsetGraphicsNode(GraphicsNode gn, boolean createDispatcher)
voidsetMySize(Dimension d)
This method is called when the component knows the desired size of the window (based on width/height of outermost SVG element).
voidsetRecenterOnResize(boolean recenterOnResize)
Returns sate of the recenter on resize flag.
voidsetSVGDocument(SVGDocument doc)
Sets the SVGDocument to display.
voidshowAlert(String message)
Shows an alert dialog box.
booleanshowConfirm(String message)
Shows a confirm dialog box.
StringshowPrompt(String message)
Shows a prompt dialog box.
StringshowPrompt(String message, String defaultValue)
Shows a prompt dialog box.
protected voidstartGVTTreeBuilder()
Starts a tree builder.
protected voidstartSVGLoadEventDispatcher(GraphicsNode root)
Starts a SVGLoadEventDispatcher thread.
voidstopProcessing()
Stops the processing of the current document.
protected voidstopThenRun(Runnable r)
This method calls stop processing waits for all threads to die then runs the Runnable in the event queue thread.
voidsuspendProcessing()
Suspend the processing of the current document.
protected booleanupdateRenderingTransform()
Updates the value of the transform used for rendering.
voidupdateZoomAndPanEnable(Document doc)
Enables/Disables Zoom And Pan based on the zoom and pan attribute of the currently installed document, Unless the user has set the Interactions State.

Field Detail

ALWAYS_DYNAMIC

public static final int ALWAYS_DYNAMIC
Means that all document must be considered as dynamic. Indicates that all DOM listeners should be registered. This supports 'interactivity' (anchors and cursors), as well as DOM modifications listeners to update the GVT rendering tree.

ALWAYS_INTERACTIVE

public static final int ALWAYS_INTERACTIVE
Means that all document must be considered as interactive. Indicates that DOM listeners should be registered to support, 'interactivity' this includes anchors and cursors, but does not include support for DOM modifications.

ALWAYS_STATIC

public static final int ALWAYS_STATIC
Means that all document must be considered as static. Indicates that no DOM listeners should be registered. In this case the generated GVT tree should be totally independent of the DOM tree (in practice text holds references to the source text elements for font resolution).

AUTODETECT

public static final int AUTODETECT
Means that the component must auto detect whether the current document is static or dynamic.

afterStopRunnable

protected Runnable afterStopRunnable

animationLimitingAmount

protected float animationLimitingAmount
The amount of animation limiting.

animationLimitingMode

protected int animationLimitingMode
The animation limiting mode.

bridgeContext

protected BridgeContext bridgeContext
The current bridge context.

BROKEN_LINK_TITLE

public static final String BROKEN_LINK_TITLE
String constant for the resource with the text for the title of the info tooltip for brokin link images. No string substitution.

documentLoader

protected SVGDocumentLoader documentLoader
The document loader.

documentState

protected int documentState
The document state.

fragmentIdentifier

protected String fragmentIdentifier
The current document fragment identifier.

FEATURES

protected static final Set FEATURES

gvtTreeBuilder

protected GVTTreeBuilder gvtTreeBuilder
The GVT tree builder.

gvtTreeBuilderListeners

protected List gvtTreeBuilderListeners
The GVT tree builder listeners.

isDynamicDocument

protected boolean isDynamicDocument
Whether the current document has dynamic features.

isInteractiveDocument

protected boolean isInteractiveDocument
Whether the current document has dynamic features.

jsvgComponentListener

protected AbstractJSVGComponent.JSVGComponentListener jsvgComponentListener
The JGVTComponentListener.

linkActivationListeners

protected List linkActivationListeners
The link activation listeners.

loader

protected DocumentLoader loader
The concrete bridge document loader.

nextDocumentLoader

protected SVGDocumentLoader nextDocumentLoader
The next document loader to run.

nextGVTTreeBuilder

protected GVTTreeBuilder nextGVTTreeBuilder
The next GVT tree builder to run.

nextUpdateManager

protected UpdateManager nextUpdateManager
The next update manager.

prevComponentSize

protected Dimension prevComponentSize

recenterOnResize

protected boolean recenterOnResize

selfCallingDisableInteractions

protected boolean selfCallingDisableInteractions
Set to true before component calls setDisableInteractors so it knows that the users isn't the one calling it.

svgDocument

protected SVGDocument svgDocument
The current SVG document.

svgDocumentLoaderListeners

protected List svgDocumentLoaderListeners
The document loader listeners.

svgLoadEventDispatcher

protected SVGLoadEventDispatcher svgLoadEventDispatcher
The SVGLoadEventDispatcher.

svgLoadEventDispatcherListeners

protected List svgLoadEventDispatcherListeners
The SVG onload dispatcher listeners.

svgUserAgent

protected SVGUserAgent svgUserAgent
The SVG user agent.

SCRIPT_ALERT

public static final String SCRIPT_ALERT
String constant for the resource with the text for a script alert dialog. Must have a substitution for one string.

SCRIPT_CONFIRM

public static final String SCRIPT_CONFIRM
String constant for the resource with the text for a script confim dialog. Must have a substitution for one string.

SCRIPT_PROMPT

public static final String SCRIPT_PROMPT
String constant for the resource with the text for a script prompt dialog. Must have a substitution for one string.

updateManager

protected UpdateManager updateManager
The update manager.

updateManagerListeners

protected List updateManagerListeners
The update manager listeners.

updateOverlay

protected SVGUpdateOverlay updateOverlay

userAgent

protected UserAgent userAgent
The user agent.

userSetDisableInteractions

protected boolean userSetDisableInteractions
Set to true if the user ever calls setDisableInteractions

viewingTransform

protected AffineTransform viewingTransform

Constructor Detail

AbstractJSVGComponent

public AbstractJSVGComponent()
Creates a new AbstractJSVGComponent.

AbstractJSVGComponent

public AbstractJSVGComponent(SVGUserAgent ua, boolean eventsEnabled, boolean selectableText)
Creates a new AbstractJSVGComponent.

Parameters: ua a SVGUserAgent instance or null. eventsEnabled Whether the GVT tree should be reactive to mouse and key events. selectableText Whether the text should be selectable.

Method Detail

addGVTTreeBuilderListener

public void addGVTTreeBuilderListener(GVTTreeBuilderListener l)
Adds a GVTTreeBuilderListener to this component.

addLinkActivationListener

public void addLinkActivationListener(LinkActivationListener l)
Adds a LinkActivationListener to this component.

addSVGDocumentLoaderListener

public void addSVGDocumentLoaderListener(SVGDocumentLoaderListener l)
Adds a SVGDocumentLoaderListener to this component.

addSVGLoadEventDispatcherListener

public void addSVGLoadEventDispatcherListener(SVGLoadEventDispatcherListener l)
Adds a SVGLoadEventDispatcherListener to this component.

addUpdateManagerListener

public void addUpdateManagerListener(UpdateManagerListener l)
Adds a UpdateManagerListener to this component.

calculateViewingTransform

protected AffineTransform calculateViewingTransform(String fragIdent, SVGSVGElement svgElt)

clearUserSetDisableInteractions

public void clearUserSetDisableInteractions()
Clears the boolean that indicates the 'user' has set disable interactions so that the canvas uses the value from documents.

computeRenderingTransform

protected boolean computeRenderingTransform()
Computes the transform used for rendering. Returns true if the component needs to be repainted.

createBridgeContext

protected BridgeContext createBridgeContext(SVGOMDocument doc)
Creates a new bridge context.

createImageRenderer

protected ImageRenderer createImageRenderer()
Creates a new renderer.

createListener

protected Listener createListener()
Creates an instance of Listener.

createUserAgent

protected UserAgent createUserAgent()
Creates a UserAgent.

dispose

public void dispose()

flushImageCache

public void flushImageCache()
Removes all images from the image cache.

getCanvasGraphicsNode

public CanvasGraphicsNode getCanvasGraphicsNode()

getCanvasGraphicsNode

protected CanvasGraphicsNode getCanvasGraphicsNode(GraphicsNode gn)

getFragmentIdentifier

public String getFragmentIdentifier()
Returns the current's document fragment identifier.

getRecenterOnResize

public boolean getRecenterOnResize()
Indicates if the canvas should recenter the content after the canvas is resized. If true it will try and keep the point that was at the center at the center after resize. Otherwise the upper left corner will be kept at the same point.

getSVGDocument

public SVGDocument getSVGDocument()
Returns the current SVG document.

getSVGDocumentSize

public Dimension2D getSVGDocumentSize()
Returns the size of the SVG document.

getUpdateManager

public UpdateManager getUpdateManager()
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).

getViewBoxTransform

public AffineTransform getViewBoxTransform()
Returns the transform from viewBox coords to screen coords

getViewingTransform

public AffineTransform getViewingTransform()

handleException

protected void handleException(Exception e)
Handles an exception.

installSVGDocument

protected void installSVGDocument(SVGDocument doc)
This does the real work of installing the SVG Document after the update manager from the previous document (if any) has been properly 'shut down'.

isDynamic

public boolean isDynamic()
Tells whether the component use dynamic features to process the current document.

isInteractive

public boolean isInteractive()
Tells whether the component use dynamic features to process the current document.

loadSVGDocument

public void loadSVGDocument(String url)
Loads a SVG document from the given URL. Note: Because the loading is multi-threaded, the current SVG document is not garanteed to be updated after this method returns. The only way to be notified a document has been loaded is to listen to the SVGDocumentLoaderEvents.

removeGVTTreeBuilderListener

public void removeGVTTreeBuilderListener(GVTTreeBuilderListener l)
Removes a GVTTreeBuilderListener from this component.

removeLinkActivationListener

public void removeLinkActivationListener(LinkActivationListener l)
Removes a LinkActivationListener from this component.

removeSVGDocumentLoaderListener

public void removeSVGDocumentLoaderListener(SVGDocumentLoaderListener l)
Removes a SVGDocumentLoaderListener from this component.

removeSVGLoadEventDispatcherListener

public void removeSVGLoadEventDispatcherListener(SVGLoadEventDispatcherListener l)
Removes a SVGLoadEventDispatcherListener from this component.

removeUpdateManagerListener

public void removeUpdateManagerListener(UpdateManagerListener l)
Removes a UpdateManagerListener from this component.

renderGVTTree

protected void renderGVTTree()
Renders the GVT tree.

resumeProcessing

public void resumeProcessing()
Resumes the processing of the current document.

setAnimationLimitingCPU

public void setAnimationLimitingCPU(float pc)
Sets the animation limiting mode to a percentage of CPU.

Parameters: pc the maximum percentage of CPU to use (0 < pc ≤ 1)

setAnimationLimitingFPS

public void setAnimationLimitingFPS(float fps)
Sets the animation limiting mode to a number of frames per second.

Parameters: fps the maximum number of frames per second (fps > 0)

setAnimationLimitingNone

public void setAnimationLimitingNone()
Sets the animation limiting mode to "none".

setBridgeContextAnimationLimitingMode

protected void setBridgeContextAnimationLimitingMode()
Sets the animation limiting mode on the current bridge context.

setDisableInteractions

public void setDisableInteractions(boolean b)

setDocument

public void setDocument(Document doc)
Sets the Document to display. If the document does not use Batik's SVG DOM Implemenation it will be cloned into that implementation. In this case you should use 'getSVGDocument()' to get the actual DOM that is attached to the rendering interface. Note that the prepartation for rendering and the rendering it's self occur asynchronously so you need to register event handlers if you want to know when the document is truely displayed. Notes for documents that you want to change in Java: From this point on you may only modify the the document in the UpdateManager thread @see #getUpdateManager. In many cases you also need to tell Batik to treat the document as a dynamic document by calling setDocumentState(ALWAYS_DYNAMIC).

setDocumentState

public void setDocumentState(int state)
Sets the document state. The given value must be one of AUTODETECT, ALWAYS_DYNAMIC or ALWAYS_STATIC. This only effects the loading of subsequent documents, it has no effect on the currently loaded document.

setFragmentIdentifier

public void setFragmentIdentifier(String fi)
Sets the current fragment identifier.

setGraphicsNode

public void setGraphicsNode(GraphicsNode gn, boolean createDispatcher)

setMySize

public void setMySize(Dimension d)
This method is called when the component knows the desired size of the window (based on width/height of outermost SVG element). The default implementation simply calls setPreferredSize, and invalidate. However it is often useful to pack the window containing this component.

setRecenterOnResize

public void setRecenterOnResize(boolean recenterOnResize)
Returns sate of the recenter on resize flag.

setSVGDocument

public void setSVGDocument(SVGDocument doc)
Sets the SVGDocument to display. If the document does not use Batik's SVG DOM Implemenation it will be cloned into that implementation. In this case you should use 'getSVGDocument()' to get the actual DOM that is attached to the rendering interface. Note that the prepartation for rendering and the rendering it's self occur asynchronously so you need to register event handlers if you want to know when the document is truely displayed. Notes for documents that you want to change in Java. From this point on you may only modify the the document in the UpdateManager thread @see #getUpdateManager. In many cases you also need to tell Batik to treat the document as a dynamic document by calling setDocumentState(ALWAYS_DYNAMIC).

showAlert

public void showAlert(String message)
Shows an alert dialog box.

showConfirm

public boolean showConfirm(String message)
Shows a confirm dialog box.

showPrompt

public String showPrompt(String message)
Shows a prompt dialog box.

showPrompt

public String showPrompt(String message, String defaultValue)
Shows a prompt dialog box.

startGVTTreeBuilder

protected void startGVTTreeBuilder()
Starts a tree builder.

startSVGLoadEventDispatcher

protected void startSVGLoadEventDispatcher(GraphicsNode root)
Starts a SVGLoadEventDispatcher thread.

stopProcessing

public void stopProcessing()
Stops the processing of the current document.

stopThenRun

protected void stopThenRun(Runnable r)
This method calls stop processing waits for all threads to die then runs the Runnable in the event queue thread. It returns immediately.

suspendProcessing

public void suspendProcessing()
Suspend the processing of the current document.

updateRenderingTransform

protected boolean updateRenderingTransform()
Updates the value of the transform used for rendering. Return true if a repaint is required, otherwise false.

updateZoomAndPanEnable

public void updateZoomAndPanEnable(Document doc)
Enables/Disables Zoom And Pan based on the zoom and pan attribute of the currently installed document, Unless the user has set the Interactions State.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.