|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.dnd.DropTarget
The DropTarget is associated with a Component, when that Component wishes to accept Drops during Drag and Drop operations.
Inner Class Summary | |
protected static class |
DropTarget.DropTargetAutoScroller
this protected nested class implements autoscrolling |
Constructor Summary | |
DropTarget()
Construct a DropTarget |
|
DropTarget(Component c,
DropTargetListener dtl)
Construct a DropTarget |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl)
Construct a DropTarget |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl,
boolean act)
Construct a DropTarget |
|
DropTarget(Component c,
int ops,
DropTargetListener dtl,
boolean act,
FlavorMap fm)
Construct a DropTarget |
Method Summary | |
void |
addDropTargetListener(DropTargetListener dtl)
Add a new DropTargetListener (UNICAST SOURCE) |
void |
addNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been associated with a Component This method is usually called from java.awt. |
protected void |
clearAutoscroll()
clear autoscrolling |
protected DropTarget.DropTargetAutoScroller |
createDropTargetAutoScroller(Component c,
Point p)
create an embedded autoscroller |
protected DropTargetContext |
createDropTargetContext()
Create the DropTargetContext associated with this DropTarget. |
void |
dragEnter(DropTargetDragEvent dtde)
The DropTarget intercepts dragEnter() notifications before the registered DropTargetListener gets them. |
void |
dragExit(DropTargetEvent dte)
The DropTarget intercepts dragExit() notifications before the registered DropTargetListener gets them. |
void |
dragOver(DropTargetDragEvent dtde)
The DropTarget intercepts dragOver() notifications before the registered DropTargetListener gets them. |
void |
drop(DropTargetDropEvent dtde)
The DropTarget intercepts drop() notifications before the registered DropTargetListener gets them. |
void |
dropActionChanged(DropTargetDragEvent dtde)
The DropTarget intercepts dropActionChanged() notifications before the registered DropTargetListener gets them. |
Component |
getComponent()
|
int |
getDefaultActions()
|
DropTargetContext |
getDropTargetContext()
|
FlavorMap |
getFlavorMap()
|
protected void |
initializeAutoscrolling(Point p)
initialize autoscrolling |
boolean |
isActive()
|
void |
removeDropTargetListener(DropTargetListener dtl)
Remove the current DropTargetListener (UNICAST SOURCE) |
void |
removeNotify(java.awt.peer.ComponentPeer peer)
Notify the DropTarget that it has been disassociated from a Component This method is usually called from java.awt. |
void |
setActive(boolean isActive)
set the DropTarget (in)active. |
void |
setComponent(Component c)
Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget);
or droptarget.setComponent(component);
The caller must have AWTPermission.setDropTarget to succeed. |
void |
setDefaultActions(int ops)
Sets the default acceptable actions for this DropTarget |
void |
setFlavorMap(FlavorMap fm)
|
protected void |
updateAutoscroll(Point dragCursorLocn)
update autoscrolling with current cursor locn |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DropTarget(Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm)
c
- The Component with which this DropTarget is associatedops
- The default acceptable actions for this DropTargetdtl
- The DropTargetListener for this DropTargetact
- Is the DropTarget accepting drops.fm
- The flavorMap to use or nullpublic DropTarget(Component c, int ops, DropTargetListener dtl, boolean act)
c
- The Component with which this DropTarget is associatedops
- The default acceptable actions for this DropTargetdtl
- The DropTargetListener for this DropTargetact
- Is the DropTarget accepting drops.public DropTarget()
public DropTarget(Component c, DropTargetListener dtl)
c
- The Component with which this DropTarget is associateddtl
- The DropTargetListener for this DropTargetpublic DropTarget(Component c, int ops, DropTargetListener dtl)
c
- The Component with which this DropTarget is associatedops
- The default acceptable actions for this DropTargetdtl
- The DropTargetListener for this DropTargetMethod Detail |
public void setComponent(Component c)
component.setDropTarget(droptarget);
or droptarget.setComponent(component);
The caller must have AWTPermission.setDropTarget to succeed.c
- The new Component this DropTarget is to be associated with.public Component getComponent()
public void setDefaultActions(int ops)
ops
- the default actions.DnDConstants
public int getDefaultActions()
public void setActive(boolean isActive)
isActive
- public boolean isActive()
public void addDropTargetListener(DropTargetListener dtl) throws TooManyListenersException
dtl
- The new DropTargetListenerpublic void removeDropTargetListener(DropTargetListener dtl)
dtl
- the DropTargetListener to deregister.public void dragEnter(DropTargetDragEvent dtde)
public void dragOver(DropTargetDragEvent dtde)
public void dropActionChanged(DropTargetDragEvent dtde)
public void dragExit(DropTargetEvent dte)
public void drop(DropTargetDropEvent dtde)
public FlavorMap getFlavorMap()
public void setFlavorMap(FlavorMap fm)
set
- the new flavormap, or null for defaultpublic void addNotify(java.awt.peer.ComponentPeer peer)
peer
- The Peer of the Component we are associated with!public void removeNotify(java.awt.peer.ComponentPeer peer)
peer
- The Peer of the Component we are being disassociated froe!public DropTargetContext getDropTargetContext()
protected DropTargetContext createDropTargetContext()
protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller(Component c, Point p)
protected void initializeAutoscrolling(Point p)
protected void updateAutoscroll(Point dragCursorLocn)
protected void clearAutoscroll()
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |