Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse GEF
3.3

org.eclipse.gef
Class CompoundSnapToHelper

java.lang.Object
  extended by

org.eclipse.gef.SnapToHelper
      extended by
org.eclipse.gef.CompoundSnapToHelper
All Implemented Interfaces:
PositionConstants

public class CompoundSnapToHelper
extends SnapToHelper

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


Field Summary
 
Fields inherited from interface org.eclipse.draw2d. PositionConstants
ALWAYS_LEFT, ALWAYS_RIGHT, BOTTOM, CENTER, EAST, EAST_WEST, HORIZONTAL, LEFT, LEFT_CENTER_RIGHT, MIDDLE, NONE, NORTH, NORTH_EAST, NORTH_SOUTH, NORTH_WEST, NSEW, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TOP_MIDDLE_BOTTOM, VERTICAL, WEST
 
Constructor Summary
CompoundSnapToHelper ( SnapToHelper[] delegates)
          Constructs a compound snap to helper which will delegate to the provided array of helpers.
 
Method Summary
protected   SnapToHelper[] getDelegates ()
          Gets the array of helpers.
 int snapRectangle ( Request request, int snapOrientation, PrecisionRectangle baseRect, PrecisionRectangle result)
          Applies a snap correction to a Rectangle based on a given Rectangle.
 
Methods inherited from class org.eclipse.gef. SnapToHelper
makeAbsolute, makeRelative, snapPoint, 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

getDelegates

protected 
SnapToHelper[] getDelegates()
Gets the array of helpers.

Returns:
the array of helpers.
Since:
3.4

snapRectangle

public int snapRectangle(
Request request,
                         int snapOrientation,
                         
PrecisionRectangle baseRect,
                         
PrecisionRectangle result)
Description copied from class: SnapToHelper
Applies a snap correction to a Rectangle based on a given Rectangle. The provided baseRect will be used as a reference for snapping. The types of snapping to be performed are indicated by the snapOrientation parameter. The correction is applied to the result field.

The baseRect is not modified. The correction is applied to the result. The request's extended data may contain additional information about the snapping which was performed.

All coordinate information received and returned by this method should be in absolute coordinates.

Specified by:
snapRectangle in class SnapToHelper
Parameters:
request - the request or null
baseRect - the input rectangle
result - the correction is applied to this rectangle
snapOrientation - the input snap locations
Returns:
the remaining snap locations
See Also:
SnapToHelper.snapRectangle(Request, int, PrecisionRectangle, PrecisionRectangle)

Eclipse GEF
3.3

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire