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.
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.
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
Sep 27 '17; API spec. version: 2.49; affected top-level classes: ObjectScene
; made by: sdedic
When the scene is incrementally rendered, it may be possible that a model object becomes selected before some widgets are registered with the scene.
Hover, select, focus flags can be attached even to unregistered objects.
Implemented in PR #308
Jul 24 '13; API spec. version: 2.40; affected top-level classes: InputBindings
; made by: mantlik; issues:
#233296
Built-in pan action is using button from Scene.getInputBindings().getPanActionButton()
method.
Default value remains MouseEvent.BUTTON2
, i.e. mouse wheel, which is compatible with the previous
implementation.
Nov 29 '12; API spec. version: 2.36; affected top-level classes: Widget
; made by: jhavlin; issues:
#216581
Class Widget
implements interface
Lookup.Provider
. It already contains method
getLookup()
.
May 17 '10; API spec. version: 2.25; affected top-level classes: GraphLayoutFactory
GraphLayoutSupport
; 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.
Sep 7 '08; API spec. version: 2.17; affected top-level classes: ActionFactory
ContiguousSelectProvider
ContiguousSelectEvent
; made by: dkaspar; issues:
#144139
ActionFactory.createContiguousSelectAction
creates contiguous selection action.
ContiguousSelectProvider
provides logic for selection action.
ContiguousSelectEvent
is an event for ContiguousSelectProvider
.
Aug 25 '08; API spec. version: 2.16; affected top-level classes: InplaceEditorProvider
; made by: dkaspar; issues:
#144123
InplaceEditorProvider.TypedEditorController
contains getEditorInvocationType()
which returns invocation type
(MOUSE
, KEY
, CODE
).
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: ResourceTable
Widget
BorderFactory
Scene
; 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: AnchorShapeFactory
AnchorShapeLocationResolver
; 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.
Mar 12 '08; API spec. version: 2.12; affected top-level classes: GraphLayoutFactory
; made by: krichard; issues:
#129948
OrthogonalGraphLayout added.
Mar 12 '08; API spec. version: 2.12; affected top-level classes: GraphLayoutFactory
; made by: krichard; issues:
#129948
HierarchicalGraphLayout added.
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.
Feb 26 '08; API spec. version: 2.10; affected packages: org.netbeans.api.visual.print
; made by: krichards; issues:
#128388
Added a convenience class (within a separate
package) to allow users to print a Scene according to standard constraints.
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.
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.
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: 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.
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.
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 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.
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.
Aug 1 '07; API spec. version: 2.6; affected top-level classes: Widget
; made by: dkaspar; issues:
#107446
Widget.getDependencies method is added
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.
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.
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.
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.
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: AnchorShapeFactory
; made by: dkaspar; issues:
#105499
AnchorShapeFactory.createArrowAnchorShape method introduced.
Jun 8 '07; API spec. version: 2.4; affected top-level classes: GraphLayoutFactory
; made by: dkaspar; issues:
#105278
TreeGraphLayout added.
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; made by: dkaspar; issues:
#101523
Mouse dragging event processing improved. MoveAction and others are now smoothly scrolling a view.
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.
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.
Jun 5 '07; API spec. version: 2.3; affected top-level classes: ActionFactory
; made by: dkaspar; issues:
#104718
ActionFactory.createMouseCenteredZoomAction method introduced.
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.
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.
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.
Apr 3 '07; API spec. version: 2.1; affected top-level classes: LabelWidget
; made by: dkaspar; issues:
#98641
Added support for rendering vertical labels.
Apr 3 '07; API spec. version: 2.1; affected top-level classes: Widget
; made by: dkaspar; issues:
#98307
Widget.paintBorder method introduced.
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.
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.
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.
Mar 8 '07; API spec. version: 2.0; affected packages: org.netbeans.api.visual
; made by: dkaspar; issues:
#95110
The library API becomes stable.