chemaxon.struc
Class MSelectionDocument

java.lang.Object
  extended bychemaxon.struc.MDocument
      extended bychemaxon.struc.MSelectionDocument
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class MSelectionDocument
extends MDocument

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

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

Field Summary
 
Fields inherited from class chemaxon.struc.MDocument
mainMChemicalStruct, objectContainingSelection, objects
 
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.
 java.lang.Object clone()
          Creates a clone.
 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
calcCenter, contains, getDraggedObject, getEndPosition, getFocus, getInputFormat, getMainMoleculeGraph, getObject, getObjectContainingSelection, getObjectCount, getStartPosition, highlight, indexOf, isEmpty, isHighlighted, moveMainMoleculeGraphToFront, moveObject, removeNodeFromGraphs, selectAllObjects, setDraggedObject, setEndPosition, setFocus, setInputFormat, setMainMoleculeGraph, setObjectContainingSelection, setStartPosition, transform, unhighlight, unhighlightAll
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

clone

public java.lang.Object clone()
Creates a clone.

Overrides:
clone in class MDocument
Returns:
the clone

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