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


Java TransferDropTargetListener类代码示例

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


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

示例1: initializeGraphicalViewer

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
protected void initializeGraphicalViewer() {
		super.initializeGraphicalViewer();
		getGraphicalViewer().setContents(getDiagram());
//		getGraphicalViewer()
//		.addDropTargetListener(
//				(TransferDropTargetListener) new TemplateTransferDropTargetListener(
//						getGraphicalViewer()));
		getGraphicalViewer()
		.addDropTargetListener(
				(TransferDropTargetListener) new MyTemplateTransferDropTargetListener(
						getGraphicalViewer(), getDiagram()));
//		getGraphicalViewer().setSelection(new StructuredSelection(elements))
		/*
		 * getGraphicalViewer().addDropTargetListener((TransferDropTargetListener
		 * ) new TextTransferDropTargetListener( getGraphicalViewer(),
		 * TextTransfer.getInstance()));
		 */
	}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:19,代码来源:GUIEditor.java

示例2: createTransferDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Create a transfer drop target listener. When using a
 * CombinedTemplateCreationEntry tool in the palette, this will enable model
 * element creation by dragging from the palette.
 * 
 * @see #createPaletteViewerProvider()
 */
public TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		@Override
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class) template);
		}
	};
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:ELTGraphicalEditor.java

示例3: createTransferDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
private TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class<?>) template);
		}
	};
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:8,代码来源:DbToolGefEditor.java

