本文整理汇总了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();
}
示例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);
}
示例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);
}
示例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());
}
示例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);
}