|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jmex.awt.swingui.dnd.JMEDragAndDrop
public class JMEDragAndDrop
Drag and Drop support for JMEDesktop see jmetest.awt.swingui.dnd.TestJMEDragAndDrop for an example.
| Constructor Summary | |
|---|---|
JMEDragAndDrop(JMEDesktop desktop)
create a drag and drop support for this desktop |
|
| Method Summary | |
|---|---|
static javax.swing.ImageIcon |
createTextIcon(javax.swing.JComponent c,
java.lang.String text)
creates an ImageIcon using the supplied text. |
void |
doDrag(java.awt.event.MouseEvent event)
drag the icon around. |
void |
doDrop(java.awt.event.MouseEvent e)
the drag is about to end. |
JMEDropTargetListener |
getDropTargetListener()
return the current drop target listener |
java.awt.datatransfer.Transferable |
getTransferable()
get the transferable (the wrapped object to transport via drag and drop) |
boolean |
isDragging()
check whether there is currently a drag in progress |
boolean |
isDragPanel(java.awt.Component c)
check if the component is the drag component |
void |
mouseEntered(java.awt.event.MouseEvent e)
called by the DragGestureRecognizer on mouse enter events |
void |
mouseExited(java.awt.event.MouseEvent e)
called by the DragGestureRecognizer on mouse exit events |
void |
startDrag(JMEDragGestureEvent dge,
javax.swing.ImageIcon icon,
java.awt.datatransfer.Transferable transferable,
JMEDragSourceListener listener)
start to drag an object this is the same as calling startDrag( JMEDragGestureEvent dge, ImageIcon icon, Transferable transferable, JMEDragSourceListener listener, false ) |
void |
startDrag(JMEDragGestureEvent dge,
javax.swing.ImageIcon icon,
java.awt.datatransfer.Transferable transferable,
JMEDragSourceListener listener,
boolean allowFreeDrop)
start to drag an object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JMEDragAndDrop(JMEDesktop desktop)
desktop - the JMEDesktop to add drag and drop support| Method Detail |
|---|
public java.awt.datatransfer.Transferable getTransferable()
public boolean isDragPanel(java.awt.Component c)
c - the component to check
public void startDrag(JMEDragGestureEvent dge,
javax.swing.ImageIcon icon,
java.awt.datatransfer.Transferable transferable,
JMEDragSourceListener listener)
throws JMEDndException
dge - the drag gesture event that initiated the draggingicon - the icon to represent the dragged objecttransferable - the wrapped object to draglistener - the drag source listener
JMEDndExceptionstartDrag(JMEDragGestureEvent, javax.swing.ImageIcon, java.awt.datatransfer.Transferable,
JMEDragSourceListener, boolean)
public void startDrag(JMEDragGestureEvent dge,
javax.swing.ImageIcon icon,
java.awt.datatransfer.Transferable transferable,
JMEDragSourceListener listener,
boolean allowFreeDrop)
throws JMEDndException
dge - the drag gesture event that initiated the draggingicon - the icon to represent the dragged objecttransferable - the wrapped object to draglistener - the drag source listenerallowFreeDrop - whether to allow drops on the desktop without a drop target (drops in free space)
JMEDndExceptionpublic boolean isDragging()
public void doDrag(java.awt.event.MouseEvent event)
event - the mouse eventpublic void doDrop(java.awt.event.MouseEvent e)
e - the mouse event that ends the draggingpublic void mouseEntered(java.awt.event.MouseEvent e)
e - the mouse event that triggeredpublic void mouseExited(java.awt.event.MouseEvent e)
e - the mouse event that triggered
public static javax.swing.ImageIcon createTextIcon(javax.swing.JComponent c,
java.lang.String text)
c - the component to take the font from (typically the drag source)text - the text to put into the image
public JMEDropTargetListener getDropTargetListener()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||