Introduction

This document lists changes made to the Visual Library API.
Please, ask on the users@graph.netbeans.org mailing list if you have any question about the details of a change,
or are wondering how to convert existing code to be compatible.

These API specification versions may be used to indicate that a module
requires a certain API feature in order to function. For example, if you
see here a feature you need which is labelled 1.20, your
manifest should contain in its main attributes the line:

May 17 '10; API spec. version: 2.25; affected top-level classes: GraphLayoutFactoryGraphLayoutSupport; made by: ep-nb; issues:
#178705
The old layout was improved in a way that nodes in a subtree are vertically aligned by the center of the super nodes. Also the possibility of overlapping in the old layout was removed by adding an approach based on the envelope of the (sub)trees.
The second improvement was done by adding the possibility of minimizing the gaps between nodes. If a tree was very wide, the old layout used a lot of space. To prevent this the new algorithm with the possibility of minimization of gaps is based on the envelope. Therefore subtrees move as close together as possible.

Jun 24 '08; API spec. version: 2.15; affected top-level classes: GraphLayoutFactory; made by: krichard; issues:
#138104
There are certain graphs which demand that the hierarchical layout
be inverted (target above source). One such graph would be a UML
class diagram. For this reason I propose adding a static call to
the GraphLayoutFactory to allow for an "inverted" flag to be provided.
The default behavior sets inverted to false.
Another call to be added the the GraphLayoutFactory would include
"inverted", "horizontal spacing", and "layer spacing" (vertical).
The default all remain the same.

Apr 29 '08; API spec. version: 2.14; affected top-level classes: ResourceTableWidgetBorderFactoryScene; made by: tspiva; issues:
#128348
The resource table will allow for a central location for
properties like font, color and paint objects. The resource
table will help enforce an applications look and feel. When a
property is updated in the resource table, all interested
widgets will be notified of the change. The notification allows
widgets to update when a resource property changes.

Apr 22 '08; API spec. version: 2.13; affected top-level classes: LayoutFactory; made by: tspiva; issues:
#128348
ConnectionWidgetLayout constraints specify where a child component should be
placed in releationship to the connection widget. However simply stating left,
right is not enough when nodes can be moved. The new constraints specify which
connection end instead of left, right top, and bottom.

Apr 22 '08; API spec. version: 2.13; affected top-level classes: AnchorShapeFactoryAnchorShapeLocationResolver; made by: tspiva; issues:
#128348
The new anchor shape can wrap an existing anchor shape and provide
a new cut distance. One example of when an attachable anchor
shape would be used is when a label on a connection widget is
to be placed between the anchor shape, and the related widget.

Feb 26 '08; API spec. version: 2.10; affected packages: org.netbeans.api.visual.export; made by: krichards; issues:
#128387
Added a convenience class, SceneExporter, to allow users to export a Scene to any of a defined set of formats. This
export class would also contain functionality to return to polygonal points for each widget that is a child of the
layers on the scene.

Aug 10 '07; API spec. version: 2.7; affected top-level classes: LabelWidget; made by: dkaspar; issues:
#98762
LabelWidget now has useGlyphVector property. If true then the text in a LabelWidget is converted into glyph-vector (a shape)
that is rendered. This allows accurate rendering independently on zoom-factor of a scene.
Note that the glyph-vector rendering is slower than regular rendering.

Aug 10 '07; API spec. version: 2.7; affected top-level classes: Widget; made by: dkaspar; issues:
#104474
Scene.validate(Graphics2D) method has been added. It allows to validate a scene without having a main scene view created and shown on screen.
See test.view.OffscreenRenderingTest example for usage.

Aug 10 '07; API spec. version: 2.7; affected top-level classes: Scene; made by: dkaspar; issues:
#108510
Bird view is a window that is always under your mouse-cursor and shows the scene with a specified zoom factor.
A bird view can be created using Scene.createBirdView method. To enable bird view you need to call the BirdViewController.show method on returned controller instance.

Aug 1 '07; API spec. version: 2.6; affected top-level classes: Widget; made by: dkaspar; issues:
#108856
The old logic of resolving accessible context was wrong and was replaced be a logic which by default creates a tree structure
of Accessible object that copies the structure of widgets in a scene.

Jun 25 '07; API spec. version: 2.5; affected top-level classes: ConnectionWidget; made by: dkaspar; issues:
#106508
ConnectionWidget.controlPointCutDistance property allows you to specify a distance where the path should be cut
at each control point.
See test.widget.ConnectionWidgetCutDistanceTest for example.

Jun 25 '07; API spec. version: 2.5; affected top-level classes: VMDColorScheme; made by: dkaspar; issues:
#105929
VMDColorScheme abstract class has been introduced to define a UI of VMD widget.
There are two predefined schemes available in VMDFactory class. Use them as a paratemer in widget constructors.

Jun 8 '07; API spec. version: 2.4; affected top-level classes: ActionFactory; made by: dkaspar; issues:
#104976
All built-in zoom actions are using modifiers from Scene.getInputBindings().getZoomActionModifiers() method.
Default value has been changed from nothing to Ctrl key which backward-incompatible change affecting all users.
A part of the change InputBindings class has been introduces and assigned to a Scene.

Jun 8 '07; API spec. version: 2.4; affected top-level classes: LayoutFactory; made by: dkaspar; issues:
#105390
When a widget is using VerticalFlowLayout or HorizontalFlowLayout and a child widget has a Number constraint assigned,
then the Number value represent a radio in with the remaining gap in the widget is split and added to particular child widget.
See test.layout.WeightFlowLayoutTest for example.

Jun 5 '07; API spec. version: 2.3; affected packages: org.netbeans.api.visual.widget; made by: dkaspar; issues:
#104662
Now the mouse cursor is changed also based on its local location in a widget.
Therefore ConnectionWidget has controlPointsCursor property which defines a cursor for mouse over control points.

Mar 9 '07; API spec. version: 2.0; affected top-level classes: LayoutFactory; made by: dkaspar; issues:
#97562
FillLayout class has been renamed to OverlayLayout. SerialLayout class has been renamed to FlowLayout.
At the same time their factory methods has bee renamed too.
LayoutFactory.createFillLayout method renamed to LayoutFactory.createOverlayLayout.
LayoutFactory.createHorizontalLayout method renamed to LayoutFactory.createHorizontalFlowLayout.
LayoutFactory.createVerticalLayout method renamed to LayoutFactory.createVerticalFlowLayout.
The original methods are deprecated now and are going to be removed for 6.0 Milestone 9. The new methods has been added.
Also BorderLayout.createFancyDashedBorder method is going to be removed for 6.0 Milestone 9.
Use BorderLayout.createDashedBorder(...,true) method instead.
Note that the LayouFactory.SerialAlignment enum name is not changed.

Mar 9 '07; API spec. version: 2.0; affected packages: org.netbeans.api.visual.widget.general; made by: dkaspar; issues:
#97564
ListWidget and ListItemWidget are not in final shape and are deprecated. Therefore they have been moved out from the public-API packages.
Now they are copied in the org.netbeans.modules.visual.experimental.widget.general package.
The original classes are still deprecated and going to be removed for 6.0 Milestone 9.
Note that if you want to use the experimental widgets (outside of the public-API packages), you have to set an implementation dependency
on org.netbeans.api.visual module. Please, do not use implemementation dependency for anything except this.