|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DragAwareRegion
A DropRegion is a single acceptanceRegion for for a DropReceiver. It consists of a region (defined by a Graphics2D region) and a list of acceptable DataFlavors.
| Field Summary | |
|---|---|
static int |
COPY
This Regions supports copy actions only. |
static int |
COPY_OR_MOVE
This Regions supports copy and move actions. |
static int |
MOVE
This Regions supports move actions only. |
static int |
NONE
No source actions are supported. |
| Method Summary | |
|---|---|
boolean |
canImport()
Used to distinguish between active components (triggers) and real data accpetors. |
boolean |
dragEnter()
Called when the mouse enters the region. |
boolean |
dragExit()
Called when the mouse leaves the region. |
void |
draw(java.awt.Graphics2D g)
Draws the graphical representation of this dropRegion. |
java.awt.Rectangle |
getBounds()
Returns the bounding box of the region. |
CursorPrototype |
getCursor()
Returns the cursor prototype that should be used for constructing a cursor if a drag over occurs. |
java.awt.Shape |
getOverlay()
Returns the overlay that is to be shown when the cursor is over the region. |
java.lang.String |
getToolTipText()
Returns a Tooltip for this region. |
boolean |
importData(java.awt.datatransfer.Transferable data,
java.awt.Point p)
Delivers a transferable to the drop receiver of this region. |
boolean |
reactsOn(int x,
int y)
Checks if the given point is inside the region. |
| Field Detail |
|---|
static final int NONE
static final int COPY
static final int MOVE
static final int COPY_OR_MOVE
| Method Detail |
|---|
java.awt.Shape getOverlay()
CursorPrototype getCursor()
void draw(java.awt.Graphics2D g)
g - Graphics context
boolean reactsOn(int x,
int y)
x - Position in screen coordinatesy - Position in screen coordinatesjava.awt.Rectangle getBounds()
java.lang.String getToolTipText()
boolean importData(java.awt.datatransfer.Transferable data,
java.awt.Point p)
data - The transferable to importp - Import position in glass coordinates
boolean canImport()
boolean dragEnter()
boolean dragExit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||