本文整理汇总了Java中java.awt.dnd.DragSourceContext.getComponent方法的典型用法代码示例。如果您正苦于以下问题:Java DragSourceContext.getComponent方法的具体用法?Java DragSourceContext.getComponent怎么用?Java DragSourceContext.getComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.dnd.DragSourceContext
的用法示例。
在下文中一共展示了DragSourceContext.getComponent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dragDropEnd
import java.awt.dnd.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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.DragSourceContext; //导入方法依赖的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: dropActionChanged
import java.awt.dnd.DragSourceContext; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public void dropActionChanged(DragSourceDragEvent dsde) {
DragSourceContext dsc = dsde.getDragSourceContext();
JComponent comp = (JComponent)dsc.getComponent();
updatePartialChosen(comp, dsde.getUserAction() == MOVE);
}
示例9: dropActionChanged
import java.awt.dnd.DragSourceContext; //导入方法依赖的package包/类
public void dropActionChanged(DragSourceDragEvent dsde) {
DragSourceContext dsc = dsde.getDragSourceContext();
JComponent comp = (JComponent)dsc.getComponent();
updatePartialChosen(comp, dsde.getUserAction() == MOVE);
}