Class CopyElement

java.lang.Object
org.pathvisio.libgpml.model.CopyElement

public class CopyElement
extends java.lang.Object
This class stores information for copied PathwayElement. Storing both the new pathway element and its original source pathway element helps maintain pathway element data, such as reference information, when copying (to clipboard) and pasting or transferring pathway data. PathwayElement.copy() returns a CopyElement which stores the newly created newElement and a reference to the original sourceElement.
Author:
finterly
  • Field Details

  • Constructor Details

    • CopyElement

      public CopyElement​(PathwayElement newElement, PathwayElement sourceElement)
      Instantiates a CopyElement which holds references to a new pathway element and the original source element it was copied from.
      Parameters:
      newElement - the new pathway element copied from a source element.
      sourceElement - the original pathway element copied.
  • Method Details

    • getNewElement

      public PathwayElement getNewElement()
      Returns the new pathway element.
      Returns:
      newElement the new pathway element copied from source element.
    • setNewElement

      public void setNewElement​(PathwayElement newElement)
      Sets the new pathway element.
      Parameters:
      newElement - the new pathway element copied from source element.
    • getSourceElement

      public PathwayElement getSourceElement()
      Returns source pathway element.
      Returns:
      sourceElement the original pathway element copied.
    • setSourceElement

      public void setSourceElement​(PathwayElement sourceElement)
      Sets source pathway element.
      Parameters:
      sourceElement - the the original pathway element copied.