Package org.eclipse.gef.editparts
Class ZoomManager
java.lang.Object
org.eclipse.draw2d.zoom.AbstractZoomManager
org.eclipse.gef.editparts.ZoomManager
public class ZoomManager
extends org.eclipse.draw2d.zoom.AbstractZoomManager
Manage the primary zoom function in a graphical viewer. This class is used by
 the zoom contribution items, including:
 
 
 A ZoomManager controls how zoom in and zoom out are performed. It also
 determines the list of choices the user sees in the drop-down Combo on the
 toolbar. The zoom manager controls a ScalableFigure, which
 performs the actual zoom, and also a Viewport. The viewport is
 needed so that the scrolled location is preserved as the zoom level changes.
 
 NOTE: For the settings of Page, Width and Height to work properly, the given
 Viewport should have its scrollbars always visible or never
 visible. Otherwise, these settings may cause undesired effects.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringString constant for the "Page" zoom level.static final StringString constant for the "Height" zoom level.static final StringString constant for the "Width" zoom level.Fields inherited from class org.eclipse.draw2d.zoom.AbstractZoomManagerANIMATE_NEVER, ANIMATE_ZOOM_IN_OUT
- 
Constructor SummaryConstructorsConstructorDescriptionZoomManager(ScalableFigure pane, Viewport viewport) Creates a new ZoomManager.ZoomManager(ScalableFigure pane, Viewport viewport, org.eclipse.draw2d.zoom.IZoomScrollPolicy scrollPolicy) Creates a new ZoomManager.ZoomManager(ScalableFreeformLayeredPane pane, Viewport viewport) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptiongetPane()Deprecated.UseAbstractZoomManager.getScalableFigure()instead.protected booleanprotected booleanisFitHeight(String zoomString) protected booleanisFitWidth(String zoomString) Methods inherited from class org.eclipse.draw2d.zoom.AbstractZoomManageraddZoomListener, canZoomIn, canZoomOut, fireZoomChanged, getFitHeightZoomLevel, getFitPageZoomLevel, getFitWidthZoomLevel, getMaxZoom, getMinZoom, getNextZoomLevel, getPreviousZoomLevel, getScalableFigure, getUIMultiplier, getViewport, getZoom, getZoomAsText, getZoomLevelContributions, getZoomLevels, getZoomLevelsAsText, primSetZoom, removeZoomListener, setScrollPolicy, setUIMultiplier, setViewLocation, setZoom, setZoomAnimationStyle, setZoomAsText, setZoomLevelContributions, setZoomLevels, zoomIn, zoomOut, zoomTo
- 
Field Details- 
FIT_HEIGHTString constant for the "Height" zoom level. At this zoom level, the zoom manager will adopt a zoom setting such that the entire height of the diagram will be visible on the screen.
- 
FIT_WIDTHString constant for the "Width" zoom level. At this zoom level, the zoom manager will adopt a zoom setting such that the entire width of the diagram will be visible on the screen.
- 
FIT_ALLString constant for the "Page" zoom level. At this zoom level, the zoom manager will adopt a zoom setting such that the entire diagram will be visible on the screen.
 
- 
- 
Constructor Details- 
ZoomManagerCreates a new ZoomManager.- Parameters:
- pane- The ScalableFigure associated with this ZoomManager
- viewport- The Viewport associated with this ZoomManager
 
- 
ZoomManagerDeprecated.UseZoomManager(ScalableFigure, Viewport)instead. Creates a new ZoomManager- Parameters:
- pane- The ScalableFreeformLayeredPane associated with this ZoomManager
- viewport- The Viewport associated with this viewport
 
- 
ZoomManagerpublic ZoomManager(ScalableFigure pane, Viewport viewport, org.eclipse.draw2d.zoom.IZoomScrollPolicy scrollPolicy) Creates a new ZoomManager.- Parameters:
- pane- The ScalableFigure associated with this ZoomManager
- viewport- The Viewport associated with this ZoomManager
- scrollPolicy- The zoom scroll policy to be used with this ZoomManager
- Since:
- 3.13
 
 
- 
- 
Method Details- 
getPaneDeprecated.UseAbstractZoomManager.getScalableFigure()instead. Returns the pane.- Returns:
- the pane
 
- 
isFitWidth- Specified by:
- isFitWidthin class- org.eclipse.draw2d.zoom.AbstractZoomManager
 
- 
isFitAll- Specified by:
- isFitAllin class- org.eclipse.draw2d.zoom.AbstractZoomManager
 
- 
isFitHeight- Specified by:
- isFitHeightin class- org.eclipse.draw2d.zoom.AbstractZoomManager
 
 
- 
ZoomManager(ScalableFigure, Viewport)instead.