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

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.requests
Class ChangeBoundsRequest

java.lang.Object
  extended by

org.eclipse.gef.Request
      extended by

org.eclipse.gef.requests.GroupRequest
          extended by
org.eclipse.gef.requests.ChangeBoundsRequest
All Implemented Interfaces:
DropRequest
Direct Known Subclasses:
AlignmentRequest

public class ChangeBoundsRequest
extends GroupRequest
implements DropRequest

A Request to change the bounds of the EditPart(s).


Constructor Summary
ChangeBoundsRequest ()
          Default constructor.
ChangeBoundsRequest (java.lang.Object type)
          Creates a ChangeBoundsRequest with the given type.
 
Method Summary
  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
 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. Use setLocation(Point)
 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.
 
Methods inherited from class org.eclipse.gef.requests. GroupRequest
getEditParts, setEditParts, setEditParts
 
Methods inherited from class org.eclipse.gef. Request
getExtendedData, getType, setExtendedData, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeBoundsRequest

public ChangeBoundsRequest()
Default constructor.


ChangeBoundsRequest

public ChangeBoundsRequest(java.lang.Object type)
Creates a ChangeBoundsRequest with the given type.

Parameters:
type - The type of Request.
Method Detail

getLocation

public 
Point getLocation()
Returns the location of the mouse pointer.

Specified by:
getLocation in interface DropRequest
Returns:
The location of the mouse pointer.

getMouseLocation

public 
Point getMouseLocation()
Deprecated. Use getLocation()

Returns:
The location of the mouse pointer.

getMoveDelta

public 
Point getMoveDelta()
Returns a Point representing the distance the EditPart has moved.

Returns:
A Point representing the distance the EditPart has moved.

getResizeDirection

public int getResizeDirection()
Returns the direction the figure is being resized. Possible values are

Returns:
the resize direction

getSizeDelta

public 
Dimension getSizeDelta()
Returns a Dimension representing how much the EditPart has been resized.

Returns:
A Dimension representing how much the EditPart has been resized.

getTransformedRectangle

public 
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.

Parameters:
rect - the rectangle to transform
Returns:
a copy of the passed in rectangle representing the new bounds

isCenteredResize

public boolean isCenteredResize()
Returns true if the request is for a centered resize.

Returns:
true if centered resize
Since:
3.0

isConstrainedMove

public boolean isConstrainedMove()
Returns true if the request is for a constrained move

Returns:
true if a constrained move
Since:
3.0

isConstrainedResize

public boolean isConstrainedResize()
Returns true if the request is for a constrained resize

Returns:
true if a constrained resize
Since:
3.0

setCenteredResize

public void setCenteredResize(boolean value)
Used to set whether a centered resize is being performed.

Parameters:
value - true if the request is for a centered resize
Since:
3.0

setConstrainedMove

public void setConstrainedMove(boolean value)
Used to set whether a constrained move is being performed.

Parameters:
value - true if the request is for a constrained move
Since:
3.0

setConstrainedResize

public void setConstrainedResize(boolean value)
Used to set whether a constrained resize is being performed.

Parameters:
value - true if the request is for a constrained resize
Since:
3.0

setMoveDelta

public void setMoveDelta(
Point p)
Sets the move delta.

Parameters:
p - The Point representing the move delta

setResizeDirection

public void setResizeDirection(int dir)
Sets the direction the figure is being resized.

Parameters:
dir - the direction of the resize
See Also:
getResizeDirection()

setMouseLocation

public void setMouseLocation(
Point p)
Deprecated. Use setLocation(Point)

Parameters:
p - The location of the mouse pointer.

setLocation

public void setLocation(
Point p)
Sets the location of the mouse pointer.

Parameters:
p - The location of the mouse pointer.

setSizeDelta

public void setSizeDelta(
Dimension d)
Sets the size delta.

Parameters:
d - The Dimension representing the size delta.

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