using a ZoomContributionViewItem in a view

366 Views Asked by At

I saw that it's possible to add a combo in the toolbar of a view to zoom a graph but the problem is that it's used with JFace and I just want to know if it's possible to work with this class of zest ( ZoomContributionViewItem ) only with SWT since I'm using a Graph and not a GraphViewer .

I'm a beginner with Zest and I don't really understand the difference between the two methods ( JFace and SWT with Zest ) so would you please first tell me if it's possible to make the zoom with a graph and not a graphviewer and second explain me the difference between these methods

Thank you so much for your help

1

There are 1 best solutions below

0
On

I found a solution it was simple

GraphViewer viewer = new GraphViewer(parent, SWT.NONE);
Graph g = viewer.getGraphControl();

and then I continued working with the graph normally whithout using the viewer