Java Doc for UpdateManager.java in  » Graphic-Library » batik » org » apache » batik » bridge » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.bridge 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.batik.bridge.UpdateManager

UpdateManager
public class UpdateManager (Code)
This class provides features to manage the update of an SVG document.
author:
   Stephane Hillion
version:
   $Id: UpdateManager.java 501843 2007-01-31 13:52:12Z deweese $

Inner Class :protected class SuspensionInfo
Inner Class :protected class RepaintTimerTask extends TimerTask
Inner Class :protected class UpdateManagerRunHander extends RunnableQueue.RunHandlerAdapter

Field Summary
final static  intMIN_REPAINT_TIME
    
 longallResumeTime
    
protected  BridgeContextbridgeContext
     The bridge context.
protected  Documentdocument
     The document to manage.
protected  GraphicsNodegraphicsNode
     The GraphicsNode whose updates are to be tracked.
protected  Listlisteners
     The listeners.
protected  intminRepaintTime
    
 intnextSuspensionIndex
    
 longoutOfDateTime
     This tracks when the rendering first got 'out of date' with respect to the document.
protected  RepaintManagerrepaintManager
     The repaint manager.
 TimerTaskrepaintTimerTask
    
 TimerrepaintTriggerTimer
    
static  DispatcherresumedDispatcher
     Dispatches a UpdateManagerEvent to notify that the manager was resumed.
protected  RunnableQueue.RunHandlerrunHandler
     The RunHandler for the RunnableQueue.
protected volatile  booleanrunning
     Whether the update manager is running.
protected  ScriptingEnvironmentscriptingEnvironment
     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  booleanstarted
     Whether the manager was started.
static  DispatcherstartedDispatcher
    
static  DispatcherstoppedDispatcher
     Dispatches a UpdateManagerEvent to notify that the manager was stopped.
protected volatile  booleansuspendCalled
     Whether the suspend() method was called.
static  DispatchersuspendedDispatcher
     Dispatches a UpdateManagerEvent to notify that the manager was suspended.
 ListsuspensionList
    
static  DispatcherupdateCompletedDispatcher
    
static  DispatcherupdateFailedDispatcher
    
protected  RunnableQueueupdateRunnableQueue
     The update RunnableQueue.
static  DispatcherupdateStartedDispatcher
    
protected  UpdateTrackerupdateTracker
     The update tracker.

Constructor Summary
public  UpdateManager(BridgeContext ctx, GraphicsNode gn, Document doc)
     Creates a new update manager.

Method Summary
 intaddRedrawSuspension(int max_wait_milliseconds)
    
public  voidaddUpdateManagerListener(UpdateManagerListener l)
     Adds a UpdateManagerListener to this UpdateManager.
 voidcreateRepaintTimer()
    
protected  RunnableQueue.RunHandlercreateRunHandler()
    
public synchronized  voiddispatchSVGLoadEvent()
     Dispatches an 'SVGLoad' event to the document.
protected  voiddispatchSVGLoadEvent(BridgeContext ctx, ScriptingEnvironment se)
     Dispatches an 'SVGLoad' event to the document.
public  voiddispatchSVGResizeEvent()
     Dispatches an "SVGZoom" event to the document.
public  voiddispatchSVGScrollEvent()
     Dispatches an "SVGZoom" event to the document.
public  voiddispatchSVGUnLoadEvent()
     Dispatches an 'SVGUnLoad' event to the document.
public  voiddispatchSVGZoomEvent()
     Dispatches an "SVGZoom" event to the document.
 longfindNewAllResumeTime()
    
protected  voidfireEvent(Dispatcher dispatcher, Object event)
    
public  voidforceRepaint()
     Users of Batik should essentially never call this directly from Java.
public  BridgeContextgetBridgeContext()
     Returns the bridge context.
public  DocumentgetDocument()
     Returns the current Document.
public  intgetMinRepaintTime()
    
public  RepaintManagergetRepaintManager()
     Returns the repaint manager.
public  ScriptingEnvironmentgetScriptingEnvironment()
     Returns the scripting environment.
public  RunnableQueuegetUpdateRunnableQueue()
     Returns the update RunnableQueue.
public  UpdateTrackergetUpdateTracker()
     Returns the GVT update tracker.
protected  ScriptingEnvironmentinitializeScriptingEnvironment(BridgeContext ctx)
     Creates an appropriate ScriptingEnvironment and XBL manager for the given document.
public  voidinterrupt()
     Interrupts the manager tasks.
public synchronized  booleanisRunning()
     Tells whether the update manager is currently running.
