當前位置: 首頁>>代碼示例>>Java>>正文


Java EditPart.setParent方法代碼示例

本文整理匯總了Java中org.eclipse.gef.EditPart.setParent方法的典型用法代碼示例。如果您正苦於以下問題:Java EditPart.setParent方法的具體用法?Java EditPart.setParent怎麽用?Java EditPart.setParent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.gef.EditPart的用法示例。


在下文中一共展示了EditPart.setParent方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createEditPart

import org.eclipse.gef.EditPart; //導入方法依賴的package包/類
@Override
public EditPart createEditPart(EditPart context, Object model) {
	EditPart part = null;
	
	if(model instanceof DwFeatureModelWrapped){
		part = new DwFeatureModelEditorEditPart(editor);
		viewer.getControl().addControlListener((DwFeatureModelEditPart)part);
		viewer.addPropertyChangeListener((DwFeatureModelEditPart)part);
		
		featureModel = (DwFeatureModelWrapped)model;
	}else if(model instanceof DwRootFeatureWrapped){
		part = new DwRootFeatureEditorEditPart(editor, featureModel);
	}else if(model instanceof DwFeatureWrapped){
		part = new DwFeatureEditorEditPart(editor, featureModel);
	}else if(model instanceof DwGroupWrapped){
		part = new DwGroupEditorEditPart(editor, featureModel);
	}else if(model instanceof DwParentChildConnection){
		part = new DwParentChildConnectionEditorEditPart(editor, featureModel);
	}else if(model instanceof HyVersion){
		part = new DwVersionEditorEditPart(editor, featureModel);
	}else if(model instanceof HyFeatureAttribute){
		part = new DwAttributeEditorEditPart(editor, featureModel);
	}else if(model instanceof DwEnumContainerWrapped){
		part = new DwEnumContainerEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditorEditPart(editor, featureModel);			
	}else if(model instanceof HyEnumLiteral){
		part = new DwEnumLiteralEditorEditPart(editor, featureModel);
	}

	if(context != null && model != null && !(model instanceof DwParentChildConnection)){
		part.setParent(context);
	}
	
	if(part != null){
		part.setModel(model);
	}	

	
	return part;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:42,代碼來源:DwFeatureModelEditorEditPartFactory.java

示例2: createEditPart

import org.eclipse.gef.EditPart; //導入方法依賴的package包/類
@Override
public EditPart createEditPart(EditPart context, Object model) {
	EditPart part = null;
	
	
	if(model instanceof DwFeatureModelWrapped){
		part = new DwFeatureModelEditPart(editor);
		viewer.getControl().addControlListener((DwFeatureModelEditPart)part);
		viewer.addPropertyChangeListener((DwFeatureModelEditPart)part);
		
		featureModel = (DwFeatureModelWrapped)model;
	}else if(model instanceof DwRootFeatureWrapped){
		part = new DwRootFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwFeatureWrapped){
		part = new DwFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwGroupWrapped){
		part = new DwGroupEditPart(editor, featureModel);
	}else if(model instanceof DwParentChildConnection){
		part = new DwParentChildConnectionEditPart(editor, featureModel);
	}else if(model instanceof HyVersion){
		part = new DwVersionEditPart(editor, featureModel);
	}else if(model instanceof HyFeatureAttribute){
		part = new DwAttributeEditPart(editor, featureModel);
	}else if(model instanceof DwEnumContainerWrapped){
		part = new DwEnumContainerEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditPart(editor, featureModel);			
	}else if(model instanceof HyEnumLiteral){
		part = new DwEnumLiteralEditPart(editor, featureModel);
	}


	if(context != null && model != null && !(model instanceof DwParentChildConnection)){
		part.setParent(context);
	}
	if(part != null){
		part.setModel(model);
	}		
	
	return part;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:42,代碼來源:DwFeatureModelEditPartFactory.java

示例3: createEditPart

import org.eclipse.gef.EditPart; //導入方法依賴的package包/類
@Override
public EditPart createEditPart(EditPart context, Object model) {
	EditPart part = null;
	
	if(model instanceof DwFeatureModelWrapped){
		part = new DwConfiguratorFeatureModelEditPart(editor);
		viewer.getControl().addControlListener((DwConfiguratorFeatureModelEditPart)part);
		viewer.addPropertyChangeListener((DwConfiguratorFeatureModelEditPart)part);
		
		featureModel = (DwFeatureModelWrapped)model;
	}else if(model instanceof DwRootFeatureWrapped){
		part = new DwConfiguratorFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwFeatureWrapped){
		part = new DwConfiguratorFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwGroupWrapped){
		part = new DwGroupEditPart(editor, featureModel);
	}else if(model instanceof DwParentChildConnection){
		part = new DwParentChildConnectionEditPart(editor, featureModel);
	}else if(model instanceof HyVersion){
		part = new DwConfiguratorVersionEditPart(editor, featureModel);
	}else if(model instanceof HyFeatureAttribute){
		part = new DwConfiguratorAttributeEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditPart(editor, featureModel);
	}else if(model instanceof DwEnumContainerWrapped){
		part = new DwEnumContainerEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditPart(editor, featureModel);			
	}else if(model instanceof HyEnumLiteral){
		part = new DwEnumLiteralEditPart(editor, featureModel);
	}

	if(context != null && model != null && !(model instanceof DwParentChildConnection)){
		part.setParent(context);
	}
	if(part != null){
		part.setModel(model);
	}		
	
	return part;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:42,代碼來源:DwConfiguratorEditPartFactory.java

示例4: createEditPart

import org.eclipse.gef.EditPart; //導入方法依賴的package包/類
@Override
public EditPart createEditPart(EditPart context, Object model) {
	EditPart part = null;
	
	if(model instanceof DwFeatureModelWrapped){
		part = new DwConfiguratorEditorFeatureModelEditPart(editor);
		viewer.getControl().addControlListener((DwConfiguratorEditorFeatureModelEditPart)part);
		viewer.addPropertyChangeListener((DwConfiguratorEditorFeatureModelEditPart)part);
		
		featureModel = (DwFeatureModelWrapped)model;
	}else if(model instanceof DwRootFeatureWrapped){
		part = new DwConfiguratorEditorFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwFeatureWrapped){
		part = new DwConfiguratorEditorFeatureEditPart(editor, featureModel);
	}else if(model instanceof DwGroupWrapped){
		part = new DwGroupEditPart(editor, featureModel);
	}else if(model instanceof DwParentChildConnection){
		part = new DwParentChildConnectionEditPart(editor, featureModel);
	}else if(model instanceof HyVersion){
		part = new DwConfiguratorEditorVersionEditPart(editor, featureModel);
	}else if(model instanceof HyFeatureAttribute){
		part = new DwConfiguratorEditorAttributeEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditPart(editor, featureModel);
	}else if(model instanceof DwEnumContainerWrapped){
		part = new DwEnumContainerEditPart(editor, featureModel);
	}else if(model instanceof HyEnum){
		part = new DwEnumEditPart(editor, featureModel);			
	}else if(model instanceof HyEnumLiteral){
		part = new DwEnumLiteralEditPart(editor, featureModel);
	}

	if(context != null && model != null && !(model instanceof DwParentChildConnection)){
		part.setParent(context);
	}
	if(part != null){
		part.setModel(model);
	}		
	
	return part;
}
 
開發者ID:DarwinSPL,項目名稱:DarwinSPL,代碼行數:42,代碼來源:DwConfiguratorEditorEditPartFactory.java


注:本文中的org.eclipse.gef.EditPart.setParent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。