public class RectangleReshapeHandleProvider extends AbstractReshapeHandleProvider
IReshapeHandleProvider
that returns handles that modify a
IMutableRectangle
.Constructor and Description |
---|
RectangleReshapeHandleProvider(IMutableRectangle rectangle)
Creates a default instance that provide handles for each of the positions given for the rectangle.
|
RectangleReshapeHandleProvider(IMutableRectangle rectangle,
HandlePositions handlePositions)
Creates a default instance that provide handles for each of the positions given for the rectangle.
|
Modifier and Type | Method and Description |
---|---|
IHandle |
getHandle(IInputModeContext context,
HandlePositions position)
Provides a
IHandle that uses the rectangle instance to perform the actual reshaping. |
protected IMutableRectangle |
getRectangle()
The rectangle to read the current state from.
|
getAvailableHandles, getHandlePositions, getMaximumSize, getMinimumEnclosedArea, getMinimumSize, setHandlePositions, setMaximumSize, setMinimumEnclosedArea, setMinimumSize
public RectangleReshapeHandleProvider(IMutableRectangle rectangle)
rectangle
- The rectangle to create handles for.public RectangleReshapeHandleProvider(IMutableRectangle rectangle, HandlePositions handlePositions)
rectangle
- The rectangle to create handles for.handlePositions
- A bitwise combination of all handle positions this instance should provide a handle for.public IHandle getHandle(IInputModeContext context, HandlePositions position)
IHandle
that uses the rectangle instance to perform the actual reshaping.
This method may be called for each possible single position contained in the set as returned by
IReshapeHandleProvider.getAvailableHandles(IInputModeContext)
.
getHandle
in interface IReshapeHandleProvider
getHandle
in class AbstractReshapeHandleProvider
context
- The context for which the handles are queried.position
- The position to provide an instance for.protected final IMutableRectangle getRectangle()