/// <summary> /// Remove a SimElementDefinition. /// </summary> /// <param name="definition">The definition to remove.</param> public void removeElement(SimElementDefinition definition) { definition.setSimObjectDefinition(null); definitions.Remove(definition); if (editInterface != null) { editInterface.removeSubInterface(definition); } }
/// <summary> /// Add a SimElementDefinition. A element should only be added to /// one defintion. /// </summary> /// <param name="definition">The definition to add.</param> public void addElement(SimElementDefinition definition) { definition.setSimObjectDefinition(this); definitions.AddLast(definition); if (editInterface != null) { createElementInterface(definition); } }
public void pasteElement(SimElementDefinition definition) { addElement(definition); }
/// <summary> /// Helper function to create the EditInterface for a given SimElementDefinition. /// </summary> /// <param name="definition"></param> private void createElementInterface(SimElementDefinition definition) { editInterface.addSubInterface(definition, definition.getEditInterface()); }