public class ChangeBoundsRequest extends GroupRequest implements DropRequest
Constructor and Description |
---|
ChangeBoundsRequest()
Default constructor.
|
ChangeBoundsRequest(java.lang.Object type)
Creates a ChangeBoundsRequest with the given type.
|
Modifier and Type | Method and Description |
---|---|
Point |
getLocation()
Returns the location of the mouse pointer.
|
Point |
getMouseLocation()
Deprecated.
Use
getLocation() |
Point |
getMoveDelta()
Returns a Point representing the distance the EditPart has moved.
|
int |
getResizeDirection()
Returns the direction the figure is being resized.
|
Dimension |
getSizeDelta()
Returns a Dimension representing how much the EditPart has been resized.
|
Rectangle |
getTransformedRectangle(Rectangle rect)
Transforms a copy of the passed in rectangle to account for the move
and/or resize deltas and returns this copy.
|
boolean |
isCenteredResize()
Returns true if the request is for a centered resize.
|
boolean |
isConstrainedMove()
Returns
true if the request is for a constrained move |
boolean |
isConstrainedResize()
Returns
true if the request is for a constrained resize |
boolean |
isSnapToEnabled()
Returns
true if snap-to is enabled |
void |
setCenteredResize(boolean value)
Used to set whether a centered resize is being performed.
|
void |
setConstrainedMove(boolean value)
Used to set whether a constrained move is being performed.
|
void |
setConstrainedResize(boolean value)
Used to set whether a constrained resize is being performed.
|
void |
setLocation(Point p)
Sets the location of the mouse pointer.
|
void |
setMouseLocation(Point p)
Deprecated.
|
void |
setMoveDelta(Point p)
Sets the move delta.
|
void |
setResizeDirection(int dir)
Sets the direction the figure is being resized.
|
void |
setSizeDelta(Dimension d)
Sets the size delta.
|
void |
setSnapToEnabled(boolean value)
Used to set whether snap-to is being performed.
|
getEditParts, setEditParts, setEditParts
getExtendedData, getType, setExtendedData, setType
public ChangeBoundsRequest()
public ChangeBoundsRequest(java.lang.Object type)
type
- The type of Request.public Point getLocation()
getLocation
in interface DropRequest
public Point getMouseLocation()
getLocation()
public Point getMoveDelta()
public int getResizeDirection()
public Dimension getSizeDelta()
public Rectangle getTransformedRectangle(Rectangle rect)
rect
- the rectangle to transformpublic boolean isCenteredResize()
true
if centered resizepublic boolean isConstrainedMove()
true
if the request is for a constrained movetrue
if a constrained movepublic boolean isConstrainedResize()
true
if the request is for a constrained resizetrue
if a constrained resizepublic boolean isSnapToEnabled()
true
if snap-to is enabledtrue
if the request is for a creation with snap-to
enabledpublic void setCenteredResize(boolean value)
value
- true
if the request is for a centered resizepublic void setConstrainedMove(boolean value)
value
- true
if the request is for a constrained movepublic void setConstrainedResize(boolean value)
value
- true
if the request is for a constrained resizepublic void setLocation(Point p)
p
- The location of the mouse pointer.public void setMouseLocation(Point p)
setLocation(Point)
p
- The location of the mouse pointer.public void setMoveDelta(Point p)
p
- The Point representing the move deltapublic void setResizeDirection(int dir)
dir
- the direction of the resizegetResizeDirection()
public void setSizeDelta(Dimension d)
d
- The Dimension representing the size delta.public void setSnapToEnabled(boolean value)
value
- true
if the request is for a creation with
snap-to enabledCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.