Package org.eclipse.graphiti.ui.internal.util.draw2d

# Class ZoomingRelativeHandleLocator

java.lang.Object
org.eclipse.draw2d.RelativeLocator
org.eclipse.graphiti.ui.internal.util.draw2d.ZoomingRelativeHandleLocator

All Implemented Interfaces:
  `org.eclipse.draw2d.Locator`

public class ZoomingRelativeHandleLocator extends org.eclipse.draw2d.RelativeLocator implements org.eclipse.draw2d.Locator
A Locator, which sets the target bounds depending on the reference figure bounds according to the following rules:

- The handle-insets are used to expand/shrink the reference figure bounds, at the beginning of the calculation. They are adjusted with the current zoom-level.
- The location can be one of the north-south-east-west constants in `PositionConstants`. It describes the side/corner of the reference figure bounds at which the target is located.
- The handle-dimension defines the dimension of the target bounds. They are adjusted with the current zoom-level.

## Constructor Summary

Constructors
Constructor
Description
`ZoomingRelativeHandleLocator(org.eclipse.draw2d.IFigure reference, IConfigurationProvider configurationProvider, int location, org.eclipse.draw2d.geometry.Dimension handleDimension, org.eclipse.draw2d.geometry.Dimension handleInsets)`
Creates a new ZoomingInsetsHandleLocator.

## Method Summary

Modifier and Type
Method
Description
`protected org.eclipse.draw2d.geometry.Rectangle`
`getReferenceBox()`
Returns the reference figure bounds adjusted by the insets.
`void`
`relocate(org.eclipse.draw2d.IFigure target)`
Sets the bounds of the target figure as described above.

### Methods inherited from class org.eclipse.draw2d.RelativeLocator

`getReferenceFigure, setReferenceFigure`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ZoomingRelativeHandleLocator

public ZoomingRelativeHandleLocator(org.eclipse.draw2d.IFigure reference, IConfigurationProvider configurationProvider, int location, org.eclipse.draw2d.geometry.Dimension handleDimension, org.eclipse.draw2d.geometry.Dimension handleInsets)
Creates a new ZoomingInsetsHandleLocator.

Parameters:
  `reference` - The target bounds are calculated depending on this reference figure.
  `configurationProvider` - The configuration provider which can be used to access the environment.
  `location` - The location can be one of the north-south-east-west constants in `PositionConstants`.
  `handleDimension` - The dimension of the target bounds.
  `handleInsets` - The insets to apply to the reference figure bounds.

## Method Details

### getReferenceBox

protected org.eclipse.draw2d.geometry.Rectangle getReferenceBox()
Returns the reference figure bounds adjusted by the insets.

Overrides:
  `getReferenceBox` in class `org.eclipse.draw2d.RelativeLocator`
Returns:
  The reference figure bounds adjusted by the insets.

### relocate

public void relocate(org.eclipse.draw2d.IFigure target)
Sets the bounds of the target figure as described above.

Specified by:
  `relocate` in interface `org.eclipse.draw2d.Locator`
Overrides:
  `relocate` in class `org.eclipse.draw2d.RelativeLocator`
Parameters:
  `target` - The target figure for which to set the bounds.