📄 partfactory.java
字号:
package hellogef.control;
import hellogef.model.ConnectionModel;
import hellogef.model.Diagram;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartFactory;
public class PartFactory implements EditPartFactory {
public EditPart createEditPart(EditPart context, Object model) {
EditPart part = null;
if (model instanceof Diagram)
part = new DiagramPart();
else if (model instanceof ConnectionModel)
part = new ConnectionPart();
else
part = new NodePart();
part.setModel(model);
return part;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -