# Uses of Class
org.eclipse.draw2d.Viewport

Packages that use Viewport
Package
Description
org.eclipse.draw2d
Primary package containing general interfaces and implementation classes.
org.eclipse.draw2d.parts
This package contains some complex parts used with Draw2d.

## Uses of Viewport in org.eclipse.draw2d

Subclasses of Viewport in org.eclipse.draw2d
Modifier and Type
Class
Description
`class`
`FreeformViewport`
A viewport for `FreeformFigures`.
Fields in org.eclipse.draw2d declared as Viewport
Modifier and Type
Field
Description
`protected Viewport`
ScrollPane.`viewport`
The viewport being scrolled
Methods in org.eclipse.draw2d that return Viewport
Modifier and Type
Method
Description
`static Viewport`
ViewportUtilities.`getNearestCommonViewport(IFigure firstFigure, IFigure secondFigure)`
Returns the nearest common enclosing `Viewport` for two given `Figure`s.
`static Viewport`
ViewportUtilities.`getNearestEnclosingViewport(IFigure figure)`
Returns the nearest enclosing `Viewport` of a given `IFigure` by walking up the figure's hierarchy.
`static Viewport`
ViewportUtilities.`getNearestViewport(IFigure figure)`
Returns the given figure in case it is a `Viewport` itself, otherwise its nearest enclosing `Viewport`.
`protected Viewport`
ViewportAwareConnectionLayerClippingStrategy.`getRootViewport()`
Returns the root viewport, i.e. the nearest enclosing viewport of the connection layer, which corresponds to the nearest enclosing common viewport of primary and connection layer.
`static Viewport`
ViewportUtilities.`getRootViewport(IFigure figure)`
Returns the upper most enclosing `Viewport` for the given `IFigure`.
`Viewport`
FigureCanvas.`getViewport()`
Returns the Viewport.
`Viewport`
ScrollPane.`getViewport()`
Returns the ScrollPane's `Viewport`.
Methods in org.eclipse.draw2d that return types with arguments of type Viewport
Modifier and Type
Method
Description
`static List<Viewport>`
ViewportUtilities.`getEnclosingViewportsPath(IFigure figure)`
Returns all enclosing `Viewport`s for a given `IFigure`, beginning with its direct enclosing `Viewport` up the root `Viewport` in the figure's parent hierarchy.
`static List<Viewport>`
ViewportUtilities.`getViewportsPath(Viewport leafViewport, Viewport rootViewport)`
Returns a list containing the provided leaf `Viewport` as the first element, and all its enclosing `Viewport`s up to the root `Viewport`, where the root `Viewport` forms the last element of the list.
`static List<Viewport>`
ViewportUtilities.`getViewportsPath(Viewport leafViewport, Viewport rootViewport, boolean includeRootViewport)`
Returns a list containing the provided leaf `Viewport` as the first element, and all its enclosing `Viewport`s up to the root `Viewport`.
Methods in org.eclipse.draw2d with parameters of type Viewport
Modifier and Type
Method
Description
`protected Rectangle`
ViewportAwareConnectionLayerClippingStrategy.`getAbsoluteViewportAreaAsCopy(Viewport viewport)`
Returns the area covered by the viewport in absolute coordinates.
`static List<Viewport>`
ViewportUtilities.`getViewportsPath(Viewport leafViewport, Viewport rootViewport)`
Returns a list containing the provided leaf `Viewport` as the first element, and all its enclosing `Viewport`s up to the root `Viewport`, where the root `Viewport` forms the last element of the list.
`static List<Viewport>`
ViewportUtilities.`getViewportsPath(Viewport leafViewport, Viewport rootViewport, boolean includeRootViewport)`
Returns a list containing the provided leaf `Viewport` as the first element, and all its enclosing `Viewport`s up to the root `Viewport`.
`void`
FigureCanvas.`setViewport(Viewport vp)`
Sets the Viewport.
`void`
ScrollPane.`setViewport(Viewport vp)`
Sets the ScrollPane's Viewport to the passed value.
`static ScrollPaneSolver.Result`
ScrollPaneSolver.`solve(Rectangle clientArea, Viewport viewport, int hVis, int vVis, int vBarWidth, int hBarHeight)`
Solves for the viewport area, insets, and visibility of horizontal and vertical scrollbars of a ScrollPane
Method parameters in org.eclipse.draw2d with type arguments of type Viewport
Modifier and Type
Method
Description
`protected void`
ViewportAwareConnectionLayerClippingStrategy.`clipAtViewports(Rectangle clipRect, List<Viewport> enclosingViewportsPath)`
Clips the given clipRect at all given viewports.

## Uses of Viewport in org.eclipse.draw2d.parts

Methods in org.eclipse.draw2d.parts that return Viewport
Modifier and Type
Method
Description
`final Viewport`
ScrollableThumbnail.`getViewport()`
Get the viewport used for this ScrollableThumbnail
Methods in org.eclipse.draw2d.parts with parameters of type Viewport
Modifier and Type
Method
Description
`void`
ScrollableThumbnail.`setViewport(Viewport port)`
Sets the Viewport that this ScrollableThumbnail will synch with.
Constructors in org.eclipse.draw2d.parts with parameters of type Viewport
Modifier
Constructor
Description
``
`ScrollableThumbnail(Viewport port)`
Creates a new ScrollableThumbnail that synchs with the given Viewport.