de.cau.cs.kieler.core.model.handlers
Class ZoomToFitHandler
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.AbstractHandler
de.cau.cs.kieler.core.model.handlers.ZoomToFitHandler
- All Implemented Interfaces:
- IHandler, IHandler2
public class ZoomToFitHandler
- extends AbstractHandler
A handler used to zoom the diagram to fit.
- Rating

Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZoomToFitHandler
public ZoomToFitHandler()
execute
public Object execute(ExecutionEvent event)
throws ExecutionException
-
- Throws:
ExecutionException
zoomToFitAllNodes
public static void zoomToFitAllNodes(IEditorPart editor)
- Zoom-to-fit the diagram in the given editor. This considers only nodes
and no edges. The problem with edges is that zooming fails in case of
collapsed compartments that contain edges.
- Parameters:
editor
- the editor to zoom
resetViewLocation
public static void resetViewLocation(IEditorPart editor)
- Reset the scrolling of the editor to the upper left corner.
- Parameters:
editor
- the current editor