public  voidmanageUpdates(ImageRenderer r)
     Finishes the UpdateManager initialization.
 voidreleaseAllRedrawSuspension()
    
 booleanreleaseRedrawSuspension(int index)
    
public  voidremoveUpdateManagerListener(UpdateManagerListener l)
     Removes a UpdateManagerListener from this UpdateManager.
protected  voidrepaint()
     Repaints the dirty areas, if needed.
 voidresetRepaintTimer()
     Sets up a timer that will trigger a repaint when it fires.
public synchronized  voidresume()
     Resumes the update manager.
public  voidsetMinRepaintTime(int minRepaintTime)
    
public synchronized  voidsuspend()
     Suspends the update manager.
public  voidupdateRendering(AffineTransform u2d, boolean dbr, Shape aoi, int width, int height)
     Updates the rendering buffer.
public  voidupdateRendering(AffineTransform u2d, boolean dbr, boolean cpt, Shape aoi, int width, int height)
     Updates the rendering buffer.
protected  voidupdateRendering(List areas, boolean clearPaintingTransform)
     Updates the rendering buffer.

Field Detail
MIN_REPAINT_TIME
final static int MIN_REPAINT_TIME(Code)



allResumeTime
long allResumeTime(Code)



bridgeContext
protected BridgeContext bridgeContext(Code)
The bridge context.



document
protected Document document(Code)
The document to manage.



graphicsNode
protected GraphicsNode graphicsNode(Code)
The GraphicsNode whose updates are to be tracked.



listeners
protected List listeners(Code)
The listeners.



minRepaintTime
protected int minRepaintTime(Code)
The current minRepaintTime



nextSuspensionIndex
int nextSuspensionIndex(Code)



outOfDateTime
long outOfDateTime(Code)
This tracks when the rendering first got 'out of date' with respect to the document.



repaintManager
protected RepaintManager repaintManager(Code)
The repaint manager.



repaintTimerTask
TimerTask repaintTimerTask(Code)



repaintTriggerTimer
Timer repaintTriggerTimer(Code)



resumedDispatcher
static Dispatcher resumedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that the manager was resumed.



runHandler
protected RunnableQueue.RunHandler runHandler(Code)
The RunHandler for the RunnableQueue.



running
protected volatile boolean running(Code)
Whether the update manager is running.



scriptingEnvironment
protected ScriptingEnvironment scriptingEnvironment(Code)
The scripting environment.



secondaryBridgeContexts
protected BridgeContext[] secondaryBridgeContexts(Code)
Array of resource documents' BridgeContexts.



secondaryScriptingEnvironments
protected ScriptingEnvironment[] secondaryScriptingEnvironments(Code)
Array of resource documents' ScriptingEnvironments that should have their SVGLoad event dispatched.



started
protected boolean started(Code)
Whether the manager was started.



startedDispatcher
static Dispatcher startedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that the manager was started



stoppedDispatcher
static Dispatcher stoppedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that the manager was stopped.



suspendCalled
protected volatile boolean suspendCalled(Code)
Whether the suspend() method was called.



suspendedDispatcher
static Dispatcher suspendedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that the manager was suspended.



suspensionList
List suspensionList(Code)



updateCompletedDispatcher
static Dispatcher updateCompletedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that an update completed



updateFailedDispatcher
static Dispatcher updateFailedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that an update failed



updateRunnableQueue
protected RunnableQueue updateRunnableQueue(Code)
The update RunnableQueue.



updateStartedDispatcher
static Dispatcher updateStartedDispatcher(Code)
Dispatches a UpdateManagerEvent to notify that an update started



updateTracker
protected UpdateTracker updateTracker(Code)
The update tracker.




Constructor Detail
UpdateManager
public UpdateManager(BridgeContext ctx, GraphicsNode gn, Document doc)(Code)
Creates a new update manager.
Parameters:
  ctx - The bridge context.
Parameters:
  gn - GraphicsNode whose updates are to be tracked.
Parameters:
  doc - The document to manage.




Method Detail
addRedrawSuspension
int addRedrawSuspension(int max_wait_milliseconds)(Code)



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



createRepaintTimer
void createRepaintTimer()(Code)



createRunHandler
protected RunnableQueue.RunHandler createRunHandler()(Code)



dispatchSVGLoadEvent
public synchronized void dispatchSVGLoadEvent() throws InterruptedException(Code)
Dispatches an 'SVGLoad' event to the document.



