本文整理匯總了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;
}