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.


Index of APIs

Incompatible changes by date

Fuller descriptions of all changes can be found below (follow links).

Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.

All changes by date

Changes by version

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:

OpenIDE-Module-Module-Dependencies: org.netbeans.api.visual > 1.20

Changes by affected class

org.netbeans.api.visual.action.ActionFactory

org.netbeans.api.visual.anchor.Anchor

org.netbeans.api.visual.anchor.AnchorShapeFactory

org.netbeans.api.visual.animator.AnimatorListener

org.netbeans.api.visual.border.BorderSupport

org.netbeans.api.visual.widget.ConnectionWidget

org.netbeans.api.visual.router.ConnectionWidgetCollisionsCollector

org.netbeans.api.visual.graph.layout.GraphLayoutFactory

org.netbeans.api.visual.graph.layout.GraphLayoutSupport

org.netbeans.api.visual.widget.ImageWidget

org.netbeans.api.visual.widget.LabelWidget

org.netbeans.api.visual.layout.LayoutFactory

org.netbeans.api.visual.widget.Scene

org.netbeans.api.visual.vmd.VMDColorScheme

org.netbeans.api.visual.widget.Widget


Details of all changes by API and date


Visual Library API

Routing policy support for ConnectionWidget

Aug 31 '07; API spec. version: 2.9; affected top-level classes: ConnectionWidget; made by: dkaspar; issues: #113573
ConnectionWidget allows to specify routing policy. The policy defines behaviour of path routing in ConnectionWidget. There are 4 values: Always-route, Update-end-points-only, Disable-routing-until-end-point-is-moved, Disable-routing. AddRemoveControlPointAction and MoveControlPointAction has new factory methods for automatic assignment of routing policy.

Anchor.notifyRevalidate method

Aug 21 '07; API spec. version: 2.8; affected top-level classes: Anchor; made by: dkaspar; issues: #111987
Missing Anchor.notifyRevalidate method has been added. Now the Anchor should receive all necessary notification. It is used by VMDNodeAnchor too.

Accurate LabelWidget rendering using glyph vector

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.

Widget.validate(Graphics2D) method added to support off-screen 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.

Added support to checking AlignWith-actions with client areas

Aug 10 '07; API spec. version: 2.7; affected top-level classes: ActionFactory; made by: dkaspar; issues: #105285
AlignWithMoveAction and AlignWithResizeAction allow checking client area of widget (widget boundary without border insets). There are 4 new methods in ActionFactory class introduces to allow specifying outerBounds parameter.

WheelPanAction introduced

Aug 10 '07; API spec. version: 2.7; affected top-level classes: ActionFactory; made by: dkaspar; issues: #107774
WheelPanAction has been added to allow vertical and horizontal scrolling of a scene view using mouse wheel.

Bird view support added

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.

GraphLayouSupport.setTreeGraphLayoutProperties method introduced

Aug 10 '07; API spec. version: 2.7; affected top-level classes: GraphLayoutSupport; made by: dkaspar; issues: #111339
The GraphLayouSupport.setTreeGraphLayoutProperties method allows change properties of tree graph layout i.e. originX, originY, verticalGap, horizontalGap, vertical.

BorderSupport.getSwingBorder method introduced

Aug 1 '07; API spec. version: 2.6; affected top-level classes: BorderSupport; made by: dkaspar; issues: #103456
BorderSupport.getSwingBorder method introduced to acquired a Swing border from a library border.

Widget.getDependencies method added

Aug 1 '07; API spec. version: 2.6; affected top-level classes: Widget; made by: dkaspar; issues: #107446
Widget.getDependencies method is added

Popup menu action could be invoked by Shift+F10 key

Aug 1 '07; API spec. version: 2.6; affected top-level classes: ActionFactory; made by: dkaspar; issues: #108783
Popup menu action (created by ActionFactory.createPopupMenuAction method) could be invoked by an user using Shift+F10 key.

Widget implements javax.accessibility.Accessible interface

Aug 1 '07; API spec. version: 2.6; affected top-level classes: Widget; made by: dkaspar; issues: #109023
The Widget implements javax.accessibility.Accessible interface.

ActionMapAction is not handling mouse events to show popup menu

Aug 1 '07; API spec. version: 2.6; affected top-level classes: ActionFactory; made by: dkaspar; issues: #110146
ActionMapAction (created by ActionFactory.createActionMapAction method) is not handling mouse events to show popup menu.

