6.5 connectionElementModel

除了elementModel外,还有两个父类。

1.与label的显示有关的类吧。


public interface IShowHideLabel {
public void setLabelShow(Object sel, boolean show);
public boolean isLabelShow(Object sel);
public boolean hasShowHideLabel(Object sel);
}

2.与连接有关的类


public interface IConnectMessage {
public boolean canConnect(PortInstanceModel port);
public void connectToPort(PortInstanceModel port); 不需要定义connectFromPort么?
public PortInstanceModel getPort();
public boolean isResizableMessage(); 做什么的?
}

3.connectionElementModel


public abstract class ConnectionElementModel extends ElementModel
implements IShowHideLabel,IConnectMessage{


public ConnectionElementModel(String label, String modelID, Dimension size) {
super(label, modelID,size);
// TODO Auto-generated constructor stub
directionShow = false;
valueShow = false;
senderShow = false;
paramShow = false;
typeOrProcShow = false;
templateShow =false;
}

6.5 connectionElementModel

时间: 2024-10-26 15:43:02

6.5 connectionElementModel的相关文章

5.28 xml

最上层的父类:public interface IXmlModel { public void initModel(); 初始化 public void doSaveXML(); 保存为xml文件 public void rebuildFromXml(Element e,List<Object> err); 反过程 }AbstractModel继承IXmlModel.ElementModel继承AbstractModel. ElementModel的部分程序:其中重写了initmodel()方

7.9 XmlHeadFactory,用来产生与模型对应的xmlhead

package custom.gef.editor.model; import custom.gef.editor.model.connection.MessageFromModel; import custom.gef.editor.model.connection.MessageToModel; import custom.gef.editor.model.port.PortGuideModel; import custom.gef.editor.model.port.PortOperati