Skip to content

JHotDraw 7.4 Released

by werner on January 17th, 2010

JHotDraw is a framework for structured drawing editors. Many people don’t know – at least I guess that they don’t – that JHotDraw actually consists of two frameworks. The second one is a framework for document oriented applications.

For JHotDraw 7.4, I have revised the application framework to identify a document by a java.net.URI instead of by a path to a file. This allows to use the framework for applications which access documents over a network connection, from a database or for some other location which is not a file, or no document at all. For example I created a VNC viewer based on this framework.

I also restructured the use of javax.swing.Action’s in the application framework. The Action classes are now grouped in smaller packages. But – more importantly – the Action objects are now organized in a hierarchy of javax.swing.ActionMap’s rather than in a global Map object. There is now a root ActionMap for the application as a whole, and ActionMap’s for each opened view. This change was necessary, because we need to have individual Action objects per view (for example for the undo/redo actions) as well as global actions (for example the “exit” action).

Finally I restructured the packages of the drawing framework. A study “The Logical Modularity of Programs” suggested that the persistence knowledge of the drawing framework should be moved out of the org.jhotdraw.draw package. There is also restructuring of persistence handling methods suggested, which I haven’t integrated (yet). I intentionally provide a means for ‘quick and dirty’ persistence in JHotDraw for student projects. The method that I use is slightly more robust than just doing serialization, but still extremely ‘dirty’. Hm, maybe I should throw it out in one of the next releases…

Here is a JDiff of the changes from JHotDraw 7.3.1 to 7.4.

By the way. I am very much interested into the results of studies about JHotDraw. So far, I google for them from time to time. But it would be nice, if people who performed a study about JHotDraw would actively feed the results back to the developers.

From → Java, JHotDraw

One Comment

Trackbacks & Pingbacks

  1. Java Desktop links of the week, January 18 | Jonathan Giles

Comments are closed.