chemaxon.struc
Class MSelectionDocument

java.lang.Object
  extended by chemaxon.struc.MDocument
      extended by chemaxon.struc.MSelectionDocument
All Implemented Interfaces:
MTransformable, java.io.Serializable

public class MSelectionDocument
extends MDocument

Selection document. This class is under development and internal use only.

Since:
Marvin 3.3, 01/05/2004
Version:
4.1.1, 01/09/2007
Author:
Peter Csizmadia
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class chemaxon.struc.MDocument
MDocument.CheckerMark, MDocument.Prop
 
Field Summary
 
Fields inherited from class chemaxon.struc.MDocument
mainMChemicalStruct, mainMMoleculeMovie, objectContainingSelection, objects, SETCOLOR_COLORLESS, SETCOLOR_DEFAULT, SETCOLOR_SPECIFIED
 
Constructor Summary
MSelectionDocument(MSelectionDocument doc)
          Copy constructor.
MSelectionDocument(SelectionMolecule m)
          Creates a document for the specified molecule graph.
 
Method Summary
 void addObject(MObject o)
          Adds an object to the document.
 void clear()
          Clears the document.
 MDocument cloneDocument()
          Creates a clone.
 Sgroup findSelectedSgroup()
          Gets the smallest sgroup that belongs to the selection.
 void removeObject(int i)
          Removes an object from the document.
 void removeObject(MObject o)
          Removes an object from the document.
 void setObject(MObject o, int i)
          Sets an object
 
Methods inherited from class chemaxon.struc.MDocument
addCheckerMark, calcCenter, calcCenter, clearCheckerMarks, clearSets, clone, cloneMainMolecule, cloneMainMoleculeGraph, cloneSets, contains, contains, containsOnlyOne, exportToBinFormat, exportToFormat, exportToObject, getAllMolecules, getAllNonEmptyMolecules, getAllObjects, getAtomSetColor, getAtomSetColorMode, getAtomSetFont, getAtomSetRGB, getAtomSetSize, getBondSetColor, getBondSetColorMode, getBondSetRGB, getBondSetSize, getBondSetThickness, getCheckerMarks, getConnectedObject, getConnectedObjectCount, getDraggedObject, getEndPosition, getExtraLabelSetColorMode, getExtraLabelSetFont, getExtraLabelSetRGBs, getExtraLabelSetSize, getFocus, getGUIPropertyContainer, getInputFormat, getMainMoleculeGraph, getMoleculeMovie, getMProp, getObject, getObjectContainingSelection, getObjectCount, getPageSettings, getPrimaryMolecule, getPrimaryMolecules, getStartPosition, highlight, indexOf, isAtomSetColorModeSet, isEmpty, isExtraObject, isHighlighted, isSimpleMolecule, moveMainMoleculeGraphToFront, moveMoleculeMovieToFront, moveObject, parseMRV, properties, removeAtom, removeAtom, removeAtomFromGraphs, selectAllConnectedObjects, selectAllObjects, setAtomSetColorMode, setAtomSetFont, setAtomSetRGB, setBondSetColorMode, setBondSetRGB, setBondSetThickness, setDraggedObject, setEndPosition, setExtraLabelColorsForDocument, setExtraLabelSetColorMode, setExtraLabelSetRGBs, setExtraLabelSetRGBs, setFocus, setGUIPropertyContainer, setGUIProperyContainer, setInputFormat, setMainMoleculeGraph, setMoleculeMovie, setObjectContainingSelection, setPageSettings, setStartPosition, simplifyMolecule, toString, transform, transform, transform, unhighlight, unhighlightAll
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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.