use of org.eclipse.gef4.zest.core.widgets.zooming.ZoomManager in project netxms by netxms.
the class ExtendedGraphViewer method createZoomActions.
/**
* Create zoom actions
* @return
*/
public Action[] createZoomActions(IHandlerService handlerService) {
final ZoomManager zoomManager = getZoomManager();
final Action[] actions = new Action[zoomLevels.length];
for (int i = 0; i < zoomLevels.length; i++) {
actions[i] = new ZoomAction(zoomLevels[i], zoomManager);
if (zoomLevels[i] == 1.00) {
actions[i].setChecked(true);
// $NON-NLS-1$
actions[i].setId("org.netxms.ui.eclipse.networkmaps.localActions.AbstractMap.Zoom100Pct");
// $NON-NLS-1$
actions[i].setActionDefinitionId("org.netxms.ui.eclipse.networkmaps.localCommands.AbstractMap.Zoom100Pct");
handlerService.activateHandler(actions[i].getActionDefinitionId(), new ActionHandler(actions[i]));
}
}
return actions;
}
Aggregations