Package org.eclipse.gef.requests
Class ChangeBoundsRequest
java.lang.Object
org.eclipse.gef.Request
org.eclipse.gef.requests.GroupRequest
org.eclipse.gef.requests.ChangeBoundsRequest
- All Implemented Interfaces:
- DropRequest
- Direct Known Subclasses:
- AlignmentRequest
A Request to change the bounds of the EditPart(s).
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.ChangeBoundsRequest(Object type) Creates a ChangeBoundsRequest with the given type.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the location of the mouse pointer.Deprecated.Returns a Point representing the distance the EditPart has moved.intReturns the direction the figure is being resized.Returns a Dimension representing how much the EditPart has been resized.Transforms a copy of the passed in rectangle to account for the move and/or resize deltas and returns this copy.booleanReturns true if the request is for a centered resize.booleanReturnstrueif the request is for a constrained movebooleanReturnstrueif the request is for a constrained resizebooleanReturnstrueif snap-to is enabledvoidsetCenteredResize(boolean value) Used to set whether a centered resize is being performed.voidsetConstrainedMove(boolean value) Used to set whether a constrained move is being performed.voidsetConstrainedResize(boolean value) Used to set whether a constrained resize is being performed.voidsetLocation(Point p) Sets the location of the mouse pointer.voidDeprecated.voidSets the move delta.voidsetResizeDirection(int dir) Sets the direction the figure is being resized.voidSets the size delta.voidsetSnapToEnabled(boolean value) Used to set whether snap-to is being performed.Methods inherited from class org.eclipse.gef.requests.GroupRequestgetEditParts, setEditParts, setEditPartsMethods inherited from class org.eclipse.gef.RequestgetExtendedData, getType, setExtendedData, setType
- 
Constructor Details- 
ChangeBoundsRequestpublic ChangeBoundsRequest()Default constructor.
- 
ChangeBoundsRequestCreates a ChangeBoundsRequest with the given type.- Parameters:
- type- The type of Request.
 
 
- 
- 
Method Details- 
getLocationReturns the location of the mouse pointer.- Specified by:
- getLocationin interface- DropRequest
- Returns:
- The location of the mouse pointer.
 
- 
getMouseLocationDeprecated.UsegetLocation()- Returns:
- The location of the mouse pointer.
 
- 
getMoveDeltaReturns a Point representing the distance the EditPart has moved.- Returns:
- A Point representing the distance the EditPart has moved.
 
- 
getResizeDirectionpublic int getResizeDirection()Returns the direction the figure is being resized. Possible values are- Returns:
- the resize direction
 
- 
getSizeDeltaReturns a Dimension representing how much the EditPart has been resized.- Returns:
- A Dimension representing how much the EditPart has been resized.
 
- 
getTransformedRectangleTransforms a copy of the passed in rectangle to account for the move and/or resize deltas and returns this copy.- Parameters:
- rect- the rectangle to transform
- Returns:
- a copy of the passed in rectangle representing the new bounds
 
- 
isCenteredResizepublic boolean isCenteredResize()Returns true if the request is for a centered resize.- Returns:
- trueif centered resize
- Since:
- 3.0
 
- 
isConstrainedMovepublic boolean isConstrainedMove()Returnstrueif the request is for a constrained move- Returns:
- trueif a constrained move
- Since:
- 3.0
 
- 
isConstrainedResizepublic boolean isConstrainedResize()Returnstrueif the request is for a constrained resize- Returns:
- trueif a constrained resize
- Since:
- 3.0
 
- 
isSnapToEnabledpublic boolean isSnapToEnabled()Returnstrueif snap-to is enabled- Returns:
- trueif the request is for a creation with snap-to enabled
- Since:
- 3.7
 
- 
setCenteredResizepublic void setCenteredResize(boolean value) Used to set whether a centered resize is being performed.- Parameters:
- value-- trueif the request is for a centered resize
- Since:
- 3.0
 
- 
setConstrainedMovepublic void setConstrainedMove(boolean value) Used to set whether a constrained move is being performed.- Parameters:
- value-- trueif the request is for a constrained move
- Since:
- 3.0
 
- 
setConstrainedResizepublic void setConstrainedResize(boolean value) Used to set whether a constrained resize is being performed.- Parameters:
- value-- trueif the request is for a constrained resize
- Since:
- 3.0
 
- 
setLocationSets the location of the mouse pointer.- Parameters:
- p- The location of the mouse pointer.
 
- 
setMouseLocationDeprecated.- Parameters:
- p- The location of the mouse pointer.
 
- 
setMoveDeltaSets the move delta.- Parameters:
- p- The Point representing the move delta
 
- 
setResizeDirectionpublic void setResizeDirection(int dir) Sets the direction the figure is being resized.- Parameters:
- dir- the direction of the resize
- See Also:
 
- 
setSizeDeltaSets the size delta.- Parameters:
- d- The Dimension representing the size delta.
 
- 
setSnapToEnabledpublic void setSnapToEnabled(boolean value) Used to set whether snap-to is being performed.- Parameters:
- value-- trueif the request is for a creation with snap-to enabled
- Since:
- 3.7
 
 
- 
getLocation()