Eclipse GEF
3.0

org.eclipse.gef
Class CompoundSnapToHelper

java.lang.Object
  extended byorg.eclipse.gef.SnapToHelper
      extended byorg.eclipse.gef.CompoundSnapToHelper

public class CompoundSnapToHelper
extends SnapToHelper

Combines multiple SnapToHelpers into one compound helper. The compound helper deletages to multiple other helpers.


Constructor Summary
CompoundSnapToHelper(SnapToHelper[] delegates)
          Constructs a compound snap to helper which will delegate to the provided array of helpers.
 
Method Summary
 int snapRectangle(Request request, int snapOrientation, PrecisionRectangle baseRect, PrecisionRectangle result)
           
 
Methods inherited from class org.eclipse.gef.SnapToHelper
makeAbsolute, makeRelative, snapPoint, snapRectangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundSnapToHelper

public CompoundSnapToHelper(SnapToHelper[] delegates)
Constructs a compound snap to helper which will delegate to the provided array of helpers. The first helper in the array has highest priority and will be given the first opportunity to perform snapping.

Parameters:
delegates - an array of helpers
Since:
3.0
Method Detail

snapRectangle

public int snapRectangle(Request request,
                         int snapOrientation,
                         PrecisionRectangle baseRect,
                         PrecisionRectangle result)
Overrides:
snapRectangle in class SnapToHelper
Parameters:
request - the request or null
baseRect - the prioritized rectangles to snap to
result - the output
snapOrientation - the input snap locations
Returns:
the remaining snap locations
See Also:
SnapToHelper#snapRectangle(Request, int, PrecisionRectangle, PrecisionRectangle)

Eclipse GEF
3.0

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.