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


Java StructuredViewer.addDragSupport方法代码示例

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


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

示例1: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor ( StructuredViewer viewer )
{
    MenuManager contextMenu = new MenuManager ( "#PopUp" ); //$NON-NLS-1$
    contextMenu.add ( new Separator ( "additions" ) ); //$NON-NLS-1$
    contextMenu.setRemoveAllWhenShown ( true );
    contextMenu.addMenuListener ( this );
    Menu menu = contextMenu.createContextMenu ( viewer.getControl () );
    viewer.getControl ().setMenu ( menu );
    getSite ().registerContextMenu ( contextMenu, new UnwrappingSelectionProvider ( viewer ) );

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance (), LocalSelectionTransfer.getTransfer (), FileTransfer.getInstance () };
    viewer.addDragSupport ( dndOperations, transfers, new ViewerDragAdapter ( viewer ) );
    viewer.addDropSupport ( dndOperations, transfers, new EditingDomainViewerDropAdapter ( editingDomain, viewer ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:DetailViewEditor.java

示例2: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor ( StructuredViewer viewer )
{
    MenuManager contextMenu = new MenuManager ( "#PopUp" );
    contextMenu.add ( new Separator ( "additions" ) );
    contextMenu.setRemoveAllWhenShown ( true );
    contextMenu.addMenuListener ( this );
    Menu menu = contextMenu.createContextMenu ( viewer.getControl () );
    viewer.getControl ().setMenu ( menu );
    getSite ().registerContextMenu ( contextMenu, new UnwrappingSelectionProvider ( viewer ) );

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance (), LocalSelectionTransfer.getTransfer (), FileTransfer.getInstance () };
    viewer.addDragSupport ( dndOperations, transfers, new ViewerDragAdapter ( viewer ) );
    viewer.addDropSupport ( dndOperations, transfers, new EditingDomainViewerDropAdapter ( editingDomain, viewer ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:MemoryEditor.java

示例3: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well
 * registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 *
 * @generated NOT
 */
protected void createContextMenuFor ( final StructuredViewer viewer )
{
    final MenuManager contextMenu = new MenuManager ( "#PopUp" ); //$NON-NLS-1$
    contextMenu.add ( new Separator ( "additions" ) ); //$NON-NLS-1$
    contextMenu.setRemoveAllWhenShown ( true );
    contextMenu.addMenuListener ( this );
    final Menu menu = contextMenu.createContextMenu ( viewer.getControl () );
    viewer.getControl ().setMenu ( menu );
    getSite ().registerContextMenu ( contextMenu, new UnwrappingSelectionProvider ( viewer ) );

    final int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    final Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance (), LocalSelectionTransfer.getTransfer (), FileTransfer.getInstance (), ItemTransfer.getInstance () };
    viewer.addDragSupport ( dndOperations, transfers, new ViewerDragAdapter ( viewer ) );
    viewer.addDropSupport ( dndOperations, transfers, new DropAdapterExtension ( this.editingDomain, viewer ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:24,代码来源:ComponentEditor.java

示例4: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
    MenuManager contextMenu = new MenuManager("#PopUp");
    contextMenu.add(new Separator("additions"));
    contextMenu.setRemoveAllWhenShown(true);
    contextMenu.addMenuListener(this);
    Menu menu = contextMenu.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] {LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(),
        FileTransfer.getInstance()};
    viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
    viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:ObeoNetwork,项目名称:M2Doc,代码行数:23,代码来源:GenconfEditor.java

示例5: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer)
{
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu= contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:cplutte,项目名称:bts,代码行数:22,代码来源:BtsmodelEditor.java

示例6: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well
 * registering the menu for extension. <!-- begin-user-doc --> <!--
 * end-user-doc -->
 *
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(),
			FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:mondo-project,项目名称:mondo-demo-wt,代码行数:23,代码来源:WTSpec4MEditor.java

示例7: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu,
			new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(
			viewer));
	viewer.addDropSupport(dndOperations, transfers,
			new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:24,代码来源:Securebpmn2Editor.java

示例8: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
    MenuManager contextMenu = new MenuManager("#PopUp");
    contextMenu.add(new Separator("additions"));
    contextMenu.setRemoveAllWhenShown(true);
    contextMenu.addMenuListener(this);
    Menu menu = contextMenu.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(),
            FileTransfer.getInstance() };
    viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
    viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:22,代码来源:SoftwareEditor.java

示例9: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
    MenuManager contextMenu = new MenuManager("#PopUp");
    contextMenu.add(new Separator("additions"));
    contextMenu.setRemoveAllWhenShown(true);
    contextMenu.addMenuListener(this);
    Menu menu = contextMenu.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

    int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
    Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(),
            FileTransfer.getInstance() };
    viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
    viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:kopl,项目名称:SPLevo,代码行数:21,代码来源:RefinementEditor.java

示例10: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu,
			new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(),
			LocalSelectionTransfer.getTransfer(),
			FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(
			viewer));
	viewer.addDropSupport(dndOperations, transfers,
			new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:26,代码来源:OrmEditor.java

示例11: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well
 * registering the menu for extension. <!-- begin-user-doc --> <!--
 * end-user-doc -->
 * 
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu,
		new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(
		viewer));
	viewer.addDropSupport(dndOperations, transfers,
		new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:edgarmueller,项目名称:emfstore-rest,代码行数:25,代码来源:ConfigEditor.java

示例12: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well
 * registering the menu for extension. <!-- begin-user-doc --> <!--
 * end-user-doc -->
 * 
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu,
			new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(),
			LocalSelectionTransfer.getTransfer(),
			FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(
			viewer));
	viewer.addDropSupport(dndOperations, transfers,
			new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:joakimkistowski,项目名称:LIMBO,代码行数:27,代码来源:DlimEditor.java

示例13: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
private final MenuManager createContextMenuFor(StructuredViewer viewer) {
	
	MenuManager contextMenu = new MenuManager("#PopUp", "eu.cloudscale.env.toolcahin.treeview.menumanager");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu = contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	
	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
	
	return contextMenu;
}
 
开发者ID:CloudScale-Project,项目名称:Environment,代码行数:17,代码来源:EMFPopupMenuSupport.java

示例14: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu= contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:IncQueryLabs,项目名称:smarthome-cep-demonstrator,代码行数:21,代码来源:SmarthomeEditor.java

示例15: createContextMenuFor

import org.eclipse.jface.viewers.StructuredViewer; //导入方法依赖的package包/类
/**
 * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void createContextMenuFor(StructuredViewer viewer) {
	MenuManager contextMenu = new MenuManager("#PopUp");
	contextMenu.add(new Separator("additions"));
	contextMenu.setRemoveAllWhenShown(true);
	contextMenu.addMenuListener(this);
	Menu menu= contextMenu.createContextMenu(viewer.getControl());
	viewer.getControl().setMenu(menu);
	getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));

	int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
	Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
	viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
	viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:21,代码来源:AnalysisEditor.java


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