Java 类java.awt.dnd.DropTargetEvent 实例源码

项目:cn1    文件:WinDropTarget.java   
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;
        }
    }
}
项目:toolkit    文件:Outline.java   
@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);
    }
}
项目:toolkit    文件:Outline.java   
/**
 * 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);
}
项目:freeVM    文件:WinDropTarget.java   
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;
        }
    }
}
项目:freeVM    文件:WinDropTarget.java   
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;
        }
    }
}
项目:consulo-ui-designer    文件:DesignDropTargetListener.java   
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);
    }
}
项目:incubator-netbeans    文件:MenuEditLayer.java   
@Override
public void dragExit(DropTargetEvent dte) {
    //if(shouldRedispatchDnDToHandle()) {
    if(dragProxying) {
        formDesigner.getHandleLayer().getNewComponentDropListener().dragExit(dte);
    }
    dragProxying = false;
}
项目:incubator-netbeans    文件:QuietEditorPane.java   
@Override
public void dragExit(DropTargetEvent dte) {
    if (isDragging) {
        orig.dragExit(dte);
    }
    isDragging = false;
}
项目:incubator-netbeans    文件:DnDSupport.java   
public void dragExit( DropTargetEvent dte ) {
    removeDropLine();
    if (DropGlassPane.isOriginalPaneStored()) {
        DropGlassPane.putBackOriginal();
    }
    removeTimer();
}
项目:incubator-netbeans    文件:IndexedCustomizer.java   
/** User exits the dragging */
public void dragExit(DropTargetEvent dte) {
    if (lastIndex >= 0) {
        cellRenderer.draggingExit();
        comp.repaint(comp.getCellBounds(lastIndex, lastIndex));
    }
}
项目:rapidminer    文件:ProcessRendererDropTarget.java   
@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);
            }
        }
    }
}
项目:TrabalhoFinalEDA2    文件:mxGraphHandler.java   
/**
 * 
 * @param e
 */
public void dragExit(DropTargetEvent e)
{
    mxGraphTransferHandler handler = getGraphTransferHandler(e);

    if (handler != null)
    {
        handler.setLocation(null);
    }

    dragCells = null;
    setVisible(false);
    marker.reset();
    reset();
}
项目:TrabalhoFinalEDA2    文件:mxGraphHandler.java   
/**
 * 
 */
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);
}
项目:TrabalhoFinalEDA2    文件:mxGraphHandler.java   
/**
 * 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;
}
项目:Tarski    文件:mxGraphHandler.java   
/**
 * 
 * @param e
 */
public void dragExit(DropTargetEvent e) {
  mxGraphTransferHandler handler = getGraphTransferHandler(e);

  if (handler != null) {
    handler.setLocation(null);
  }

  dragCells = null;
  setVisible(false);
  marker.reset();
  reset();
}
项目:Tarski    文件:mxGraphHandler.java   
/**
 * 
 */
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);
}
项目:Tarski    文件:mxGraphHandler.java   
/**
 * 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;
}
项目:jdk8u-jdk    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:openjdk-jdk10    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:openjdk9    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:pumpernickel    文件:CustomizedToolbar.java   
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);
    }
}
项目:jdk8u_jdk    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:lookaside_java-1.8.0-openjdk    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:OWLAx    文件:mxGraphHandler.java   
/**
 * 
 * @param e
 */
public void dragExit(DropTargetEvent e)
{
    mxGraphTransferHandler handler = getGraphTransferHandler(e);

    if (handler != null)
    {
        handler.setLocation(null);
    }

    dragCells = null;
    setVisible(false);
    marker.reset();
    reset();
}
项目:OWLAx    文件:mxGraphHandler.java   
/**
 * 
 */
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);
}
项目:OWLAx    文件:mxGraphHandler.java   
/**
 * 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;
}
项目:rapidminer-studio    文件:ProcessRendererDropTarget.java   
@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);
            }
        }
    }
}
项目:infobip-open-jdk-8    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:jdk8u-dev-jdk    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:platypus-js    文件:JScalablePanel.java   
@Override
public void dragExit(DropTargetEvent dte) {
    oldInnerDropTarget = null;
    innerDropTargetComponent = null;

    //dragTarget = null; - need to stay old value - to save autoscrolling fuctionality
}
项目:WP3    文件:mxGraphHandler.java   
/**
 * 
 * @param e
 */
public void dragExit(DropTargetEvent e) {
  mxGraphTransferHandler handler = getGraphTransferHandler(e);

  if (handler != null) {
    handler.setLocation(null);
  }

  dragCells = null;
  setVisible(false);
  marker.reset();
  reset();
}
项目:WP3    文件:mxGraphHandler.java   
/**
 * 
 */
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);
}
项目:WP3    文件:mxGraphHandler.java   
/**
 * 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;
}
项目:OLD-OpenJDK8    文件:MissingDragExitEventTest.java   
@Override
public void dragExit(final DropTargetEvent dte) {
    if (!inside) {
        FAILED = true;
        Thread.dumpStack();
    }
    inside = false;
    MOUSE_EXIT_TD = true;
}
项目:cn1    文件:WinDropTarget.java   
/**
 * Called from native method WinDropTarget::DragLeave()
 */
public void dragLeave() {
    DropTargetEvent e = new DropTargetEvent(context);
    dispatchEvent(e, DRAG_LEAVE);
    dataObject = null;
    transferable = null;
}
项目:breakout    文件:DropLocationFinder.java   
private Point getLocation(DropTargetEvent dte) {
    if (dte instanceof DropTargetDragEvent) {
        return ((DropTargetDragEvent) dte).getLocation();
    } else if (dte instanceof DropTargetDropEvent) {
        return ((DropTargetDropEvent) dte).getLocation();
    }
    return null;
}
项目:toolkit    文件:Outline.java   
/**
 * Called when a row drag leaves the outline.
 *
 * @param dte The drop target event.
 */
protected void dragExitRow(DropTargetEvent dte) {
    repaint(getDragRowInsertionMarkerBounds(mDragParentRow, mDragChildInsertIndex));
    removeDragHighlight(this);
    mDragParentRow = null;
    mDragChildInsertIndex = -1;
    mModel.setDragRows(null);
}
项目:toolkit    文件:TreeColumnDragState.java   
@Override
public void dragExit(DropTargetEvent event) {
    TreePanel panel = getPanel();
    if (panel.getColumns().equals(mOriginal)) {
        panel.repaintColumn(mColumn);
    } else {
        panel.restoreColumns(mOriginal);
    }
}
项目:toolkit    文件:TreePanel.java   
@Override
public void dragExit(DropTargetEvent event) {
    if (mDragState != null) {
        mDragState.dragExit(event);
    } else if (mAlternateDragDestination != null) {
        mAlternateDragDestination.dragExit(event);
    }
    clearDragState();
}
项目:GKA1    文件:mxGraphHandler.java   
/**
 * 
 * @param e
 */
public void dragExit(DropTargetEvent e)
{
    mxGraphTransferHandler handler = getGraphTransferHandler(e);

    if (handler != null)
    {
        handler.setLocation(null);
    }

    dragCells = null;
    setVisible(false);
    marker.reset();
    reset();
}