public class PartUtils
extends java.lang.Object
IVisualPart
s.Constructor and Description |
---|
PartUtils() |
Modifier and Type | Method and Description |
---|---|
static <T extends IVisualPart<? extends javafx.scene.Node>> |
filterParts(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts,
java.lang.Class<T> type)
Searches the given collection of
IVisualPart s for elements of the
specified type. |
static <T extends IVisualPart<? extends javafx.scene.Node>> |
filterParts(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts,
java.util.function.Predicate<? super IVisualPart<? extends javafx.scene.Node>> filter)
Searches the given collection of
IVisualPart s for elements of the
specified type. |
static java.util.List<IVisualPart<? extends javafx.scene.Node>> |
getAnchoreds(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> anchorages)
Collects the anchoreds of all given
IVisualPart s. |
static java.util.Set<IVisualPart<? extends javafx.scene.Node>> |
getAnchoreds(IVisualPart<? extends javafx.scene.Node> anchorage,
java.lang.String role)
Collects the anchoreds of the given
IVisualPart which are
registered under the specified role. |
static Rectangle |
getUnionedVisualBoundsInScene(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts)
Returns the unioned visual bounds of the given
IVisualPart s in
the coordinate system of the Scene . |
static IViewer |
retrieveViewer(IDomain domain,
javafx.scene.Node target)
|
static IVisualPart<? extends javafx.scene.Node> |
retrieveVisualPart(IViewer viewer,
javafx.scene.Node target)
Returns the first
IVisualPart in the visual hierarchy of the
given Node . |
public static <T extends IVisualPart<? extends javafx.scene.Node>> java.util.List<T> filterParts(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts, java.lang.Class<T> type)
IVisualPart
s for elements of the
specified type.T
- The type of returned elements.parts
- The collection of parts which is filtered.type
- The type of returned elements.public static <T extends IVisualPart<? extends javafx.scene.Node>> java.util.List<T> filterParts(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts, java.util.function.Predicate<? super IVisualPart<? extends javafx.scene.Node>> filter)
IVisualPart
s for elements of the
specified type.T
- The type of returned elements.parts
- The collection of parts which is filtered.filter
- The type of returned elements.public static java.util.List<IVisualPart<? extends javafx.scene.Node>> getAnchoreds(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> anchorages)
IVisualPart
s.anchorages
- The collection of IVisualPart
s for which the anchoreds
are collected.IVisualPart
s.public static java.util.Set<IVisualPart<? extends javafx.scene.Node>> getAnchoreds(IVisualPart<? extends javafx.scene.Node> anchorage, java.lang.String role)
IVisualPart
which are
registered under the specified role.anchorage
- The IVisualPart
for which the anchoreds are collected.role
- The role under which the anchoreds have to be registered to be
collected.IVisualPart
which
are registered under the specified role.public static Rectangle getUnionedVisualBoundsInScene(java.util.Collection<? extends IVisualPart<? extends javafx.scene.Node>> parts)
IVisualPart
s in
the coordinate system of the Scene
.parts
- The IVisualPart
s for which the unioned bounds are
computed.IVisualPart
s in
the coordinate system of the Scene
.public static IVisualPart<? extends javafx.scene.Node> retrieveVisualPart(IViewer viewer, javafx.scene.Node target)
IVisualPart
in the visual hierarchy of the
given Node
. If no IVisualPart
can be found within the
visual hierarchy of the Node
, the IRootPart
of the given
IViewer
is returned.viewer
- The IViewer
in which the IVisualPart
is
searched.target
- The Node
for which the corresponding
IVisualPart
is to be returned.IVisualPart
in the visual hierarchy of the
given Node
, or the IRootPart
of the given
IViewer
.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.