I'm nearly done with the modifications that will allow OpenJUMP and JUMP to support truly "pluggable renderers".
I've created a few new classes and interfaces to do this. I based my design on the code that was previously placed in OpenJUMP's RenderingManager class by Ole and Stefan. I basically do the same thing as Ole, but I implement the State design pattern instead of using switch statements. I have a RendererFactory class that accepts "tool" objects that create and return a Renderer based on the class of the object that needs to be rendered. This means developers will be able to add custom Renderers for any object that is painted in OpenJUMP. They can do this by creating a plug-in that adds their own implementation of the "tool" object to the RendererFactory class. (I created default "tool" objects that returns instances of the SimpleFeatureCollectionRenderer, ImageCachingFeatureCollectionRenderer, and WMSLayerRenderer classes.) If this works we should be able to "plug" and "unplug" custom renderers, and overide default renderers without modifying the source code in the core. I only have one problem with my design. I need a plug-in to be able to add its custom Renderer/Renderers in its intialization() method. This means the RenderFactory object has to exist when JUMP/OpenJUMP performs plug-in intialization. I'd like to do this by adding a member variable to the JUMPWorkbench class. The RendererFactory class stored in this member variable will be available to RenderingManagers for all LayerViewPanels in the running instance of JUMP/OpenJUMP. Is there is a more appropriate class that is created before plug-in initialization that I should use? I don't really want to mess with static methods and objects. I'll release my code soon when I get this problem solved. :] The Sunburned Surveyor P.S. - Should we think about enforcing some type of order to plug-in initialization? That would avoid these types of problems. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel