Java 8 DragSourceDropEvent - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 DragSourceDropEvent class.

This code example shows how to use the following methods:getDropAction, getDropSuccess, getDragSourceContext
        this.scrolled = scrolled;
    } 
 
    /** Notifies the TransferHandler that the xport is finished. */ 
    public void dragDropEnd(DragSourceDropEvent dsde) {
        DragSourceContext dsc = dsde.getDragSourceContext();
        JComponent c = (JComponent)dsc.getComponent();
        if (dsde.getDropSuccess()) {
            ((LimeTransferHandler)c.getTransferHandler()).exportDone(c, dsc.getTransferable(), dsde.getDropAction());
        } else { 
            ((LimeTransferHandler)c.getTransferHandler()).exportDone(c, dsc.getTransferable(), TransferHandler.NONE);
        } 
        c.setAutoscrolls(scrolled);
    } 
     
    public void dragEnter(DragSourceDragEvent dsde) {}
    public void dragExit(DragSourceEvent dse) {}
    public void dragOver(DragSourceDragEvent dsde) {}
    public void dropActionChanged(DragSourceDragEvent dsde) {}
} 
5
CodeRank
This code example shows how to use the following methods:getDropAction, getDropSuccess
This code example shows how to use the following methods:getDropSuccess
     * this message goes to DragSourceListener, informing it that the dragging 
     * has ended 
     */ 
 
    public void dragDropEnd(DragSourceDropEvent event) {
        if (event.getDropSuccess()) {
            removeElement(); 
        } 
    } 
 
    /** 
     * this message goes to DragSourceListener, informing it that the dragging 
     * has entered the DropSite 
     */ 
 
    public void dragEnter(DragSourceDragEvent event) {
        System.out.println(" dragEnter");
    } 
 
    /** 
4
CodeRank
See Code Examples for Java 8 DragSourceDropEvent Methods: