Class NoStructure

java.lang.Object
chemaxon.struc.NoStructure

@PublicApi public class NoStructure extends Object
This class represents NoStructure labels. It is possible to create and remove them from the document using static methods in this class.
  • Field Details

  • Method Details

    • getLocation

      public DPoint3 getLocation()
      Returns the clone of the location of the NoStructure.
    • transform

      public void transform(CTransform3D t)
      Transforms the location of the object
      Parameters:
      t - the transformation to transform with.
    • getLabel

      public String getLabel()
      The label for the noStructure.
    • setSelected

      public void setSelected(boolean isSelected)
      Sets whether this NoStructure is selected.
    • isSelected

      public boolean isSelected()
      Returns:
      true if the NoStructure is selected.
    • createInDocumentFrom

      public static NoStructure createInDocumentFrom(Molecule component, MDocument target)
      Creates a NoStructure from the given component. The component should be empty. Used during reaction import to convert empty reactants or products into NoStructure labels.
      Parameters:
      component - the component the label will be created from
      Returns:
      the created noStrucure
      Throws:
      IllegalArgumentException - if the component is not empty.
    • isAssociatedWith

      public boolean isAssociatedWith(Molecule molecule)
      Verifies the reference equality of molecule and the component associated with this instance.
      Parameters:
      molecule - reference to test
      Returns:
      true if the references are equal
    • isNonAssociated

      public boolean isNonAssociated()
    • createInDocumentAt

      public static NoStructure createInDocumentAt(DPoint3 location, MDocument target)
      Creates a NoStructure at the given location. If the tartet contains a reaction a new reactant or product will be created for the label.
    • storeInDocument

      public static void storeInDocument(NoStructure structure, MDocument target)
      Puts the given NoStructe into the document.
    • getAllFromDocument

      public static List<NoStructure> getAllFromDocument(MDocument doc)
      Returns all NoStructure labels from the document.
    • removeFromDocument

      public static void removeFromDocument(NoStructure structure, MDocument target)
      Removes the given NoStructre from the target document. If the target contains a reaction, the corresponding empty reaction component will be removed as well.
    • removeAllFromDocument

      public static void removeAllFromDocument(MDocument target)
      Removes all NoStructure labels from the target document. If the target contains a reaction the corresponding reaction components will be removed as well.
    • addToSelection

      public static void addToSelection(MDocument from, MSelectionDocument to)
      Adds the selected NoStrutures from the document to the selectionDocument
    • removeSelectedFrom

      public static void removeSelectedFrom(MDocument target)
      Removes the selected NoStructres from the document. If the target contains a reaction the corresponding reaction components
    • removeUnSelectedFrom

      public static void removeUnSelectedFrom(MDocument target)
      Removes the non-selected NoStructures from the document. If the target contains a reaction the corresponding reaction components
    • unSelectInDocument

      public static void unSelectInDocument(MDocument target)
      Removes the selection from all NoStructure labels in the document.