org.apache.batik.bridge
public class UpdateManager extends Object
Nested Class Summary | |
---|---|
protected class | UpdateManager.RepaintTimerTask |
protected class | UpdateManager.SuspensionInfo |
protected class | UpdateManager.UpdateManagerRunHander |
Field Summary | |
---|---|
protected BridgeContext | bridgeContext
The bridge context. |
protected Document | document
The document to manage. |
protected GraphicsNode | graphicsNode
The GraphicsNode whose updates are to be tracked. |
protected List | listeners
The listeners. |
protected int | minRepaintTime
The current minRepaintTime |
protected RepaintManager | repaintManager
The repaint manager. |
protected RunnableQueue.RunHandler | runHandler
The RunHandler for the RunnableQueue. |
protected boolean | running
Whether the update manager is running. |
protected ScriptingEnvironment | scriptingEnvironment
The scripting environment. |
protected BridgeContext[] | secondaryBridgeContexts
Array of resource documents' BridgeContexts. |
protected ScriptingEnvironment[] | secondaryScriptingEnvironments
Array of resource documents' ScriptingEnvironments that should
have their SVGLoad event dispatched. |
protected boolean | started
Whether the manager was started. |
protected boolean | suspendCalled
Whether the suspend() method was called. |
protected RunnableQueue | updateRunnableQueue
The update RunnableQueue. |
protected UpdateTracker | updateTracker
The update tracker. |
Constructor Summary | |
---|---|
UpdateManager(BridgeContext ctx, GraphicsNode gn, Document doc)
Creates a new update manager. |
Method Summary | |
---|---|
void | addUpdateManagerListener(UpdateManagerListener l)
Adds a UpdateManagerListener to this UpdateManager. |
protected RunnableQueue.RunHandler | createRunHandler() |
void | dispatchSVGLoadEvent()
Dispatches an 'SVGLoad' event to the document. |
protected void | dispatchSVGLoadEvent(BridgeContext ctx, ScriptingEnvironment se)
Dispatches an 'SVGLoad' event to the document. |
void | dispatchSVGResizeEvent()
Dispatches an "SVGZoom" event to the document. |
void | dispatchSVGScrollEvent()
Dispatches an "SVGZoom" event to the document. |
void | dispatchSVGUnLoadEvent()
Dispatches an 'SVGUnLoad' event to the document.
|
void | dispatchSVGZoomEvent()
Dispatches an "SVGZoom" event to the document. |
protected void | fireEvent(EventDispatcher.Dispatcher dispatcher, Object event) |
void | forceRepaint()
Users of Batik should essentially never call
this directly from Java. |
BridgeContext | getBridgeContext()
Returns the bridge context. |
Document | getDocument()
Returns the current Document. |
int | getMinRepaintTime() |
RepaintManager | getRepaintManager()
Returns the repaint manager. |
ScriptingEnvironment | getScriptingEnvironment()
Returns the scripting environment. |
RunnableQueue | getUpdateRunnableQueue()
Returns the update RunnableQueue. |
UpdateTracker | getUpdateTracker()
Returns the GVT update tracker. |
protected ScriptingEnvironment | initializeScriptingEnvironment(BridgeContext ctx)
Creates an appropriate ScriptingEnvironment and XBL manager for
the given document. |
void | interrupt()
Interrupts the manager tasks. |
boolean | isRunning()
Tells whether the update manager is currently running. |
void | manageUpdates(ImageRenderer r)
Finishes the UpdateManager initialization. |
void | removeUpdateManagerListener(UpdateManagerListener l)
Removes a UpdateManagerListener from this UpdateManager. |
protected void | repaint()
Repaints the dirty areas, if needed. |
void | resume()
Resumes the update manager. |
void | setMinRepaintTime(int minRepaintTime) |
void | suspend()
Suspends the update manager. |
void | updateRendering(AffineTransform u2d, boolean dbr, Shape aoi, int width, int height)
Updates the rendering buffer. |
void | updateRendering(AffineTransform u2d, boolean dbr, boolean cpt, Shape aoi, int width, int height)
Updates the rendering buffer. |
protected void | updateRendering(List areas, boolean clearPaintingTransform)
Updates the rendering buffer. |
Parameters: ctx The bridge context. gn GraphicsNode whose updates are to be tracked. doc The document to manage.
Parameters: u2d The user to device transform. dbr Whether the double buffering should be used. aoi The area of interest in the renderer space units. width The offscreen buffer width. height The offscreen buffer height.
Parameters: u2d The user to device transform. dbr Whether the double buffering should be used. cpt If the canvas painting transform should be cleared when the update complets aoi The area of interest in the renderer space units. width The offscreen buffer width. height The offscreen buffer height.
Parameters: areas List of areas of interest in rederer space units. clearPaintingTransform Indicates if the painting transform should be cleared as a result of this update.