The Visual Library API Anton Epple http://www.eppleton.de What is - - PowerPoint PPT Presentation

the visual library api
SMART_READER_LITE
LIVE PREVIEW

The Visual Library API Anton Epple http://www.eppleton.de What is - - PowerPoint PPT Presentation

The Visual Library API Anton Epple http://www.eppleton.de What is the Visual Library? Generic Visualization Library Especially useful for displaying Graphs Widgets as Graphic primitives Certified Engineer Course What is the Visual Library?


slide-1
SLIDE 1

The Visual Library API

Anton Epple http://www.eppleton.de

slide-2
SLIDE 2

Certified Engineer Course

What is the Visual Library?

Generic Visualization Library Especially useful for displaying Graphs Widgets as Graphic primitives

slide-3
SLIDE 3

Certified Engineer Course

What is the Visual Library?

Can be used in any Swing Application

Only one dependency. Lookup (util)

Documentation & Demo Projects:

http://graph.netbeans.org/documentation.html http://graph.netbeans.org/examples.html

Used in NetBeans & many independent applications

slide-4
SLIDE 4

Certified Engineer Course

Used in many Applications

Inside NetBeans ( Visual Mobile Designer ) Jarvis (Jasperreports Visual Designer) MindMap GeeWhiz (Prolog Editor & Tutorial ) ChipInspector (Genome Browser) InstantJChem (Form Designer) BlueMarine (Photo Editor)

slide-5
SLIDE 5

Certified Engineer Course

VMD

slide-6
SLIDE 6

Certified Engineer Course

Instant JChem

slide-7
SLIDE 7

Certified Engineer Course

Jarvis

slide-8
SLIDE 8

Certified Engineer Course

How does it work?

Similar to Swing: Components organized in a tree Widgets = Graphics primitive (like JComponent)

Scene (Root element)

ObjectScene

Graph Scene GraphPinScene

LayerWidget LabelWidget ImageWidget ...

Demo...

slide-9
SLIDE 9

Certified Engineer Course

How does it work?

Layouts:

AbsoluteLayout, FlowLayout, CardLayout, OverlayLayout Demo...

Actions:

MoveAction, HoverAction, ZoomAction, PanAction... Every Widget has a WidgetAction.Chain to receive Events and forward them to the matching Action widget.getActions().addAction(ActionFactory.c reateMoveAction()); Demo...

slide-10
SLIDE 10

Certified Engineer Course

Custom Behaviour - Providers

Use Providers to create Custom Behaviour:

ActionFactory.createXXXAxtion(new MyXXXProvider ());

Example:

private static class MyHoverProvider implements HoverProvider { public void widgetHovered(Widget widget) { if (widget != null){ widget.setForeground(Color.RED); } } }

Demo...

slide-11
SLIDE 11

Certified Engineer Course

Create your own Widgets

public class IconNodeWidget extends Widget { public IconNodeWidget(Scene scene, String icon, String label) { super(scene); setOpaque(true); setLayout(LayoutFactory.createVerticalFlowLayout(LayoutFactory. SerialAlignment.CENTER, 4)); // use vertical layout Image image = Utilities.loadImage(icon); addChild(new ImageWidget(scene, image)); addChild (new LabelWidget (scene, label)); } } Demo...

slide-12
SLIDE 12

Certified Engineer Course

Create a Visual Database Explorer

DEMO

slide-13
SLIDE 13

Certified Engineer Course

Learn more

Documentation, Demo Projects 6 Tutorials:

http://graph.netbeans.org/documentation.html http://graph.netbeans.org/examples.html