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


Java TreeViewer类代码示例

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


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

示例1: registerAction

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
private void registerAction(TreeViewer treeViewer,
		ActionRegistry actionRegistry) {
	IAction[] actions = { new CreateIndexAction(treeViewer),
			new CreateSequenceAction(treeViewer),
			new CreateTriggerAction(treeViewer),
			new CreateTablespaceAction(treeViewer),
			new ChangeOutlineViewToPhysicalAction(treeViewer),
			new ChangeOutlineViewToLogicalAction(treeViewer),
			new ChangeOutlineViewToBothAction(treeViewer),
			new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer),
			new ChangeOutlineViewOrderByLogicalNameAction(treeViewer) };

	for (IAction action : actions) {
		actionRegistry.registerAction(action);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:17,代码来源:ERDiagramOutlinePage.java

示例2: getAdapter

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@Override
public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
	if (GFPreferences.getInstance().isGenericOutlineActive()) {
		if (IContentOutlinePage.class.equals(adapterType)) {
			if (adaptableObject instanceof DiagramEditor) {
				DiagramEditor diagramEditor = (DiagramEditor) adaptableObject;
				if (diagramEditor.getConfigurationProvider() != null) { // diagram editor initialized?
					GraphicsEditorOutlinePage outlinePage = new GraphicsEditorOutlinePage(new TreeViewer(), diagramEditor
							.getGraphicalViewer(), diagramEditor.getActionRegistryInternal(), diagramEditor.getEditDomain(),
							diagramEditor.getCommonKeyHandler(), diagramEditor.getAdapter(ZoomManager.class), diagramEditor
									.getSelectionSynchronizerInternal(), diagramEditor);
					return outlinePage;
				}
			}
		}
	}
	return null;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:19,代码来源:ContentOutlinePageAdapterFactory.java

示例3: createOutline

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView createOutline(TreeViewer viewer) {
	outlinePage = new JDReportOutlineView(this, viewer) {
		protected void initActions(ActionRegistry registry, IActionBars bars) {
			String id = CreateStyleTemplateReferenceAction.ID;
			bars.setGlobalActionHandler(id, registry.getAction(id));

			id = CreateStyleAction.ID;
			bars.setGlobalActionHandler(id, registry.getAction(id));
		}

		protected org.eclipse.gef.ContextMenuProvider getMenuContentProvider() {
			return createContextMenuProvider(getViewer());
		}
	};
	outlinePage.setEditPartFactory(new StyleTreeEditPartFactory());
	return outlinePage;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:18,代码来源:StyleTemplateEditor.java

示例4: selectionChanged

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public void selectionChanged(SelectionChangedEvent event) {
    StructuredSelection sel = (StructuredSelection) event.getSelection();

    if ((event.getSource() instanceof TreeViewer) && (multieditor != null)) {
        for (Iterator j = sel.iterator(); j.hasNext();) {
            Object obj = j.next();

            if (obj instanceof IndicatorTreeEditPart) {
                if (currentSelection != null) {
                    currentSelection.setSelected(false);
                }
                currentSelection = (IndicatorTreeEditPart) obj;

                Indicator cind = ((IndicatorTreeEditPart) obj).getIndicator();
                currentIndicator = cind;
            }

        }
    }
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:21,代码来源:KPIListView.java

示例5: getDeleteCommand

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
/**
 * Returns either a DeletePathNodeCommand
 * 
 * @see org.eclipse.gef.editpolicies.ComponentEditPolicy#getDeleteCommand(org.eclipse.gef.requests.GroupRequest)
 */
protected Command getDeleteCommand(GroupRequest request) {
    Object parent = getHost().getParent().getModel();
    Object node = getHost().getModel();
    java.util.Map registry;

    if (getHost().getViewer() instanceof TreeViewer) {
        // we need an editpart registry with NodeConnectionEditParts
        UCMNavMultiPageEditor editor = (UCMNavMultiPageEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
        registry = editor.getCurrentPage().getGraphicalViewer().getEditPartRegistry();
    } else
        registry = getHost().getViewer().getEditPartRegistry();

    if (parent instanceof UCMmap && node instanceof PathNode) {
        return new DeletePathNodeCommand((PathNode) node, registry);
    }

    return super.createDeleteCommand(request);
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:24,代码来源:PathNodeComponentEditPolicy.java

示例6: GW4EOutlinePage

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public GW4EOutlinePage() {
	super(new TreeViewer());
	gWGraph.addPropertyChangeListener(this);
	filter = new OutLineFilter(this);
	Map registry = getGraphicalViewer().getEditPartRegistry();
	gwtpf = new GW4ETreeEditPartFactory(registry, filter);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:GW4EEditor.java

示例7: getAdapter

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class adapter) {
	if(adapter==IPropertySheetPage.class){
		this.propertySheetPage=new GraphicalPropertySheetPage(this, getCommandStack());
		return this.propertySheetPage;
	}
	if(adapter==IContentOutlinePage.class){
		OutlinePage page=new OutlinePage(new TreeViewer()); 
		return page;
	}
	return super.getAdapter(adapter);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:14,代码来源:GraphicalEditorPage.java

示例8: getAdapter

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public Object getAdapter(Class type) {
	if (type == IContentOutlinePage.class) {
		return new DbToolGefEditorOutlinePage(new TreeViewer(), this);
	} else if (type == IPropertySheetPage.class) {
		return new TabbedPropertySheetPage(this);
	} else if (type == ZoomManager.class) {
		return getGraphicalViewer().getProperty(ZoomManager.class.toString());
	}
	return super.getAdapter(type);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:12,代码来源:DbToolGefEditor.java

示例9: ERDiagramOutlinePage

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public ERDiagramOutlinePage(final ERDiagram diagram) {
    // GEFツリービューワを使用する
    super(new TreeViewer());

    viewer = (TreeViewer) getViewer();
    this.diagram = diagram;

    outlineActionRegistory = new ActionRegistry();
    registerAction(viewer, outlineActionRegistory);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:11,代码来源:ERDiagramOutlinePage.java

示例10: registerAction

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
private void registerAction(final TreeViewer treeViewer, final ActionRegistry actionRegistry) {
    final IAction[] actions = {new CreateIndexAction(treeViewer), new CreateSequenceAction(treeViewer), new CreateTriggerAction(treeViewer), new CreateTablespaceAction(treeViewer), new ChangeOutlineViewToPhysicalAction(treeViewer), new ChangeOutlineViewToLogicalAction(treeViewer), new ChangeOutlineViewToBothAction(treeViewer), new ChangeOutlineViewOrderByPhysicalNameAction(treeViewer), new ChangeOutlineViewOrderByLogicalNameAction(treeViewer)};

    for (final IAction action : actions) {
        actionRegistry.registerAction(action);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:ERDiagramOutlinePage.java

示例11: ERDiagramOutlinePage

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public ERDiagramOutlinePage(ERDiagram diagram) {
	// GEFツリービューワを使用する
	super(new TreeViewer());

	this.viewer = (TreeViewer) this.getViewer();
	this.diagram = diagram;

	this.outlineActionRegistory = new ActionRegistry();
	this.registerAction(this.viewer, outlineActionRegistory);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:11,代码来源:ERDiagramOutlinePage.java

示例12: AbstractOutlineBaseAction

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
public AbstractOutlineBaseAction(String id, String text, int style,
		TreeViewer treeViewer) {
	super(text, style);
	this.setId(id);

	this.treeViewer = treeViewer;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:AbstractOutlineBaseAction.java

示例13: getOutlinePage

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected IContentOutlinePage getOutlinePage() {
	if (null == outline && null != getGraphicalViewer()) {
		TreeViewer viewer = new TreeViewer();
		viewer.setEditDomain(getEditDomain());
		outline = new DiagramOutlinePage2(this, viewer, getDiagram(),
				getGraphicalViewer().getRootEditPart());
	}
	return outline;
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:10,代码来源:GUIEditor.java

示例14: createOutline

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView createOutline(TreeViewer viewer) {
	outlinePage = new JDReportOutlineView(this, viewer) {
		protected void initActions(ActionRegistry registry, IActionBars bars) {
		}

		protected org.eclipse.gef.ContextMenuProvider getMenuContentProvider() {
			return createContextMenuProvider(getViewer());
		}
	};
	// outlinePage.setEditPartFactory(new StyleTreeEditPartFactory());
	return outlinePage;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:13,代码来源:ChartThemeEditor.java

示例15: getOutlineView

import org.eclipse.gef.ui.parts.TreeViewer; //导入依赖的package包/类
protected JDReportOutlineView getOutlineView() {
	if (outlinePage == null) {
		TreeViewer viewer = new TreeViewer();
		outlinePage = createOutline(viewer);
	}
	return outlinePage;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:8,代码来源:AGraphicEditor.java


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