Release Notes Version 5.1

Changes for this release:

Release Notes Version 5.0

Note:This version requires JDK 1.1.

The purpose of this release is to:

JDK1.1 features

Event Model

All event handling related classes use the JDK1.1 event model. This required to change some method signatures to refer to more specific events. Returning a boolean to indicate the consumption of an event was removed.

Serialization

This version supports to use of serialization to make a drawing persistent. CH.ifa.draw.applet.DrawApplet and CH.ifa.draw.application.DrawApplication support both the old storable and the serializable format. Support for the storable format will be removed in the next version.

Serialization is used in the default implementation of Figure.clone().

StandardDrawingView supports serialization.

Resource Access

Thanks to 1.1 the access to resources could be drastically simplified. All the resources are now accessed relative to classes. The images directory with standard images is therefore part of the package hierarchy.

IconKit could be decoupled from DrawingEditor and was moved from CH.ifa.draw.standard to CH.ifa.draw.util. Refer to the sample applications for how to load and access resources like images.

Various UI Features

Packaging

The packaging was changed to separate the framework interfaces from default implementations.

The framework package defines the core interfaces and leaves default implementations to the standard package. All key abstractions of the framework are now defined as interfaces. Ward Cunningham has suggested this some time ago and it ended up to be natural and logic evolution.

The implementation of the framework interfaces comes in two flavors. Abstract classes like AbstractFigure, provide default implementation but still need to be subclassed. Standard classes like StandardDrawing implement a framework interface and can be used as is.

The framework package was renamed to "framework" the old "fw" was due to a temprorary bug in the used IDE:

A figures package was forked of the standard package. This package provides a kit of standard figures and their related handle and tool classes.

There is a new package contrib that contains classes contributed by others.

Connectivity

Connectors were introduced to define connections between figures. A figure can have one or more connectors. A figure creates a connector for a specific location connectorAt(int x, int y). A connector knows how to find the connection point. A connection figure keeps track of a connector for its start and end point.

Figure.chop() is no longer needed and was removed. Its functionality is subsumed by Connectors.

A set of standard connectors is provided in the standard and figure packages.

Connectors are optionally visible and Figure has a method connectorVisibility to turn their visibility on and off. This is used by the ConnectionTool to highlight connection points when the mouse moves over a figure.

TextFigures can be attached to other figures. The ConnectedTextTool supports to create a connected TextFigure. Try it out in JavaDraw. The text figure is connected to the Figure that is clicked when the tool is active. To position a connected TextFigure figures can override the method connectedTextLocator to return a locator.

Various Changes

Samples

Converting