gef4 - sightseeing mars

26
Image courtesy of Nasa 4 Sightseeing Mars Neon Alexander Nyßen itemis AG Graphical Editing Framework Project Lead

Upload: alexander-nyssen

Post on 08-Apr-2017

1.228 views

Category:

Software


0 download

TRANSCRIPT

Page 1: GEF4 - Sightseeing Mars

Image courtesy of Nasa

4Sightseeing MarsNeon

Alexander Nyßenitemis AGGraphical Editing Framework Project Lead

Page 2: GEF4 - Sightseeing Mars

GEF4• Our approach to develop the next generation API of

the Graphical Editing Framework. • Developed in parallel to Draw2D/GEF (MVC) 3.x and

Zest 1.x, which are in pure maintenance mode.• First official release (0.1.0) with Mars, followed by bugfix

release (0.2.0) with Mars.1. • Next release (0.3.0/1.0.0) with Neon, including revision of

various parts of the still provisional API with the goal to graduate it.

Image courtesy of Lile Nel / flickr

Page 3: GEF4 - Sightseeing Mars

GEF4 Components• GEF4 provides nine loosely coupled components.

• DOT and Cloudio provide end-user features• The other components form two basic framework stacks:

• Common, Geometry, FX, MVC

• Graph, Layout, Zest

Image courtesy of Michael Stern / flickr

Page 4: GEF4 - Sightseeing Mars

GEF4 DOT - DOT editor

Page 5: GEF4 - Sightseeing Mars

GEF4 DOT - DOT Graph view

Page 6: GEF4 - Sightseeing Mars

GEF4 Cloudio - TagCloud View

Page 7: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Common

Page 8: GEF4 - Sightseeing Mars

GEF4 Common• Provides common (graphical-independent) abstractions

(IActivatable, IDisposable, etc.), including:• IAdaptable „2.0“

*) probably revised in the future

// register and retrieve adapter 'a' of raw type 'A' under role 'a1'adaptable.setAdapter(AdapterKey.get(A.class, "a1"));A a = adaptable.getAdapter(AdapterKey.get(A.class, "a1"));

// register and retrieve adapter 'a' of parameterized type 'A<T>' under 'default' roleadaptable.setAdapter(new TypeToken<A<T>>(){}, a);A<T> a = adaptable.getAdapter(new TypeToken<A<T>>(){});

// obtain a map binder to bind adapters for the respective IAdaptable type.MapBinder<AdapterKey<?>, Object> adapterMapBinder = AdapterMaps.getAdapterMapBinder(binder(), MyAdaptable.class); // add adapter (map) binding for binding adapter 'a' with parameterized type 'A<T>' to each MyAdaptable instanceadapterMapBinder.addBinding(AdapterKey.get(new TypeToken<A<T>>(){})).toInstance(a);

• AdapterMap injection

Page 9: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 GeometryGEF4 Common

Page 10: GEF4 - Sightseeing Mars

GEF4 Geometry• Provides a double-precision Geometry API (with built-in

imprecision).• Different geometric abstractions for different purposes:

• Euclidean (Vector, Straight, Angle)• Projective (Vector3D, Straight3D)• Planar (Point, Dimension, Line, QuadraticCurve, CubicCurve,

BezierCurve, Polyline, PolyBezier, Ellipse, Rectangle, Pie, Arc, Polygon, CurvedPolygon, RoundedRectangle, Ring, Region, Path)

• Conversions to/from AWT, SWT, and JavaFX.

Page 11: GEF4 - Sightseeing Mars

GEF4 Geometry - Examples

Page 12: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWT GEF4 FX

GEF4 Common

GEF4 FX.JFace

Page 13: GEF4 - Sightseeing Mars

GEF4 FX• Pure JavaFX extension like FXGeometryNode,

FXConnection, and InfiniteCanvas.• Enhancements for the integration of JavaFX with SWT:

• FXCanvasEx, which supports forwarding of SWT gesture events and proper notification of SWT focus listeners.

• FXControlAdapter to integrate SWT Controls into an embedded JavaFX scene.

• Color and gradient pickers for usage in cell editors. • JFace cell editor(s) and dialog(s) for color/gradient selection.

