public final class ViewportUtilities
extends java.lang.Object
Viewport
s.Modifier and Type | Method and Description |
---|---|
static java.util.List |
getEnclosingViewportsPath(IFigure figure)
|
static Viewport |
getNearestCommonViewport(IFigure firstFigure,
IFigure secondFigure)
|
static Viewport |
getNearestEnclosingViewport(IFigure figure)
|
static Viewport |
getNearestViewport(IFigure figure)
|
static Viewport |
getRootViewport(IFigure figure)
|
static java.util.List |
getViewportsPath(Viewport leafViewport,
Viewport rootViewport)
|
static java.util.List |
getViewportsPath(Viewport leafViewport,
Viewport rootViewport,
boolean includeRootViewport)
|
public static java.util.List getEnclosingViewportsPath(IFigure figure)
public static java.util.List getViewportsPath(Viewport leafViewport, Viewport rootViewport)
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.leafViewport
- The Viewport
, whose parent hierarchy is processed.rootViewport
- an ancestor of the given leafViewport, which marks the end
point of the hierarchy to be processed.Viewport
s containing the leaf Viewport
as the first element, the root Viewport
as the last and
in between all enclosing Viewport
s of the leaf
Viewport
up to the root. Returns an empty list in case
leaf or root Viewport
are null or in case the root
viewport is not an ancestor of the leaf Viewport
.public static java.util.List getViewportsPath(Viewport leafViewport, Viewport rootViewport, boolean includeRootViewport)
Viewport
as the first
element, and all its enclosing Viewport
s up to the root
Viewport
. The root Viewport
forms the last element of the
list, in case includeRootViewport is set to true, otherwise the viewport
directly nested below the root viewport will be the last in the list.leafViewport
- The Viewport
, whose parent hierarchy is processed.rootViewport
- an ancestor of the given leafViewport, which marks the end
point of the hierarchy to be processed.includeRootViewport
- whether the provided rootViewport should be included in the
list of returned viewports (as the last one) or not.Viewport
s containing the leaf Viewport
as the first element, the root Viewport
as the last and
in between all enclosing Viewport
s of the leaf
Viewport
up to the root. Returns an empty list in case
leaf or root Viewport
are null or in case the root
viewport is not an ancestor of the leaf Viewport
.public static Viewport getNearestCommonViewport(IFigure firstFigure, IFigure secondFigure)
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.