[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.gef] ZoomManager reference for Zest GraphViewer

Hi,
I am using Zest for visualization.I have a scenario where I need to have zoom capabilities from toolbar of a editorpart.I have created form in EditorPart.In the form I have created a toolbar for which I need zoom capabilities.


Following is the code snippet:

viewer=new GraphViewer(parent,SWT.NONE);
viewer.setContentProvider(new MyContentProvider());
viewer.setLabelProvider(new MyLabelProvider());
viewer.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED|ZestStyles.CONNECTIONS_SOLID);
viewer.setLayoutAlgorithm(new SpringLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING));
viewer.setInput(new Object());
toolbarZoomContributionViewItem = new ZoomContributionViewItem(this);
ToolBarManager tbMgr = new ToolBarManager();
tbMgr.add(toolbarZoomContributionViewItem );



Zoom options are working fine for contextmenu operations, but if I want to get zoom options through toolbar by passing contribution item,its not possible.


   I found zoomTo() method in GraphViewer, but it do not work.
Is there any way to get the ZoomManager reference?