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


Java EditPartFactory类代码示例

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


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

示例1: init

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * init
 *   void
 */
private void init() {
    list = new ArrayList<IUMLDiagramApplication>();
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    IConfigurationElement config[] = registry.getConfigurationElementsFor(NEXCORE_TOOL_UML_UI_CORE_EDITOR_EXTENSION);
    if (config != null) {
        for (IConfigurationElement element : config) {
            UMLDiagramApplication editor = new UMLDiagramApplication();
            try {
                editor.setFactory((EditPartFactory) element.createExecutableExtension(EXTENSION_EDIT_PART_FACTORY));
                editor.setName(element.getAttribute("name"));
                editor.setId(element.getAttribute("id"));
                list.add(editor);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:23,代码来源:UMLDiagramApplicationRegistry.java

示例2: initializeViewer

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
@Override
protected void initializeViewer(final Composite parent)
{
  parent.setLayout(new FillLayout());
  // Create the viewer using the supplied parent
  viewer = createGraphicalViewer();
  final Control c = viewer.createControl(parent);
  c.setBackground(ColorConstants.white);
  // Create and initialize the root edit part
  final ScalableRootEditPart root = new ScalableRootEditPart();
  viewer.setRootEditPart(root);
  viewer.setEditDomain(new DefaultEditDomain(null));
  // Create and initialize the edit part factory
  final EditPartFactory factory = createEditPartFactory();
  viewer.setEditPartFactory(factory);
  // Register the viewer as a selection provider
  getSite().setSelectionProvider(viewer);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:19,代码来源:AbstractGraphicalJiveView.java

示例3: createChild

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
protected EditPart createChild(Object model) {
	EditPartViewer epv =  getViewer();
	if (epv ==null) {
		 epv =  getViewer();
	}
	EditPartFactory epf = epv.getEditPartFactory();
	EditPart part = epf.createEditPart(this, model);
	return part;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:GraphTreeEditPart.java

示例4: initContents

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * Is called to indicate, that the contents have changed. Causes a complete update of the contents of the outline page.
 */
public void initContents() {
  if (_diagramEditor.getDiagramTypeProvider() != null) {
    Diagram diagram = _diagramEditor.getDiagramTypeProvider().getDiagram();
    EditPartFactory treeEditPartFactory = new OutlinePartFactory();
    getViewer().setEditPartFactory(treeEditPartFactory);
    getViewer().setContents(diagram);
  }
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:12,代码来源:DiagramEditorOutlinePage.java

示例5: initContents

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * Is called to indicate, that the contents have changed. Causes a complete
 * update of the contents of the outline page.
 */
public void initContents() {
	EditPartFactory treeEditPartFactory = new PictogramsTreeEditPartFactory();
	getViewer().setEditPartFactory(treeEditPartFactory);
	Diagram diagram = ((DiagramEditorInput) _diagramEditor.getEditorInput()).getDiagram();
	getViewer().setContents(diagram);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:GraphicsEditorOutlinePage.java

示例6: buildTimeline

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
private TimelineViewer buildTimeline(Composite composite, Object model, EditPartFactory factory) {
	TimelineViewer timelineViewer = new TimelineViewer(this);
	timelineViewer.setEditPartFactory(factory);
	timelineViewer.setContents(model);
	timelineViewer.setShowToolbar(false);
	addTimelineViewer(composite, timelineViewer, -1);
	timelineViewer.setHorizontalRangeModel(new SecondaryRangeModel(getHorizontalRangeModel()));
	return timelineViewer;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:10,代码来源:Timeline.java

示例7: getEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * Gets default edit part factory.
 */
protected EditPartFactory getEditPartFactory( )
{
	if ( editPartFactoy == null )
	{
		editPartFactoy = new GraphicalPartFactory( );
	}
	return editPartFactoy;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:12,代码来源:ReportEditorWithPalette.java

示例8: getEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
private EditPartFactory getEditPartFactory() {
	return new EditPartFactory() {
		@Override
		public EditPart createEditPart(final EditPart inContext, final Object inModel) {
			if (inModel instanceof CentralAssociationsModel) {
				return new RelationsEditPart((CentralAssociationsModel) inModel);
			} else if (inModel instanceof ItemAdapter) {
				return ItemEditPart.createItemEditPart((ItemAdapter) inModel, context);
			} else if (inModel instanceof IRelation) {
				return new RelationEditPart((IRelation) inModel);
			}
			return null;
		}
	};
}
 
开发者ID:aktion-hip,项目名称:relations,代码行数:16,代码来源:GraphicalViewerCreator.java

示例9: getFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @return the factory
 */
public EditPartFactory getFactory() {
    return factory;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:7,代码来源:UMLDiagramApplication.java

示例10: createDiagramEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ComponentDiagramEditPartFactory();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:8,代码来源:ComponentDiagramEditor.java

示例11: createDiagramEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ActivityDiagramEditPartFactory();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:8,代码来源:ActivityDiagramEditor.java

示例12: createDiagramEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new SequenceDiagramEditPartFactory();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:8,代码来源:SequenceDiagramEditor.java

示例13: createDiagramEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ClassDiagramEditPartFactory();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:8,代码来源:ClassDiagramEditor.java

示例14: createDiagramEditPartFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new UseCaseDiagramEditPartFactory();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:8,代码来源:UseCaseDiagramEditor.java

示例15: createEditParFactory

import org.eclipse.gef.EditPartFactory; //导入依赖的package包/类
@Override
protected EditPartFactory createEditParFactory() {
	return new ChartThemeEditPartFactory();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:ChartThemeEditor.java


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