示例4: configureOutlineViewer

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
protected void configureOutlineViewer(){
	getViewer().setEditDomain(editor.getEditorEditDomain());
	getViewer().setEditPartFactory(new DiagramTreePartFactory());
	ContextMenuProvider cmProvider = new GUIEditorContextMenuProvider(
			getViewer(), editor.getEditorActionRegistry());
	getViewer().setContextMenu(cmProvider);
	getSite().registerContextMenu(
			"com.forgedui.editor.view.outline.contextmenu",
			cmProvider, getSite().getSelectionProvider());
	// Making this view as a selection provider to the workbench.
	editor.getEditorSelectionSynchronizer().addViewer(getViewer());
	getViewer().addDropTargetListener((TransferDropTargetListener)
		new MyTemplateTransferDropTargetListener(getViewer(), diagram));
	
	IToolBarManager tbm = getSite().getActionBars().getToolBarManager();
	showOutlineAction = new Action() {
		public void run() {
			showPage(ID_OUTLINE);
		}
	};
	showOutlineAction.setImageDescriptor(GUIEditorPlugin.getImageDescriptor("icons/outline.gif")); //$NON-NLS-1$
	showOutlineAction.setToolTipText("Show Outline");
	tbm.add(showOutlineAction);
	showOverviewAction = new Action() {
		public void run() {
			showPage(ID_OVERVIEW);
		}
	};
	showOverviewAction.setImageDescriptor(GUIEditorPlugin.getImageDescriptor("icons/overview.gif")); //$NON-NLS-1$
	showOverviewAction.setToolTipText("Show Overview");
	tbm.add(showOverviewAction);
	showPage(ID_OUTLINE);
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:34,代码来源:DiagramOutlinePage2.java

示例5: getTransferDropTargetListeners

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
@Override
public List<TransferDropTargetListener> getTransferDropTargetListeners(TreeViewer treeViewer) {
	List<TransferDropTargetListener> dropListeners = new ArrayList<TransferDropTargetListener>(1);
	dropListeners.add(new RepositoryFileResourceDropTargetListener(FileTransfer.getInstance()));
	dropListeners.add(new InputControlDropTargetListener(treeViewer));
	return dropListeners;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:ServerProvider.java

示例6: addDNDListeners

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Add the listeners for the drag and drop
 */
private void addDNDListeners() {
	int operations = DND.DROP_COPY | DND.DROP_MOVE;
	List<TransferDragSourceListener> dragListeners = new ArrayList<TransferDragSourceListener>();
	List<TransferDropTargetListener> dropListeners = new ArrayList<TransferDropTargetListener>();
	for (IRepositoryViewProvider rp : rprovs) {
		List<TransferDragSourceListener> tdsl = rp.getTransferDragSourceListeners(treeViewer);
		if (tdsl != null)
			dragListeners.addAll(tdsl);
		List<TransferDropTargetListener> tdtl = rp.getTransferDropTargetListeners(treeViewer);
		if (tdtl != null)
			dropListeners.addAll(tdtl);
	}
	// In case its needed add the related delegating adapter for both drag and drop operations
	if (!dragListeners.isEmpty()) {
		DelegatingDragAdapter dragAdapter = new DelegatingDragAdapter();
		for (TransferDragSourceListener dragListener : dragListeners) {
			dragAdapter.addDragSourceListener(dragListener);
		}
		treeViewer.addDragSupport(operations, dragAdapter.getTransfers(), dragAdapter);
	}
	if (!dropListeners.isEmpty()) {
		DelegatingDropAdapter dropAdapter = new DelegatingDropAdapter();
		for (TransferDropTargetListener dropListener : dropListeners) {
			dropAdapter.addDropTargetListener(dropListener);
		}
		treeViewer.addDropSupport(operations, dropAdapter.getTransfers(), dropAdapter);
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:32,代码来源:RepositoryView.java

示例7: createTransferDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Create a transfer drop target listener. When using a
 * CombinedTemplateCreationEntry tool in the palette, this will enable model
 * element creation by dragging from the palette.
 * 
 * @see #createPaletteViewerProvider()
 */
private TransferDropTargetListener createTransferDropTargetListener() {
	return new TemplateTransferDropTargetListener(getGraphicalViewer()) {
		protected CreationFactory getFactory(Object template) {
			return new SimpleFactory((Class) template);
		}
	};
}
 
开发者ID:lunifera,项目名称:lunifera-sharky-m2m,代码行数:15,代码来源:ShapesEditor.java

示例8: getTransferDropTargetListeners

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
@Override
public List<TransferDropTargetListener> getTransferDropTargetListeners(TreeViewer treeViewer) {
	return new ArrayList<TransferDropTargetListener>(0);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:DataAdapterProvider.java

示例9: addDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
public void addDropTargetListener(TransferDropTargetListener listener) {
	Assert.isLegal(!fStarted);

	fDelegatingDropAdapter.addDropTargetListener(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:JdtViewerDropSupport.java

示例10: addDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * @see EditPartViewer#addDropTargetListener(org.eclipse.gef.dnd.TransferDropTargetListener)
 */
public void addDropTargetListener(
		org.eclipse.gef.dnd.TransferDropTargetListener listener) {
	addDropTargetListener((TransferDropTargetListener) listener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:8,代码来源:AbstractEditPartViewer.java

示例11: removeDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * @see EditPartViewer#removeDropTargetListener(org.eclipse.gef.dnd.TransferDropTargetListener)
 * @deprecated
 */
public void removeDropTargetListener(
		org.eclipse.gef.dnd.TransferDropTargetListener listener) {
	removeDropTargetListener((TransferDropTargetListener) listener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:9,代码来源:AbstractEditPartViewer.java

示例12: getTransferDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
protected TransferDropTargetListener getTransferDropTargetListener() {
    // if we cached it, we'd share it amongst models. 
    return new UrnDropTargetListener(viewer, ((URNspec)((UCMNavMultiPageEditor)viewer.getContents()).getModel()));
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:5,代码来源:StrategiesView.java

示例13: getTransferDropTargetListeners

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Returns the list of {@link TransferDropTargetListener}s that should be added to the viewer.
 */
public List<TransferDropTargetListener> getTransferDropTargetListeners(TreeViewer treeViewer);
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:IRepositoryViewProvider.java

示例14: addDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Provided for compatibility with existing code.
 * 
 * @param listener
 *            the listener
 * @see #addDropTargetListener(TransferDropTargetListener)
 */
void addDropTargetListener(
		org.eclipse.gef.dnd.TransferDropTargetListener listener);
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:EditPartViewer.java

示例15: removeDropTargetListener

import org.eclipse.jface.util.TransferDropTargetListener; //导入依赖的package包/类
/**
 * Removes the specified drop target listener. If all listeners are removed,
 * the DropTarget that was created will be disposed.
 * 
 * @see #addDropTargetListener(TransferDropTargetListener)
 * @param listener
 * @deprecated
 */
void removeDropTargetListener(
		org.eclipse.gef.dnd.TransferDropTargetListener listener);
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:11,代码来源:EditPartViewer.java


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