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


Java GraphicalViewer.addDropTargetListener方法代码示例

本文整理汇总了Java中org.eclipse.gef.GraphicalViewer.addDropTargetListener方法的典型用法代码示例。如果您正苦于以下问题:Java GraphicalViewer.addDropTargetListener方法的具体用法?Java GraphicalViewer.addDropTargetListener怎么用?Java GraphicalViewer.addDropTargetListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.gef.GraphicalViewer的用法示例。


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

示例1: initializeEditor

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
protected void initializeEditor() {
	GraphicalViewer graphicalViewer = getGraphicalViewer();
	graphicalViewer.addDropTargetListener(new JSSTemplateTransferDropTargetListener(graphicalViewer));
	graphicalViewer.addDropTargetListener(new ReportUnitDropTargetListener(graphicalViewer));
	graphicalViewer.addDropTargetListener(new ImageResourceDropTargetListener(graphicalViewer, ResourceTransfer
			.getInstance()));
	graphicalViewer.addDropTargetListener(new ImageResourceDropTargetListener(graphicalViewer, FileTransfer
			.getInstance()));
	graphicalViewer.addDropTargetListener(new ImageResourceDropTargetListener(graphicalViewer, ImageURLTransfer
			.getInstance()));

	// Load the contributed drop providers for the contributed template styles
	List<TemplateViewProvider> dropProviders = JaspersoftStudioPlugin.getExtensionManager().getStylesViewProvider();
	for (TemplateViewProvider provider : dropProviders) {
		AbstractTransferDropTargetListener listener = provider.getDropListener(graphicalViewer);
		if (listener != null)
			graphicalViewer.addDropTargetListener(listener);
	}

	getEditorSite().getActionBarContributor();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:22,代码来源:AbstractVisualEditor.java

示例2: initDragAndDrop

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
private void initDragAndDrop(final GraphicalViewer viewer) {
    final AbstractTransferDragSourceListener dragSourceListener = new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
    viewer.addDragSourceListener(dragSourceListener);

    final AbstractTransferDropTargetListener dropTargetListener = new ERDiagramTransferDropTargetListener(viewer, TemplateTransfer.getInstance());

    viewer.addDropTargetListener(dropTargetListener);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:9,代码来源:ERDiagramEditor.java

示例3: initDragAndDrop

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
private void initDragAndDrop(GraphicalViewer viewer) {
	AbstractTransferDragSourceListener dragSourceListener = new ERDiagramTransferDragSourceListener(
			viewer, TemplateTransfer.getInstance());
	viewer.addDragSourceListener(dragSourceListener);

	AbstractTransferDropTargetListener dropTargetListener = new ERDiagramTransferDropTargetListener(
			viewer, TemplateTransfer.getInstance());

	viewer.addDropTargetListener(dropTargetListener);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:11,代码来源:ERDiagramEditor.java

示例4: initializeGraphicalViewer

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
/**
 * @see org.eclipse.gef.ui.parts.GraphicalEditorWithFlyoutPalette#initializeGraphicalViewer()
 */
@Override
protected void initializeGraphicalViewer() {
    super.initializeGraphicalViewer();
    GraphicalViewer viewer = getGraphicalViewer();
    viewer.setContents(diagramEditDomain.getDiagram());
    viewer.addDropTargetListener(createDropTagertListener());
    
    this.recorder = new ChangeRecorder(getDiagram());
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:13,代码来源:AbstractDiagramEditor.java

示例5: initDragAndDrop

import org.eclipse.gef.GraphicalViewer; //导入方法依赖的package包/类
protected void initDragAndDrop(GraphicalViewer viewer) {
    final AbstractTransferDragSourceListener dragSourceListener =
            new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
    viewer.addDragSourceListener(dragSourceListener);
    final AbstractTransferDropTargetListener dropTargetListener =
            new ERDiagramTransferDropTargetListener(viewer, TemplateTransfer.getInstance());
    viewer.addDropTargetListener(dropTargetListener);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:9,代码来源:MainDiagramEditor.java


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