com.dixshtix.awt11
Class DraggableRectangle
java.lang.Object
|
+--com.dixshtix.awt11.DraggableRectangle
- All Implemented Interfaces:
- Drag11able
- Direct Known Subclasses:
- DraggableOval, DraggablePolygon, DraggableRoundRectangle
- public class DraggableRectangle
- extends java.lang.Object
- implements Drag11able
Constructor Summary |
DraggableRectangle(java.awt.Rectangle s,
java.awt.Color p,
int x,
int y)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
myPaint
protected java.awt.Color myPaint
myBounds
protected java.awt.Rectangle myBounds
myX
protected int myX
myY
protected int myY
deltaX
protected int deltaX
deltaY
protected int deltaY
DraggableRectangle
public DraggableRectangle(java.awt.Rectangle s,
java.awt.Color p,
int x,
int y)
getPosition
public java.awt.Point getPosition()
- Specified by:
getPosition
in interface Drag11able
setPosition
public void setPosition(java.awt.Point newPosition)
- Specified by:
setPosition
in interface Drag11able
contains
public boolean contains(int x,
int y)
- Specified by:
contains
in interface Drag11able
getBounds
public java.awt.Rectangle getBounds()
- Specified by:
getBounds
in interface Drag11able
computeBounds
public java.awt.Rectangle computeBounds(java.awt.Point position)
- Specified by:
computeBounds
in interface Drag11able
draw
public void draw(java.awt.Graphics g)
- Specified by:
draw
in interface Drag11able
drawAsOutline
public void drawAsOutline(java.awt.Graphics g,
java.awt.Point position)
- Specified by:
drawAsOutline
in interface Drag11able