Visual Library API
Official
Overview of Visual Library API module
VisualLibraryAPIThe API provides a set of reusable pieces - widgets. By composing them you are creating a visualization. Each widget has various properties including layout, border, assigned actions, ... The library contains a set of pre-defined widgets that can be extended. All pluggable pieces are declared as interfaces or abstract classes - WidgetAction, Anchor, AnchorShape, PointShape, Animator, Border, GraphLayout, LookFeel, Layout, SceneLayout, Router, CollisionsCollector. Also they all have their built-in implementation.
What is New (see all changes)?
-
Sep 27 '17 States for non-registered objects
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 Pan action allows change of invoking mouse button
Built-in pan action is using button from
Scene.getInputBindings().getPanActionButton()
method. Default value remainsMouseEvent.BUTTON2
, i.e. mouse wheel, which is compatible with the previous implementation. -
Nov 29 '12 Widget Implements Lookup.Provider
Class
Widget
implements interfaceLookup.Provider
. It already contains methodgetLookup()
. - May 17 '10 Enhancement of the old layout and adding the possibility of minimizing the gaps between nodes. 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 Support for contiguous selection action added (factory method+provider+event)
ActionFactory.createContiguousSelectAction
creates contiguous selection action.ContiguousSelectProvider
provides logic for selection action.ContiguousSelectEvent
is an event forContiguousSelectProvider
.
Use Cases
See documentation for complete set of use-cases.
Exported Interfaces
This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...Group of java interfaces
Interface Name | In/Out | Stability | Specified in What Document? |
---|---|---|---|
VisualLibraryAPI | Exported | Official |
The API provides a set of reusable pieces - widgets. By composing them you are creating a visualization. Each widget has various properties including layout, border, assigned actions, ... The library contains a set of pre-defined widgets that can be extended. All pluggable pieces are declared as interfaces or abstract classes - WidgetAction, Anchor, AnchorShape, PointShape, Animator, Border, GraphLayout, LookFeel, Layout, SceneLayout, Router, CollisionsCollector. Also they all have their built-in implementation. |
Implementation Details
Where are the sources for the module?
The sources for the module are in the Apache Git repositories or in the GitHub repositories
What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?
No. Just set a normal project dependency on org.netbeans.api.visual (spec no.: 2.0) module.
Read more about the implementation in the answers to architecture questions.
ActionFactory
class which is factory of all built-in widget-actions provided by the library.Anchor
interface which is used by ConnectionWidget
for defining its source and target point.SceneAnimator
classes which is used for controlling animations on a scene.Border
interface which is used for supplying a border graphics for a widget.Scene
to an
image file and get the coordinates from the exported image to create an HTML
image mapLookFeel
class with style definition for colors and borders.Layout
interface which defines a widget-layout.ObjectScene
class which is a scene with ability to register model-objects with widgets on the scene.ScenePrinter
used to print
a Scene
according to various constraints.Router
interface which defines a router for ConnectionWidget
.Widget
class.