当前位置: 首页>>代码示例>>Java>>正文


Java DragSourceContext.getComponent方法代码示例

本文整理汇总了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();
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:AbstractPatchedTransferHandler.java

示例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);
}
 
开发者ID:FreeCol,项目名称:freecol,代码行数:17,代码来源:DefaultTransferHandler.java

示例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);
}
 
开发者ID:valsr,项目名称:SweetHome3D,代码行数:15,代码来源:VisualTransferHandler.java

示例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);
}
 
开发者ID:vilie,项目名称:javify,代码行数:16,代码来源:TransferHandler.java

示例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);
}
 
开发者ID:umple,项目名称:umple,代码行数:16,代码来源:DefaultDrawingViewTransferHandler.java

示例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();
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:15,代码来源:AbstractPatchedTransferHandler.java

示例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);
}
 
开发者ID:vishal-mittal,项目名称:SOEN6471-FreeCol,代码行数:15,代码来源:DefaultTransferHandler.java

示例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);
}
 
开发者ID:FreeCol,项目名称:freecol,代码行数:9,代码来源:DefaultTransferHandler.java

示例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);
}
 
开发者ID:vishal-mittal,项目名称:SOEN6471-FreeCol,代码行数:6,代码来源:DefaultTransferHandler.java


注:本文中的java.awt.dnd.DragSourceContext.getComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。