public class BoundsSnappingLocationProvider extends java.lang.Object implements ISnappingLocationProvider
BoundsSnappingLocationProvider
determines
SnappingModel.SnappingLocation
s along the bounds of the individual
IContentPart
s that contribute to snapping. By default, only the
minimum and maximum locations within the bounds are used for snapping.Constructor and Description |
---|
BoundsSnappingLocationProvider() |
Modifier and Type | Method and Description |
---|---|
java.util.List<SnappingModel.SnappingLocation> |
getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)
Returns the horizontal
SnappingModel.SnappingLocation s for the given
IContentPart . |
protected java.util.List<SnappingModel.SnappingLocation> |
getSnappingLocations(IContentPart<? extends javafx.scene.Node> part,
javafx.geometry.Orientation orient,
double... ratios)
Iterates over the given ratios and interpolates positions within the
bounds for the individual ratios.
|
java.util.List<SnappingModel.SnappingLocation> |
getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)
Returns the vertical
SnappingModel.SnappingLocation s for the given
IContentPart . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
union
public java.util.List<SnappingModel.SnappingLocation> getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)
ISnappingLocationProvider
SnappingModel.SnappingLocation
s for the given
IContentPart
.getHorizontalSnappingLocations
in interface ISnappingLocationProvider
part
- The IContentPart
for which to compute the
SnappingModel.SnappingLocation
s.List
of all horizontal SnappingModel.SnappingLocation
s for
the given IContentPart
.protected java.util.List<SnappingModel.SnappingLocation> getSnappingLocations(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orient, double... ratios)
part
- The IContentPart
for which SnappingModel.SnappingLocation
s
are computed.orient
- The Orientation
for the SnappingModel.SnappingLocation
s.ratios
- The ratios at which snapping locations should be placed along
the bounds.SnappingModel.SnappingLocation
s for the given IContentPart
according to its bounds and the given ratios.public java.util.List<SnappingModel.SnappingLocation> getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)
ISnappingLocationProvider
SnappingModel.SnappingLocation
s for the given
IContentPart
.getVerticalSnappingLocations
in interface ISnappingLocationProvider
part
- The IContentPart
for which to compute the
SnappingModel.SnappingLocation
s.List
of all vertical SnappingModel.SnappingLocation
s for the
given IContentPart
.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.