Page 14: GEF4 - Sightseeing Mars

GEF4 FX - Examples

Page 15: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWT GEF4 MVC

GEF4 MVC.FX

GEF4 MVC.FX.UI

GEF4 FX

GEF4 MVC.UI

GEF4 Common

GEF4 FX.JFace

Page 16: GEF4 - Sightseeing Mars

GEF4 MVC• An intentionally light-weight model-view-controller

framework dedicated to graphical editors and views

• Split into UI-toolkit-independent abstractions (MVC), JavaFX-based specializations (MVC.FX), and related Eclipse UI-integration (MVC.UI/MVC.FX.UI)

• Flexibly configurable using (an enhanced) IAdaptable as well as Guice-based dependency injection.

• Can be used to realize standalone (including web-deployed) and Eclipse UI-integrated graphical applications.

Page 17: GEF4 - Sightseeing Mars

DEMO - GEF4 MVC.FX.UI Example

Page 18: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWT GEF4 MVC

GEF4 MVC.FX

GEF4 MVC.FX.UI

GEF4 FX

GEF4 MVC.UI

GEF4 Graph

GEF4 Common

GEF4 FX.JFace

Page 19: GEF4 - Sightseeing Mars

GEF4 Graph• Provides a simple (POJO) Graph model to represent graph-

like structures and a related builder structure.

// Nodes, edges, and attributes can be added in arbitrary order */Graph g1 = new Graph.Builder().attr(DotProperties.GRAPH_TYPE, DotProperties.GRAPH_TYPE_UNDIRECTED) .node("n1").attr(DotProperties.NODE_LABEL, "1").attr(DotProperties.NODE_ID, "1") .node("n2").attr(DotProperties.NODE_LABEL, "2").attr(DotProperties.NODE_ID, "2") .node("n3").attr(DotProperties.NODE_LABEL, "3").attr(DotProperties.NODE_ID, "3") .edge("n1", "n2").edge("n1", "n3").build();

Page 20: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWTGEF4 Layout

GEF4 MVC

GEF4 MVC.FX

GEF4 MVC.FX.UI

GEF4 FX

GEF4 MVC.UI

GEF4 Graph

GEF4 Common

GEF4 FX.JFace

Page 21: GEF4 - Sightseeing Mars

GEF4 Layout• Provides abstractions (ILayoutAlgorithm, ILayoutContext,

ILayoutFilter) related to layout algorithms

• Provides concrete layout algorithm implementations: Grid, Box, Spring, HorizontalShift, Tree, Radial, SpaceTree, Sugiyama

Page 22: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWTGEF4 Layout

GEF4 MVC

GEF4 MVC.FX

GEF4 Zest.FX

GEF4 MVC.FX.UI

GEF4 FX

GEF4 MVC.UI

GEF4 Graph

GEF4 Zest.FX.UI

GEF4 Common

GEF4 FX.JFace

GEF4 Zest.FX.JFace

Page 23: GEF4 - Sightseeing Mars

GEF4 Zest• Provides graph based visualization with auto-layout

• Support for hierarchies with nested graphs

• Semantic zooming (zoom into nested graphs)• Provides a JFace API (ContentViewer, ContentProvider)• Customizable using CSS and GEF4 MVC mechanisms.• Rewritten from scratch, replacing the former Zest2 code

base, which was initially transferred to GEF4

Page 24: GEF4 - Sightseeing Mars

DEMO - GEF4 Zest.FX.UI Example

Page 25: GEF4 - Sightseeing Mars

GEF4 - Components

Image courtesy of AndiH / flickr

UI ≃ Eclipse UI FX ≃ JavaFX

GEF4 Geometry

GEF4 FX.SWTGEF4 Layout

GEF4 MVC

GEF4 MVC.FX

GEF4 Zest.FX

GEF4 MVC.FX.UI

GEF4 FX

GEF4 MVC.UI

GEF4 Graph

GEF4 Zest.FX.UI

GEF4 DOT

GEF4 Common

GEF4 Cloudio.

UI

GEF4 FX.JFace

GEF4 Zest.FX.JFace

GEF4 DOT.UI

Page 26: GEF4 - Sightseeing Mars

Image courtesy of Bilal Kamoon / flickr