public class FXPartUtils
extends java.lang.Object
FXPartUtils
class contains utility methods for the computation of
collective bounds (getUnionedVisualBoundsInScene(Collection)
), the
retrieval of the first IVisualPart
in the visual hierarchy of a given
Node
( retrieveVisualPart(IViewer, Node)
).Constructor and Description |
---|
FXPartUtils() |
Modifier and Type | Method and Description |
---|---|
static Rectangle |
getUnionedVisualBoundsInScene(java.util.Collection<? extends IVisualPart<javafx.scene.Node,? extends javafx.scene.Node>> parts)
Returns the unioned visual bounds of the given
IVisualPart s in
the coordinate system of the Scene . |
static IViewer<javafx.scene.Node> |
retrieveViewer(IDomain<javafx.scene.Node> domain,
javafx.scene.Node target)
|
static IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> |
retrieveVisualPart(IViewer<javafx.scene.Node> viewer,
javafx.scene.Node target)
Returns the first
IVisualPart in the visual hierarchy of the
given Node . |
public static Rectangle getUnionedVisualBoundsInScene(java.util.Collection<? extends IVisualPart<javafx.scene.Node,? 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 IViewer<javafx.scene.Node> retrieveViewer(IDomain<javafx.scene.Node> domain, javafx.scene.Node target)
public static IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> retrieveVisualPart(IViewer<javafx.scene.Node> 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 itemis AG and others. All rights reserved.