Just a note on my recent work on OpenJUMP's pluggable renderering system. I have eliminated the need for an external text file specifying custom renderers and the classes they paint. This simplified my modifications to the RendererFactory class quite a bit, and removed the problem of IOExceptions in both the RendererFactory class and RenderingManager class.
I am now using a technique designed in JUMP by Vivid Solutions that allows pluggable renderers to be "plugged-in" using a normal JUMP plug-in. An important improvement is that we will be able to plug-in custom renderers for layerable objects, not just objects that get painted above or below regular layerables. This will make experiments and testing of different renderers for existing objects like Layers much quicker. (This should appeal to Larry and other performance freaks.) It will also allow for easy implementation of rendering for new objects like stand alone labels, station labels, and images/rasters. In essence this system will allow major changes to OpenJUMP's rendering of any object, layerable or otherwise, with the installation or removal of a single plug-in JAR! I've got the system nearly hammered out. I still need to create the implementations for the GridRenderer, Scale Bar Renderer, SelectionBackgroundRenderer, LineSelectionRenderer, FeatureSelectionRenderer, and PartSelectionRenderer. Here are some of my notes on the system's design so far: InstallRendererFactoryToolPlugIn class replaces InstallRendererPlugIn. InstallRendererFactoryToolPlugIn installs a RendererFactoryTool in every RenderingManager instead of directly installing a Renderer in each RenderingManager. (Previously you could only install Renderers into the AboveLayerables collection or BelowLayerables collection of renderers using the InstallRendererPlugIn class. You could not install renderers for regular layerables using a plug-in. This has now changed. You can install pluggable renderers for either regular layerables or objects that should be painted above or below layerables.) Steps to using the pluggable rendering system. [1] Define a custom Renderer implementation. [2] Define a IRendererFactoryTool that returns the custom Renderer created in Step #1 when given a sample object or class name of the object that it is meant to render. [3] Extend the InstallIRendererFactoryToolPlugIn class so that the IRendererFactoryTool implementation created in Step #2 will be placed in all RenderingManagers. (This is very simple. All you need to do in the extended class is override the constructor to set the IRendererFactoryTool instance, set two (2) boolean values indicating if the renderer paints object above or below layerables, and set a String with the class name of the objects your pluggable renderer will paint. All the other work is taken care of by the default class methods. [4] Create a Jar with the custom Renderer implementation, the IRendererFactoryTool implementation, and the InstallRendererFactoryToolPlugIn extension and drop it into OpenJUMP's /ext folder." The Sunburned Surveyor ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel