private int dispatchEvent(DropTargetEvent e, int state) {
synchronized (dropMonitor) {
try {
dragState = state;
currentEvent = e;
dropAction = DnDConstants.ACTION_NONE;
EventQueue.invokeLater(this);
while (dragState != DRAG_NONE) {
dropMonitor.wait();
}
return WinDragSource.getWinActions(dropAction);
} catch (InterruptedException ex) {
return WindowsDefs.DROPEFFECT_NONE;
}
}
}
java类java.awt.dnd.DropTargetEvent的实例源码
WinDropTarget.java 文件源码
项目:cn1
阅读 25
收藏 0
点赞 0
评论 0
Outline.java 文件源码
项目:toolkit
阅读 35
收藏 0
点赞 0
评论 0
@Override
public void dragExit(DropTargetEvent dte) {
if (mDragWasAcceptable) {
if (mModel.getDragColumn() != null) {
dragExitColumn(dte);
} else {
Row[] rows = mModel.getDragRows();
if (rows != null && rows.length > 0) {
dragExitRow(dte);
}
}
} else if (mAlternateDragDestination != null) {
mAlternateDragDestination.dragExit(dte);
}
}
Outline.java 文件源码
项目:toolkit
阅读 27
收藏 0
点赞 0
评论 0
/**
* Called when a column drag leaves the outline.
*
* @param dte The drop target event.
*/
protected void dragExitColumn(DropTargetEvent dte) {
List<Column> columns = mModel.getColumns();
if (columns.equals(mSavedColumns)) {
repaintColumn(mModel.getDragColumn());
} else {
columns.clear();
columns.addAll(mSavedColumns);
repaint();
if (mHeaderPanel != null) {
mHeaderPanel.repaint();
}
}
mSavedColumns = null;
mModel.setDragColumn(null);
}
WinDropTarget.java 文件源码
项目:freeVM
阅读 30
收藏 0
点赞 0
评论 0
private int dispatchEvent(DropTargetEvent e, int state) {
synchronized (dropMonitor) {
try {
dragState = state;
currentEvent = e;
dropAction = DnDConstants.ACTION_NONE;
EventQueue.invokeLater(this);
while (dragState != DRAG_NONE) {
dropMonitor.wait();
}
return WinDragSource.getWinActions(dropAction);
} catch (InterruptedException ex) {
return WindowsDefs.DROPEFFECT_NONE;
}
}
}
WinDropTarget.java 文件源码
项目:freeVM
阅读 25
收藏 0
点赞 0
评论 0
private int dispatchEvent(DropTargetEvent e, int state) {
synchronized (dropMonitor) {
try {
dragState = state;
currentEvent = e;
dropAction = DnDConstants.ACTION_NONE;
EventQueue.invokeLater(this);
while (dragState != DRAG_NONE) {
dropMonitor.wait();
}
return WinDragSource.getWinActions(dropAction);
} catch (InterruptedException ex) {
return WindowsDefs.DROPEFFECT_NONE;
}
}
}
DesignDropTargetListener.java 文件源码
项目:consulo-ui-designer
阅读 35
收藏 0
点赞 0
评论 0
public void dragExit(DropTargetEvent dte)
{
try
{
ComponentTree componentTree = DesignerToolWindowManager.getInstance(myEditor).getComponentTree();
if(componentTree != null)
{
componentTree.setDropTargetComponent(null);
}
myUseDragDelta = false;
if(myDraggedComponentList != null)
{
cancelDrag();
setDraggingState(myDraggedComponentList, false);
myEditor.getActiveDecorationLayer().removeFeedback();
myDraggedComponentList = null;
myEditor.setDesignTimeInsets(2);
}
myDraggedComponentsCopy = null;
}
catch(Exception e)
{
LOG.error(e);
}
}
MenuEditLayer.java 文件源码
项目:incubator-netbeans
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void dragExit(DropTargetEvent dte) {
//if(shouldRedispatchDnDToHandle()) {
if(dragProxying) {
formDesigner.getHandleLayer().getNewComponentDropListener().dragExit(dte);
}
dragProxying = false;
}
QuietEditorPane.java 文件源码
项目:incubator-netbeans
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void dragExit(DropTargetEvent dte) {
if (isDragging) {
orig.dragExit(dte);
}
isDragging = false;
}
DnDSupport.java 文件源码
项目:incubator-netbeans
阅读 21
收藏 0
点赞 0
评论 0
public void dragExit( DropTargetEvent dte ) {
removeDropLine();
if (DropGlassPane.isOriginalPaneStored()) {
DropGlassPane.putBackOriginal();
}
removeTimer();
}
IndexedCustomizer.java 文件源码
项目:incubator-netbeans
阅读 30
收藏 0
点赞 0
评论 0
/** User exits the dragging */
public void dragExit(DropTargetEvent dte) {
if (lastIndex >= 0) {
cellRenderer.draggingExit();
comp.repaint(comp.getCellBounds(lastIndex, lastIndex));
}
}
ProcessRendererDropTarget.java 文件源码
项目:rapidminer
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent e) {
super.dragExit(e);
view.getModel().setImportDragged(false);
view.getModel().fireMiscChanged();
if (dropTragetListenerList != null) {
Object[] listeners = dropTragetListenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == DropTargetListener.class) {
((DropTargetListener) listeners[i + 1]).dragExit(e);
}
}
}
}
mxGraphHandler.java 文件源码
项目:TrabalhoFinalEDA2
阅读 21
收藏 0
点赞 0
评论 0
/**
*
* @param e
*/
public void dragExit(DropTargetEvent e)
{
mxGraphTransferHandler handler = getGraphTransferHandler(e);
if (handler != null)
{
handler.setLocation(null);
}
dragCells = null;
setVisible(false);
marker.reset();
reset();
}
mxGraphHandler.java 文件源码
项目:TrabalhoFinalEDA2
阅读 27
收藏 0
点赞 0
评论 0
/**
*
*/
protected MouseEvent createEvent(DropTargetEvent e)
{
JComponent component = getDropTarget(e);
Point location = null;
int action = 0;
if (e instanceof DropTargetDropEvent)
{
location = ((DropTargetDropEvent) e).getLocation();
action = ((DropTargetDropEvent) e).getDropAction();
}
else if (e instanceof DropTargetDragEvent)
{
location = ((DropTargetDragEvent) e).getLocation();
action = ((DropTargetDragEvent) e).getDropAction();
}
if (location != null)
{
location = convertPoint(location);
Rectangle r = graphComponent.getViewport().getViewRect();
location.translate(r.x, r.y);
}
// LATER: Fetch state of modifier keys from event or via global
// key listener using Toolkit.getDefaultToolkit().addAWTEventListener(
// new AWTEventListener() {...}, AWTEvent.KEY_EVENT_MASK). Problem
// is the event does not contain the modifier keys and the global
// handler is not called during drag and drop.
int mod = (action == TransferHandler.COPY) ? InputEvent.CTRL_MASK : 0;
return new MouseEvent(component, 0, System.currentTimeMillis(), mod,
location.x, location.y, 1, false, MouseEvent.BUTTON1);
}
mxGraphHandler.java 文件源码
项目:TrabalhoFinalEDA2
阅读 29
收藏 0
点赞 0
评论 0
/**
* Helper method to return the component for a drop target event.
*/
protected static final mxGraphTransferHandler getGraphTransferHandler(
DropTargetEvent e)
{
JComponent component = getDropTarget(e);
TransferHandler transferHandler = component.getTransferHandler();
if (transferHandler instanceof mxGraphTransferHandler)
{
return (mxGraphTransferHandler) transferHandler;
}
return null;
}
mxGraphHandler.java 文件源码
项目:Tarski
阅读 22
收藏 0
点赞 0
评论 0
/**
*
* @param e
*/
public void dragExit(DropTargetEvent e) {
mxGraphTransferHandler handler = getGraphTransferHandler(e);
if (handler != null) {
handler.setLocation(null);
}
dragCells = null;
setVisible(false);
marker.reset();
reset();
}
mxGraphHandler.java 文件源码
项目:Tarski
阅读 21
收藏 0
点赞 0
评论 0
/**
*
*/
protected MouseEvent createEvent(DropTargetEvent e) {
JComponent component = getDropTarget(e);
Point location = null;
int action = 0;
if (e instanceof DropTargetDropEvent) {
location = ((DropTargetDropEvent) e).getLocation();
action = ((DropTargetDropEvent) e).getDropAction();
} else if (e instanceof DropTargetDragEvent) {
location = ((DropTargetDragEvent) e).getLocation();
action = ((DropTargetDragEvent) e).getDropAction();
}
if (location != null) {
location = convertPoint(location);
Rectangle r = graphComponent.getViewport().getViewRect();
location.translate(r.x, r.y);
}
// LATER: Fetch state of modifier keys from event or via global
// key listener using Toolkit.getDefaultToolkit().addAWTEventListener(
// new AWTEventListener() {...}, AWTEvent.KEY_EVENT_MASK). Problem
// is the event does not contain the modifier keys and the global
// handler is not called during drag and drop.
int mod = (action == TransferHandler.COPY) ? InputEvent.CTRL_MASK : 0;
return new MouseEvent(component, 0, System.currentTimeMillis(), mod, location.x, location.y, 1,
false, MouseEvent.BUTTON1);
}
mxGraphHandler.java 文件源码
项目:Tarski
阅读 23
收藏 0
点赞 0
评论 0
/**
* Helper method to return the component for a drop target event.
*/
protected static final mxGraphTransferHandler getGraphTransferHandler(DropTargetEvent e) {
JComponent component = getDropTarget(e);
TransferHandler transferHandler = component.getTransferHandler();
if (transferHandler instanceof mxGraphTransferHandler) {
return (mxGraphTransferHandler) transferHandler;
}
return null;
}
MissingDragExitEventTest.java 文件源码
项目:jdk8u-jdk
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
MissingDragExitEventTest.java 文件源码
项目:openjdk-jdk10
阅读 27
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
MissingDragExitEventTest.java 文件源码
项目:openjdk9
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
CustomizedToolbar.java 文件源码
项目:pumpernickel
阅读 30
收藏 0
点赞 0
评论 0
public void dragExit(DropTargetEvent dte) {
if(draggingDefaults) {
return;
}
updateContents(getContents(new Point(-1000,-1000)));
if(draggingComponent!=null) {
JComponent theComponent = getComponent(draggingComponent);
Rectangle r = (Rectangle)theComponent.getClientProperty(AnimatedLayout.DESTINATION);
if(r!=null) {
theComponent.setBounds( r );
}
if(hideActiveComponents)
theComponent.setVisible(true);
}
}
MissingDragExitEventTest.java 文件源码
项目:jdk8u_jdk
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
MissingDragExitEventTest.java 文件源码
项目:lookaside_java-1.8.0-openjdk
阅读 26
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
mxGraphHandler.java 文件源码
项目:OWLAx
阅读 22
收藏 0
点赞 0
评论 0
/**
*
* @param e
*/
public void dragExit(DropTargetEvent e)
{
mxGraphTransferHandler handler = getGraphTransferHandler(e);
if (handler != null)
{
handler.setLocation(null);
}
dragCells = null;
setVisible(false);
marker.reset();
reset();
}
mxGraphHandler.java 文件源码
项目:OWLAx
阅读 23
收藏 0
点赞 0
评论 0
/**
*
*/
protected MouseEvent createEvent(DropTargetEvent e)
{
JComponent component = getDropTarget(e);
Point location = null;
int action = 0;
if (e instanceof DropTargetDropEvent)
{
location = ((DropTargetDropEvent) e).getLocation();
action = ((DropTargetDropEvent) e).getDropAction();
}
else if (e instanceof DropTargetDragEvent)
{
location = ((DropTargetDragEvent) e).getLocation();
action = ((DropTargetDragEvent) e).getDropAction();
}
if (location != null)
{
location = convertPoint(location);
Rectangle r = graphComponent.getViewport().getViewRect();
location.translate(r.x, r.y);
}
// LATER: Fetch state of modifier keys from event or via global
// key listener using Toolkit.getDefaultToolkit().addAWTEventListener(
// new AWTEventListener() {...}, AWTEvent.KEY_EVENT_MASK). Problem
// is the event does not contain the modifier keys and the global
// handler is not called during drag and drop.
int mod = (action == TransferHandler.COPY) ? InputEvent.CTRL_MASK : 0;
return new MouseEvent(component, 0, System.currentTimeMillis(), mod,
location.x, location.y, 1, false, MouseEvent.BUTTON1);
}
mxGraphHandler.java 文件源码
项目:OWLAx
阅读 23
收藏 0
点赞 0
评论 0
/**
* Helper method to return the component for a drop target event.
*/
protected static final mxGraphTransferHandler getGraphTransferHandler(
DropTargetEvent e)
{
JComponent component = getDropTarget(e);
TransferHandler transferHandler = component.getTransferHandler();
if (transferHandler instanceof mxGraphTransferHandler)
{
return (mxGraphTransferHandler) transferHandler;
}
return null;
}
ProcessRendererDropTarget.java 文件源码
项目:rapidminer-studio
阅读 24
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent e) {
super.dragExit(e);
view.getModel().setImportDragged(false);
view.getModel().fireMiscChanged();
if (dropTragetListenerList != null) {
Object[] listeners = dropTragetListenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == DropTargetListener.class) {
((DropTargetListener) listeners[i + 1]).dragExit(e);
}
}
}
}
MissingDragExitEventTest.java 文件源码
项目:infobip-open-jdk-8
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
MissingDragExitEventTest.java 文件源码
项目:jdk8u-dev-jdk
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void dragExit(final DropTargetEvent dte) {
if (!inside) {
FAILED = true;
Thread.dumpStack();
}
inside = false;
MOUSE_EXIT_TD = true;
}
JScalablePanel.java 文件源码
项目:platypus-js
阅读 20
收藏 0
点赞 0
评论 0
@Override
public void dragExit(DropTargetEvent dte) {
oldInnerDropTarget = null;
innerDropTargetComponent = null;
//dragTarget = null; - need to stay old value - to save autoscrolling fuctionality
}