dispatchSVGLoadEvent
protected void dispatchSVGLoadEvent(BridgeContext ctx, ScriptingEnvironment se)(Code)
Dispatches an 'SVGLoad' event to the document.



dispatchSVGResizeEvent
public void dispatchSVGResizeEvent() throws InterruptedException(Code)
Dispatches an "SVGZoom" event to the document.



dispatchSVGScrollEvent
public void dispatchSVGScrollEvent() throws InterruptedException(Code)
Dispatches an "SVGZoom" event to the document.



dispatchSVGUnLoadEvent
public void dispatchSVGUnLoadEvent()(Code)
Dispatches an 'SVGUnLoad' event to the document. This method interrupts the update manager threads. NOTE: this method must be called outside the update thread.



dispatchSVGZoomEvent
public void dispatchSVGZoomEvent() throws InterruptedException(Code)
Dispatches an "SVGZoom" event to the document.



findNewAllResumeTime
long findNewAllResumeTime()(Code)



fireEvent
protected void fireEvent(Dispatcher dispatcher, Object event)(Code)



forceRepaint
public void forceRepaint()(Code)
Users of Batik should essentially never call this directly from Java. If the Canvas is not updating when you change the SVG Document it is almost certainly because you are not making your changes in the RunnableQueue (getUpdateRunnableQueue()). You will have problems if you are not making all changes to the document in the UpdateManager's RunnableQueue. This method exists to implement the 'SVGSVGElement.forceRedraw()' method.



getBridgeContext
public BridgeContext getBridgeContext()(Code)
Returns the bridge context.



getDocument
public Document getDocument()(Code)
Returns the current Document.



getMinRepaintTime
public int getMinRepaintTime()(Code)



getRepaintManager
public RepaintManager getRepaintManager()(Code)
Returns the repaint manager.



getScriptingEnvironment
public ScriptingEnvironment getScriptingEnvironment()(Code)
Returns the scripting environment.



getUpdateRunnableQueue
public RunnableQueue getUpdateRunnableQueue()(Code)
Returns the update RunnableQueue.



getUpdateTracker
public UpdateTracker getUpdateTracker()(Code)
Returns the GVT update tracker.



initializeScriptingEnvironment
protected ScriptingEnvironment initializeScriptingEnvironment(BridgeContext ctx)(Code)
Creates an appropriate ScriptingEnvironment and XBL manager for the given document.



interrupt
public void interrupt()(Code)
Interrupts the manager tasks.



isRunning
public synchronized boolean isRunning()(Code)
Tells whether the update manager is currently running.



manageUpdates
public void manageUpdates(ImageRenderer r)(Code)
Finishes the UpdateManager initialization.



releaseAllRedrawSuspension
void releaseAllRedrawSuspension()(Code)



releaseRedrawSuspension
boolean releaseRedrawSuspension(int index)(Code)



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



repaint
protected void repaint()(Code)
Repaints the dirty areas, if needed.



resetRepaintTimer
void resetRepaintTimer()(Code)
Sets up a timer that will trigger a repaint when it fires. If create is true it will construct a timer even if one



resume
public synchronized void resume()(Code)
Resumes the update manager.



setMinRepaintTime
public void setMinRepaintTime(int minRepaintTime)(Code)



suspend
public synchronized void suspend()(Code)
Suspends the update manager.



updateRendering
public void updateRendering(AffineTransform u2d, boolean dbr, Shape aoi, int width, int height)(Code)
Updates the rendering buffer. Only to be called from the update thread.
Parameters:
  u2d - The user to device transform.
Parameters:
  dbr - Whether the double buffering should be used.
Parameters:
  aoi - The area of interest in the renderer space units.
Parameters:
  width - The offscreen buffer width.
Parameters:
  height - The offscreen buffer height.



updateRendering
public void updateRendering(AffineTransform u2d, boolean dbr, boolean cpt, Shape aoi, int width, int height)(Code)
Updates the rendering buffer. Only to be called from the update thread.
Parameters:
  u2d - The user to device transform.
Parameters:
  dbr - Whether the double buffering should be used.
Parameters:
  cpt - If the canvas painting transform should be clearedwhen the update complets
Parameters:
  aoi - The area of interest in the renderer space units.
Parameters:
  width - The offscreen buffer width.
Parameters:
  height - The offscreen buffer height.



updateRendering
protected void updateRendering(List areas, boolean clearPaintingTransform)(Code)
Updates the rendering buffer.
Parameters:
  areas - List of areas of interest in rederer space units.
Parameters:
  clearPaintingTransform - Indicates if the painting transformshould be cleared as a result of this update.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.