Diagrammer Fixes & Samples

I have been using my recently released Class Diagrammer for Java to document two more of my projects, and along the way inevitably found a number of bugs that needed fixing and features that needed adding. So here is Class Diagrammer 2.0.1 with the following fixes, enhancements, and new samples.

2016-06-05: Minor update to version 2.0.2 with the latest JFreeSVG version 3.1 and a simpler name for the GUI executable (Diagrammer without the .Fx suffix).

Bug Fixes

  • Fixed slightly misaligned relation components by setting RenderingHints.VALUE_STROKE_PURE. AWT defaults to rounding floating-point coordinates in a way that’s supposed to be aesthetically pleasing but which puts my precisely calculated relation joints out of alignment.
  • Changed background color for all output formats to opaque white, as AWT Graphics2D cannot clear an area (i.e. space for relation labels) with a transparent color. With output formats that supported transparency in 2.0.0 you got a transparent background for most of the diagram, but relation labels had a solid white background.
  • Diagrams View: Fixed project-wide Display Options changes not being reflected in the current diagram, and fixed mouse hit testing malfunctioning after certain diagram updates. The latter was due to the internal hit testing bitmap not always being redrawn when necessary.
  • Outputs View: Disabled diagram-related check boxes when no output job is selected.

Enhancements

  • Changed default folder for output files from current directory to project directory, if any. Current directory remains the default when no project file exists, which is only possible in the GUI application. (The console runner always requires a project file.)
  • Non-existent directory components of a user-defined output folder are now created automatically, rather than the output job silently failing. I was unable to determine why this IOException was not properly handled, to be honest, but the new behavior should fix it anyway.
  • Diagrams View: Added relation context menu option Copy… to create a new relation with initial data copied from the selected one, same as the Copy button in the Change Relations dialog.

Samples

All of the following samples are rendered as PDF documents, although you could of course generate different output formats if you like. The first sample uses the default font, Arial, to allow easy recreation on anyone’s systems. The others use the prettier Adobe Myriad Pro which not everyone has.

The download packages for MIME Browser and Star Chess were updated to include the Class Diagrammer project files for the new diagrams, so you can try them out yourself.

Leave a Reply