本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}