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


Java DropTargetListener类代码示例

本文整理汇总了Java中org.eclipse.swt.dnd.DropTargetListener的典型用法代码示例。如果您正苦于以下问题:Java DropTargetListener类的具体用法?Java DropTargetListener怎么用?Java DropTargetListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DropTargetListener类属于org.eclipse.swt.dnd包,在下文中一共展示了DropTargetListener类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDropTarget

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
public DropTarget createDropTarget ( final Transfer[] transfers, final DropTargetListener dropTargetListener )
{
    checkWidget ();

    final DropTarget target = new DropTarget ( this.chartArea, DND.DROP_DEFAULT | DND.DROP_COPY | DND.DROP_LINK );
    target.setTransfer ( transfers );
    target.addDropListener ( dropTargetListener );
    return target;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:ChartManager.java

示例2: preWindowOpen

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
public void preWindowOpen()
{
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(800, 600));
    configurer.setShowFastViewBars(true);
    configurer.setShowStatusLine(true);
    configurer.setShowProgressIndicator(true);
    configurer.setShowCoolBar(false);
    
    // A DropTargetAdapter is need for editor DND support
    final DropTargetListener dtl = new EditorAreaDropAdapter(
            configurer.getWindow());
    configurer.configureEditorAreaDropListener(dtl);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:15,代码来源:ApplicationWorkbenchWindowAdvisor.java

示例3: hookRecursive

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
protected void hookRecursive(Control child, DropTargetListener dropListener) {
	DropTarget childTarget = findDropTarget(child);
	if (childTarget != null) {
		registerWithExistingTarget(childTarget);
		registerDropListener(childTarget, dropListener);
	}
	if (child instanceof Composite) {
		Composite composite = (Composite) child;
		Control[] children = composite.getChildren();
		for (Control control : children) {
			hookRecursive(control, dropListener);
		}
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:15,代码来源:ExampleDropTargetInstaller.java

示例4: hookRecursive

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
private void hookRecursive(Control child, DropTargetListener dropListener) {
	DropTarget childTarget = findDropTarget(child);
	if (childTarget != null) {
		registerWithExistingTarget(childTarget);
		registerDropListener(childTarget, dropListener);
	}
	if (child instanceof Composite) {
		Composite composite = (Composite) child;
		Control[] children = composite.getChildren();
		for (Control control : children) {
			hookRecursive(control, dropListener);
		}
	}
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:15,代码来源:ForceIdeUrlDropHandler.java

示例5: registerDropListener

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
protected void registerDropListener(DropTarget target, DropTargetListener dropListener) {
	target.removeDropListener(dropListener);
	target.addDropListener(dropListener);
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:5,代码来源:ExampleDropTargetInstaller.java

示例6: addDropSupport

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
@Override
public void addDropSupport(int operations, Transfer[] transferTypes, DropTargetListener listener) {
	fViewer.addDropSupport(operations, transferTypes, listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:PackageViewerWrapper.java

示例7: registerDropListener

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
private void registerDropListener(DropTarget target, DropTargetListener dropListener) {
	target.removeDropListener(dropListener);
	target.addDropListener(dropListener);
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:5,代码来源:ForceIdeUrlDropHandler.java

示例8: addDropSupport

import org.eclipse.swt.dnd.DropTargetListener; //导入依赖的package包/类
/**
 * Adds support for dropping items into this viewer via a user drag-and-drop
 * operation.
 * 
 * @param operations
 *            a bitwise OR of the supported drag and drop operation types (
 *            <code>DROP_COPY</code>,<code>DROP_LINK</code>, and
 *            <code>DROP_MOVE</code>)
 * @param transferTypes
 *            the transfer types that are supported by the drop operation
 * @param listener
 *            the callback that will be invoked after the drag and drop
 *            operation finishes
 * @see org.eclipse.swt.dnd.DND
 */
public void addDropSupport(int operations, Transfer[] transferTypes,
		final DropTargetListener listener) {
	Control control = getControl();
	DropTarget dropTarget = new DropTarget(control, operations);
	dropTarget.setTransfer(transferTypes);
	dropTarget.addDropListener(listener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:23,代码来源:StructuredViewer.java


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