當前位置: 首頁>>代碼示例>>Java>>正文


Java DragSourceDropEvent.getDragSourceContext方法代碼示例

本文整理匯總了Java中java.awt.dnd.DragSourceDropEvent.getDragSourceContext方法的典型用法代碼示例。如果您正苦於以下問題:Java DragSourceDropEvent.getDragSourceContext方法的具體用法?Java DragSourceDropEvent.getDragSourceContext怎麽用?Java DragSourceDropEvent.getDragSourceContext使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.dnd.DragSourceDropEvent的用法示例。


在下文中一共展示了DragSourceDropEvent.getDragSourceContext方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
	DragSourceContext dsc = dsde.getDragSourceContext();
	JComponent c = (JComponent) dsc.getComponent();
	if (dsde.getDropSuccess()) {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(),
				dsde.getDropAction());
	} else {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), NONE);
	}
	c.setAutoscrolls(scrolls);
	fireDragEnded();
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:AbstractPatchedTransferHandler.java

示例2: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * {@inheritDoc}
 */
public void dragDropEnd(DragSourceDropEvent dsde) {
    DragSourceContext dsc = dsde.getDragSourceContext();
    JComponent c = (JComponent)dsc.getComponent();

    if (dsde.getDropSuccess()) {
        ((DefaultTransferHandler)c.getTransferHandler()).exportDone(c,
            dsc.getTransferable(), dsde.getDropAction());
    } else {
        ((DefaultTransferHandler)c.getTransferHandler()).exportDone(c,
            null, NONE);
    }
    c.setAutoscrolls(scrolls);
}
 
開發者ID:FreeCol,項目名稱:freecol,代碼行數:17,代碼來源:DefaultTransferHandler.java

示例3: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent ev)
{
	DragSourceContext dragSourceContext = ev.getDragSourceContext();
	JComponent component = (JComponent) dragSourceContext.getComponent();
	if (ev.getDropSuccess())
	{
		exportDone(component, dragSourceContext.getTransferable(), ev.getDropAction());
	}
	else
	{
		exportDone(component, dragSourceContext.getTransferable(), NONE);
	}
	component.setAutoscrolls(this.autoscrolls);
}
 
開發者ID:valsr,項目名稱:SweetHome3D,代碼行數:15,代碼來源:VisualTransferHandler.java

示例4: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent e)
{
  DragSourceContext ctx = e.getDragSourceContext();
  JComponent c = (JComponent) ctx.getComponent();
  TransferHandler th = c.getTransferHandler();
  if (e.getDropSuccess())
    {
      th.exportDone(c, ctx.getTransferable(), e.getDropAction());
    }
  else
    {
      th.exportDone(c, ctx.getTransferable(), e.getDropAction());
    }
  c.setAutoscrolls(autoscrolls);
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:16,代碼來源:TransferHandler.java

示例5: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
@Override
public void dragDropEnd(DragSourceDropEvent dsde) {
    DragSourceContext dsc = dsde.getDragSourceContext();
    JComponent c = (JComponent) dsc.getComponent();
    DefaultDrawingViewTransferHandler th = (DefaultDrawingViewTransferHandler) c.getTransferHandler();
    if (dsde.getDropSuccess()) {
        th.exportDone(c, dsc.getTransferable(), dsde.getDropAction());
    } else {
        th.exportDone(c, dsc.getTransferable(), NONE);
    }
    c.setAutoscrolls(scrolls);
}
 
開發者ID:umple,項目名稱:umple,代碼行數:16,代碼來源:DefaultDrawingViewTransferHandler.java

示例6: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes
 */
public void dragDropEnd(DragSourceDropEvent dsde) {
	DragSourceContext dsc = dsde.getDragSourceContext();
	JComponent c = (JComponent) dsc.getComponent();
	if (dsde.getDropSuccess()) {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), dsde.getDropAction());
	} else {
		((AbstractPatchedTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), NONE);
	}
	c.setAutoscrolls(scrolls);
	fireDragEnded();
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:15,代碼來源:AbstractPatchedTransferHandler.java

示例7: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
/**
 * as the operation completes.
 */
public void dragDropEnd(DragSourceDropEvent dsde) {
    DragSourceContext dsc = dsde.getDragSourceContext();
    JComponent c = (JComponent)dsc.getComponent();

    if (dsde.getDropSuccess()) {
        ((DefaultTransferHandler) c.getTransferHandler()).exportDone(c, dsc.getTransferable(), dsde.getDropAction());
    } else {
        ((DefaultTransferHandler) c.getTransferHandler()).exportDone(c, null, NONE);
    }
    c.setAutoscrolls(scrolls);
}
 
開發者ID:vishal-mittal,項目名稱:SOEN6471-FreeCol,代碼行數:15,代碼來源:DefaultTransferHandler.java

示例8: dragDropEnd

import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent dsde)
{
      //Global.debugPrintln(this, "dragDropEnd:" + dsde);
      DragSourceContext sourceContext = dsde.getDragSourceContext();

}
 
開發者ID:NLeSC,項目名稱:vbrowser,代碼行數:7,代碼來源:VDragSourceListener.java


注:本文中的java.awt.dnd.DragSourceDropEvent.getDragSourceContext方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。