Class MSelectionDocument

java.lang.Object
chemaxon.struc.MDocument
chemaxon.struc.MSelectionDocument
All Implemented Interfaces:
chemaxon.core.structure.DocumentForBuilder, MTransformable, Serializable

@PublicApi public class MSelectionDocument extends MDocument
Selection document. This class is under development and internal use only.
Since:
Marvin 3.3, 01/05/2004
See Also:
  • Constructor Details

    • MSelectionDocument

      public MSelectionDocument(SelectionMolecule m)
      Creates a document for the specified molecule graph.
      Parameters:
      m - the main molecule graph
    • MSelectionDocument

      public MSelectionDocument(MSelectionDocument doc)
      Copy constructor.
      Parameters:
      doc - the source
  • Method Details

    • cloneDocument

      public MDocument cloneDocument()
      Creates a clone.
      Overrides:
      cloneDocument in class MDocument
      Returns:
      the clone
      Since:
      3.5.1, 11/20/2004
    • addObject

      public void addObject(MObject o)
      Adds an object to the document.
      Overrides:
      addObject in class MDocument
      Parameters:
      o - the object
    • removeObject

      public void removeObject(MObject o)
      Removes an object from the document.
      Overrides:
      removeObject in class MDocument
      Parameters:
      o - the object
    • removeObject

      public void removeObject(int i)
      Removes an object from the document.
      Overrides:
      removeObject in class MDocument
      Parameters:
      i - the object index
    • setObject

      public void setObject(MObject o, int i)
      Sets an object
      Overrides:
      setObject in class MDocument
      Parameters:
      o - the object
      i - the index
    • clear

      public void clear()
      Clears the document. Removes all objects except the main molecule graph, from which all atoms, bonds and other objects are removed.
      Overrides:
      clear in class MDocument
    • findSelectedSgroup

      public Sgroup findSelectedSgroup()
      Gets the smallest sgroup that belongs to the selection.
      Returns:
      the found sgroup.