Java 类org.eclipse.gef.EditPartFactory 实例源码

项目:NEXCORE-UML-Modeler    文件:UMLDiagramApplicationRegistry.java   
/**
 * 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();
            }
        }
    }
}
项目:jive    文件:AbstractGraphicalJiveView.java   
@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);
}
项目:gw4e.project    文件:GraphTreeEditPart.java   
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;
}
项目:triquetrum    文件:DiagramEditorOutlinePage.java   
/**
 * 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);
  }
}
项目:SecureBPMN    文件:GraphicsEditorOutlinePage.java   
/**
 * 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);
}
项目:OpenSPIFe    文件:Timeline.java   
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;
}
项目:birt    文件:ReportEditorWithPalette.java   
/**
 * Gets default edit part factory.
 */
protected EditPartFactory getEditPartFactory( )
{
    if ( editPartFactoy == null )
    {
        editPartFactoy = new GraphicalPartFactory( );
    }
    return editPartFactoy;
}
项目:relations    文件:GraphicalViewerCreator.java   
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;
        }
    };
}
项目:NEXCORE-UML-Modeler    文件:UMLDiagramApplication.java   
/**
 * @return the factory
 */
public EditPartFactory getFactory() {
    return factory;
}
项目:NEXCORE-UML-Modeler    文件:ComponentDiagramEditor.java   
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ComponentDiagramEditPartFactory();
}
项目:NEXCORE-UML-Modeler    文件:ActivityDiagramEditor.java   
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ActivityDiagramEditPartFactory();
}
项目:NEXCORE-UML-Modeler    文件:SequenceDiagramEditor.java   
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new SequenceDiagramEditPartFactory();
}
项目:NEXCORE-UML-Modeler    文件:ClassDiagramEditor.java   
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new ClassDiagramEditPartFactory();
}
项目:NEXCORE-UML-Modeler    文件:UseCaseDiagramEditor.java   
/**
 * @see nexcore.tool.uml.ui.core.diagram.editor.AbstractDiagramEditor#createDiagramEditPartFactory()
 */
@Override
protected EditPartFactory createDiagramEditPartFactory() {
    return new UseCaseDiagramEditPartFactory();
}
项目:PDFReporter-Studio    文件:ChartThemeEditor.java   
@Override
protected EditPartFactory createEditParFactory() {
    return new ChartThemeEditPartFactory();
}
项目:PDFReporter-Studio    文件:JDReportOutlineView.java   
public EditPartFactory getEditPartFactory() {
    if (editPartFactory == null)
        editPartFactory = new OutlineTreeEditPartFactory();
    return editPartFactory;
}
项目:PDFReporter-Studio    文件:JDReportOutlineView.java   
public void setEditPartFactory(EditPartFactory editPartFactory) {
    this.editPartFactory = editPartFactory;
    getViewer().setEditPartFactory(getEditPartFactory());
}
项目:PDFReporter-Studio    文件:StyleTemplateEditor.java   
@Override
protected EditPartFactory createEditParFactory() {
    return new StyleEditPartFactory();
}
项目:gef-gwt    文件:AbstractEditPartViewer.java   
/**
 * @see EditPartViewer#getEditPartFactory()
 */
public EditPartFactory getEditPartFactory() {
    return factory;
}
项目:gef-gwt    文件:AbstractEditPartViewer.java   
/**
 * @see EditPartViewer#setEditPartFactory(org.eclipse.gef.EditPartFactory)
 */
public void setEditPartFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:ROADDesigner    文件:SmcEditPartProvider.java   
/**
 * @generated
 */
public final EditPartFactory getFactory() {
    return factory;
}
项目:ROADDesigner    文件:SmcEditPartProvider.java   
/**
 * @generated
 */
protected void setFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:jive    文件:SequenceDiagramView.java   
@Override
protected EditPartFactory createEditPartFactory()
{
  return new SequenceDiagramEditPartFactory();
}
项目:jive    文件:ContourDiagramView.java   
@Override
protected EditPartFactory createEditPartFactory()
{
  return new ContourModelEditPartFactory();
}
项目:birt    文件:LibraryMasterPageEditorFormPage.java   
protected EditPartFactory getEditPartFactory( )
{
    return new LibraryMasterPageGraphicalPartFactory();
}
项目:birt    文件:LibraryLayoutEditor.java   
protected EditPartFactory getEditPartFactory( )
{
    return new LibraryGraphicalPartFactory( );
}
项目:MMINT    文件:RelationalDatabaseEditPartProvider.java   
/**
 * @generated
 */
public final EditPartFactory getFactory() {
    return factory;
}
项目:MMINT    文件:RelationalDatabaseEditPartProvider.java   
/**
 * @generated
 */
protected void setFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:MMINT    文件:IStarEditPartProvider.java   
/**
 * @generated
 */
public final EditPartFactory getFactory() {
    return factory;
}
项目:MMINT    文件:IStarEditPartProvider.java   
/**
 * @generated
 */
protected void setFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:d-case_editor    文件:DcaseEditPartProvider.java   
/**
 * @generated
 */
public final EditPartFactory getFactory() {
    return factory;
}
项目:d-case_editor    文件:DcaseEditPartProvider.java   
/**
 * @generated
 */
protected void setFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:NEXCORE-UML-Modeler    文件:IUMLDiagramApplication.java   
/**
 * @return the factory
 */
public EditPartFactory getFactory();
项目:NEXCORE-UML-Modeler    文件:UMLDiagramApplication.java   
/**
 * @param factory
 *            the factory to set
 */
public void setFactory(EditPartFactory factory) {
    this.factory = factory;
}
项目:NEXCORE-UML-Modeler    文件:AbstractDiagramEditor.java   
/**
 * 에디트 파트 팩토리를 생성한다.
 * 
 * @return
 */
protected abstract EditPartFactory createDiagramEditPartFactory();
项目:jive    文件:AbstractGraphicalJiveView.java   
/**
 * Creates the {@code EditPartFactory} to be used by the viewer in order to create
 * {@code EditPart}s for elements of the model. This method is called by
 * {@link #initializeViewer(Composite)}, and the resulting factory is used during the lifetime of
 * the view part.
 * 
 * @return the edit part factory the was created.
 */
protected abstract EditPartFactory createEditPartFactory();
项目:PDFReporter-Studio    文件:AGraphicEditor.java   
protected abstract EditPartFactory createEditParFactory();