|
Eclipse Draw2d 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.draw2d.ViewportUtilities
public final class ViewportUtilities
Utility class to support working with Viewports.
| Method Summary | |
|---|---|
static List |
getEnclosingViewportsPath(IFigure figure)
Returns all enclosing Viewports for a given IFigure,
beginning with its direct enclosing Viewport up the root
Viewport in the figure's parent hierarchy. |
static Viewport |
getNearestCommonViewport(IFigure firstFigure,
IFigure secondFigure)
Returns the nearest common enclosing Viewport for two given
Figures. |
static Viewport |
getNearestEnclosingViewport(IFigure figure)
Returns the nearest enclosing Viewport of a given IFigure
by walking up the figure's hierarchy. |
static Viewport |
getNearestViewport(IFigure figure)
Returns the given figure in case it is a Viewport itself,
otherwise its nearest enclosing Viewport. |
static Viewport |
getRootViewport(IFigure figure)
Returns the upper most enclosing Viewport for the given
IFigure. |
static List |
getViewportsPath(Viewport leafViewport,
Viewport rootViewport)
Returns a list containing the provided leaf Viewport as the first
element, and all its enclosing Viewports up to the root
Viewport, where the root Viewport forms the last element
of the list. |
static List |
getViewportsPath(Viewport leafViewport,
Viewport rootViewport,
boolean includeRootViewport)
Returns a list containing the provided leaf Viewport as the first
element, and all its enclosing Viewports up to the root
Viewport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static List getEnclosingViewportsPath(IFigure figure)
Viewports for a given IFigure,
beginning with its direct enclosing Viewport up the root
Viewport in the figure's parent hierarchy.
figure -
Viewports representing the figure's enclosing
Viewport path, where the nearest enclosing
Viewport as the first element and the root
Viewport as the last element. In case there is no
enclosing Viewport, an empty list is returned.
public static List getViewportsPath(Viewport leafViewport,
Viewport rootViewport)
Viewport as the first
element, and all its enclosing Viewports 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.
Viewports containing the leaf Viewport
as the first element, the root Viewport as the last and
in between all enclosing Viewports 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 List getViewportsPath(Viewport leafViewport,
Viewport rootViewport,
boolean includeRootViewport)
Viewport as the first
element, and all its enclosing Viewports 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.
Viewports containing the leaf Viewport
as the first element, the root Viewport as the last and
in between all enclosing Viewports 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)
Viewport for two given
Figures.
firstFigure - secondFigure -
Viewport of the two given figures, or
null if no common enclosing Viewport could be found.public static Viewport getRootViewport(IFigure figure)
Viewport for the given
IFigure.
figure -
Viewport or null if there is no
enclosing Viewport for the given IFigure,public static Viewport getNearestViewport(IFigure figure)
Viewport itself,
otherwise its nearest enclosing Viewport.
figure -
Viewport itself,
otherwise the nearest enclosing Viewport or null if there
is no nearest enclosing Viewport.public static Viewport getNearestEnclosingViewport(IFigure figure)
Viewport of a given IFigure
by walking up the figure's hierarchy.
figure -
Viewport of the given figure, or
null if none could be found.
|
Eclipse Draw2d 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||