Class 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.
    • Method Detail

      • getLocation

        public DPoint3 getLocation()
        Returns the clone of the location of the NoStructure.
        Returns:
      • 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.
        Returns:
      • setSelected

        public void setSelected​(boolean isSelected)
        Sets whether this NoStructure is selected.
        Parameters:
        isSelected -
      • 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
        target -
        Returns:
        the created noStrucure
        Throws:
        IllegalArgumentException - if the component is not empty.
      • 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.
        Parameters:
        location -
        target -
        Returns:
      • storeInDocument

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

        public static List<NoStructure> getAllFromDocument​(MDocument doc)
        Returns all NoStructure labels from the document.
        Parameters:
        doc -
        Returns:
      • 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.
        Parameters:
        structure -
        target -
      • 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.
        Parameters:
        target -
      • addToSelection

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

        public static void removeSelectedFrom​(MDocument target)
        Removes the selected NoStructres from the document. If the target contains a reaction the corresponding reaction components
        Parameters:
        target -
      • 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
        Parameters:
        target -
      • unSelectInDocument

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