|
From: James M. <j.m...@ge...> - 2001-12-19 10:44:33
|
At 06:03 PM 12/17/01, you wrote: >Will there be any attempt to convert geotools from awt to Swing? Yes there will, though this will be tackled specifically with the design of GeoTools2 there may be things which can be done now. >I would prefer not to mix the two GUI API's. There are some articles on >Javaworld.com and javasoft.com about mixing the 2 libraries by using a >CustomFocus Manager. This looks like as much work as a conversion. There are two main tasks which need to be undertaken to perform a port to java 2, the first involves a port of visible components, e.g. Viewer, toolbar etc. to make them into JComponents that are not heavy waight (a big problem with Viewer is that it tends to take over the display and gets in the way of menus when it is included in a JFrame) I do not think that there is necessarily a lot of work involved in this, the hardest part would be a port of Viewer to say JViewer, doing this would probably require the creation of a new AbstractViewer that both Viewer and JViewer could extend. There may be some issues regarding threads, but I'm not sure yet. The widgets for tools bars and the like are reasonably trivial after that I suspect. The other main task however would be the updating of the map drawing routines to take advantage of the Java2D libraries, this is much harder to do as it would require some major changes to the rendering architecture of GeoTools. So in short, I think someone could take on a port of the major components to make them work properly under swing, but the task of updating the rendering to Java2D would have to wait for now. >There were about 138 files that had the text "import java.awt." The situation is not that bad, as some awt classes can still be used in swing, for example java.awt.Color is common, but should not cause any problems. James -- James Macgill Center for Computational Geography http://www.ccg.leeds.ac.uk Spell Checker (c) Creative Spelling inc (aka my dyslexic brain) http://www.geotools.org a client side java mapping toolkit. |