本文整理匯總了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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例8: dragDropEnd
import java.awt.dnd.DragSourceDropEvent; //導入方法依賴的package包/類
public void dragDropEnd(DragSourceDropEvent dsde)
{
//Global.debugPrintln(this, "dragDropEnd:" + dsde);
DragSourceContext sourceContext = dsde.getDragSourceContext();
}