CycleFocusAction is using Shift+Tab keystroke for focus-to-previous action

Aug 1 '07; API spec. version: 2.6; affected top-level classes: ActionFactory; made by: dkaspar; issues: #110389
CycleFocusAction (created using ActionFactory.createCycleFocusAction method) is using Shift+Tab keystroke for focus-to-previous action. Previously it was Ctrl+Tab keystroke.

Accesibility support improved

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.

ConnectionWidget.controlPointCutDistance property introduced to render smoother corners of the path

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.

VMDColorScheme introduced

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.

AnchorShapeFactory.createArrowAnchorShape method introduced

Jun 8 '07; API spec. version: 2.4; affected top-level classes: AnchorShapeFactory; made by: dkaspar; issues: #105499
AnchorShapeFactory.createArrowAnchorShape method introduced.

GraphLayoutFactory.createTreeGraphLayout added

Jun 8 '07; API spec. version: 2.4; affected top-level classes: GraphLayoutFactory; made by: dkaspar; issues: #105278
TreeGraphLayout added.

Zoom actions are using Ctrl key modifier of invocation

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.

VerticalFlowLayout and HorizontalFlowLayout calculates with weights

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.

Mouse dragging event processing improved

Jun 5 '07; API spec. version: 2.3; made by: dkaspar; issues: #101523
Mouse dragging event processing improved. MoveAction and others are now smoothly scrolling a view.

Additional ActionFactory.createExtendedConnectAction with modifiers parameter added

Jun 5 '07; API spec. version: 2.3; affected top-level classes: ActionFactory; made by: dkaspar; issues: #103289
An additional ActionFactory.createExtendedConnectAction method was added. It allows to speficied a combination of MouseEvent.*_DOWN modifiers that triggers invocation of the action.

Widget.getCursorAt method introduced, ConnectionWidget.controlPointsCursor property added

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.

ActionFactory.createMouseCenteredZoomAction method introduced

Jun 5 '07; API spec. version: 2.3; affected top-level classes: ActionFactory; made by: dkaspar; issues: #104718
ActionFactory.createMouseCenteredZoomAction method introduced.

ImageWidget handles animated images

Jun 4 '07; API spec. version: 2.3; affected top-level classes: ImageWidget; made by: dkaspar
Now ImageWidget uses ImageObserver to track changes and animations of image. Do not use Utilities.loadImage method for loading animated images since it produces static images only - use Toolkit.createImage instead.

AnimatorListener added

Apr 10 '07; API spec. version: 2.2; affected top-level classes: AnimatorListener; made by: dkaspar; issues: #99048
AnimatorListener interface has been added. It allows listening to important events of Animator interface implementation. Built-in animators are accessible using getters on SceneAnimator class.

ConnectionWidgetCollisionsCollection added

Apr 10 '07; API spec. version: 2.2; affected top-level classes: ConnectionWidgetCollisionsCollector; made by: dkaspar; issues: #99054
New ConnectionWidgetCollisionsCollection interface added. It allows to obtain a context of currently routed ConnectionWidget. It can be used using RouterFactory.createOrthogonalSearchRouter factory method.

Added LabelWidget.orientation property

Apr 3 '07; API spec. version: 2.1; affected top-level classes: LabelWidget; made by: dkaspar; issues: #98641
Added support for rendering vertical labels.

Widget.paintBorder method introduced

Apr 3 '07; API spec. version: 2.1; affected top-level classes: Widget; made by: dkaspar; issues: #98307
Widget.paintBorder method introduced.

Added ActionFactory.createActionMapAction methods

Mar 13 '07; API spec. version: 2.0; affected top-level classes: ActionFactory; made by: dkaspar; issues: #97563
Added an action whith is using ActionMap and InputMap for handling key-presses and a popup menu.

Cut-distance can be specified for Triangle anchor shape

Mar 9 '07; API spec. version: 2.0; affected top-level classes: AnchorShapeFactory; made by: dkaspar; issues: #91613
AnchorShapeFactory.createTriangleAnchorShape factory method now takes cut-distance parameter.

Renaming non-standard names - FillLayout and SerialLayout

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.

Move deprecated classes out from the public API - ListWidget and ListItemWidget

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.

The library API becomes stable

Mar 8 '07; API spec. version: 2.0; affected packages: org.netbeans.api.visual; made by: dkaspar; issues: #95110
The library API becomes stable.

Built on August 13 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.