com.daylight
Class Depiction

java.lang.Object
  extended by com.daylight.DaylightCppObject
      extended by com.daylight.DaylightObject
          extended by com.daylight.Depiction

public class Depiction
extends DaylightObject

Object representing 2-D coordinates, atom visibilities and bond styles of a molecule or reaction. A depiction is an object representing the 2-D (x,y) coordinates of a molecule's atoms. The coordinates can be computed automatically (see dt_calcxy(3)), or can be set individually from user data (see dt_setxy(3)). As of v4.71, a depiction object obeys the boolean property "suppress" for suppressing the rendering of labels for long-chain carbon structures. Setting the depiction property (eg. dt_setboolean(dep, 8, "suppress", TRUE)) will cause the depiction to be rendered without these labels. The default in the toolkit is FALSE, which is identical to 4.62 behavior. As of v4.81, a depiction object obeys the boolean property "xsmiles". This property, when set, causes the depiction to be rendered as its XSMILES representation without aromaticity. All aromatic rings are then drawn in Kekule form. The default in the toolkit if FALSE. In v4.82 and v4.83, a depiction object obeys the boolean property "use_2d". This property, when set, can be used to control the layout of a depiction. As of v4.9, this option is obsolete. See the manual page on dt_calcxy(3) for details. As of v4.83, a depiction object obeys the boolean property "old_style". This property, when set, causes the depiction to be rendered using bond styles (wedges and hashes) on acyclic bonds to a chiral center and may result in overspecification about a stereocenter. Without this property set, the depiction is rendered in a more conventional fashion and is generally more aesthetically pleasing to the viewer. The default in the toolkit is FALSE. As of v4.83, a depiction object obeys the boolean property "hide_chi_h". This property, when set, causes the depiction to be rendered without implicit chiral hydrogens, if they are not needed to illustrate a stereocenter. The default in the toolkit is FALSE. As of v4.83, a depiction object obeys the real property "hlen_pct". This property, when set, causes the depiction to be rendered using a scalar value for shortening the length of bonds to hydrogen. The allowed range is 0.67 (67%) to 1.00 (100%). The default in the toolkit is 1.00.


Field Summary
 
Fields inherited from class com.daylight.DaylightCppObject
ref
 
Constructor Summary
Depiction(ConnectedAtomCollection molOrReaction)
          from dt_alloc_depiction.
 
Method Summary
 void calculateCoordinates()
          from dt_calcxy.
 Depiction copy()
          from dt_copy.
 void depict(Depictor depictor)
          from dt_depict - draw a two-dimensional rendition of a molecule or reaction.
protected  void finalize()
          Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
 BondStyle getBondStyle(Atom atom, Bond bond)
          from dt_bondstyle.
 java.awt.geom.Point2D.Float getCoordinate(Atom atom)
          from dt_getcoord.
 int getFrameGraphicsAttribute()
          from dt_framega.
 int getGraphicsAttribute(Atom atom)
          from dt_ga.
 int getGraphicsAttribute(Bond bond)
          from dt_ga.
 int getGraphicsAttribute(Cycle cycle)
          from dt_ga.
 DepictionLabel getLabel1(Atom atom)
          from dt_label1.
 DepictionLabel getLabel1(Bond bond)
          from dt_label1.
 DepictionLabel getLabel1(Cycle cycle)
          from dt_label1.
 DepictionLabel getLabel1(Molecule molecule)
          from dt_label1.
 DepictionLabel getLabel2(Atom atom)
          from dt_label2.
 DepictionLabel getLabel2(Bond bond)
          from dt_label2.
 DepictionLabel getLabel2(Cycle cycle)
          from dt_label2.
 DepictionLabel getLabel2(Molecule molecule)
          from dt_label2.
 DepictionOrientation getOrientation()
          from dt_orient.
 boolean isCompressed()
          from dt_compressed.
 boolean isDrawingIsomerics()
          from dt_isomeric.
 boolean isFramed()
          from dt_frame.
 boolean isSchematic()
          from dt_schematic.
 boolean isVisible(Atom atom)
          from dt_visible.
 void rotate(float angleInRadians)
          from dt_rotate.
 void scale(float scaleX, float scaleY)
          from dt_scale.
 void setBondStyle(Atom atom, Bond bond, BondStyle style)
          from dt_setbondstyle.
 void setCompressed(boolean value)
          from dt_setcompressed.
 void setCoordinate(Atom atom, float x, float y)
          from dt_setcoord.
 void setDefaultBondStyles()
          from dt_setbondstyles.
 void setDrawingIsomerics(boolean value)
          from dt_setisomeric.
 void setFramed(boolean value)
          from dt_setframe.
 void setFrameGraphicsAttribute(int ga)
          from dt_setframega.
 void setGraphicsAttribute(Atom atom, int ga)
          from dt_setga.
 void setGraphicsAttribute(Bond bond, int ga)
          from dt_setga.
 void setGraphicsAttribute(Cycle cycle, int ga)
          from dt_setga.
 void setLabel1(Atom atom, DepictionLabel label)
          from dt_setlabel1.
 void setLabel1(Bond bond, DepictionLabel label)
          from dt_setlabel1.
 void setLabel1(Cycle cycle, DepictionLabel label)
          from dt_setlabel1.
 void setLabel1(Molecule molecule, DepictionLabel label)
          from dt_setlabel1.
 void setLabel2(Atom atom, DepictionLabel label)
          from dt_setlabel2.
 void setLabel2(Bond bond, DepictionLabel label)
          from dt_setlabel2.
 void setLabel2(Cycle cycle, DepictionLabel label)
          from dt_setlabel2.
 void setLabel2(Molecule molecule, DepictionLabel label)
          from dt_setlabel2.
 void setOrientation(DepictionOrientation orientation)
          from dt_setorient.
 void setSchematic(boolean value)
          from dt_setschematic.
 void setVisible(Atom atom, boolean visible)
          from dt_setvisible.
 void translate(float addX, float addY)
          from dt_translate.
 void zeroCoordinates()
          from dt_zerocoord.
 
Methods inherited from class com.daylight.DaylightObject
appendStringProperty, checkProgramLicense, checkToolkitLicense, clearErrors, disableVirtualHandles, equals, getAdjunct, getAncestor, getBase, getBooleanProperty, getChiralClass, getChiralOrder, getCount, getErrors, getExistingObjectCount, getHandleProperty, getIntegerProperty, getParent, getPropertyNames, getPropertyType, getRealProperty, getRuntimeLibraryCreationDate, getRuntimeLibraryVersion, getStream, getStringProperty, getType, getTypename, getUniqueId, getUniqueIdRange, getWorstErrorType, hashCode, isNullObject, mpInitialize, mpLock, mpTrylock, mpUnlock, saveError, setAdjunct, setBooleanProperty, setHandleProperty, setIntegerProperty, setRealProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Depiction

public Depiction(ConnectedAtomCollection molOrReaction)
          throws DaylightException
from dt_alloc_depiction.

Throws:
DaylightException
Method Detail

copy

public Depiction copy()
               throws DaylightException
from dt_copy.

Throws:
DaylightException

getBondStyle

public BondStyle getBondStyle(Atom atom,
                              Bond bond)
                       throws DaylightException
from dt_bondstyle.

Throws:
DaylightException

setBondStyle

public void setBondStyle(Atom atom,
                         Bond bond,
                         BondStyle style)
                  throws DaylightException
from dt_setbondstyle.

Parameters:
atom -
bond -
style - values are 'EdgeReset', 'EdgeSimple', 'EdgeTee', 'EdgeTeeIn', 'EdgeTeeOut', 'EdgeTri', 'EdgeTriIn', 'EdgeTriOut', 'EdgeHash', 'EdgeDative', 'EdgeTri_TriIn', 'EdgeTri_TriOut', 'EdgeTee_TeeIn', or 'EdgeTee_TeeOut'
Throws:
DaylightException

setDefaultBondStyles

public void setDefaultBondStyles()
                          throws DaylightException
from dt_setbondstyles.

Throws:
DaylightException

getCoordinate

public java.awt.geom.Point2D.Float getCoordinate(Atom atom)
                                          throws DaylightException
from dt_getcoord.

Throws:
DaylightException

setCoordinate

public void setCoordinate(Atom atom,
                          float x,
                          float y)
                   throws DaylightException
from dt_setcoord.

Throws:
DaylightException

zeroCoordinates

public void zeroCoordinates()
                     throws DaylightException
from dt_zerocoord.

Throws:
DaylightException

calculateCoordinates

public void calculateCoordinates()
                          throws DaylightException
from dt_calcxy.

Throws:
DaylightException

isCompressed

public boolean isCompressed()
                     throws DaylightException
from dt_compressed.

Throws:
DaylightException

setCompressed

public void setCompressed(boolean value)
                   throws DaylightException
from dt_setcompressed.

Throws:
DaylightException

getOrientation

public DepictionOrientation getOrientation()
                                    throws DaylightException
from dt_orient.

Returns:
DepictionOrientation values are 'None', 'Auto' and 'Wild'
Throws:
DaylightException

setOrientation

public void setOrientation(DepictionOrientation orientation)
                    throws DaylightException
from dt_setorient.

Parameters:
orientation - values are 'None', 'Auto' and 'Wild'
Throws:
DaylightException

isFramed

public boolean isFramed()
                 throws DaylightException
from dt_frame.

Throws:
DaylightException

setFramed

public void setFramed(boolean value)
               throws DaylightException
from dt_setframe.

Throws:
DaylightException

isDrawingIsomerics

public boolean isDrawingIsomerics()
                           throws DaylightException
from dt_isomeric.

Throws:
DaylightException

setDrawingIsomerics

public void setDrawingIsomerics(boolean value)
                         throws DaylightException
from dt_setisomeric.

Throws:
DaylightException

isSchematic

public boolean isSchematic()
                    throws DaylightException
from dt_schematic.

Throws:
DaylightException

setSchematic

public void setSchematic(boolean value)
                  throws DaylightException
from dt_setschematic.

Throws:
DaylightException

isVisible

public boolean isVisible(Atom atom)
                  throws DaylightException
from dt_visible.

Throws:
DaylightException

setVisible

public void setVisible(Atom atom,
                       boolean visible)
                throws DaylightException
from dt_setvisible.

Throws:
DaylightException

depict

public void depict(Depictor depictor)
            throws DaylightException
from dt_depict - draw a two-dimensional rendition of a molecule or reaction. Draws a two-dimensional rendition of the underlying molecule or reaction using calls to the Drawing Library. The drawing uses the current coordinates and attributes of the given depiction and its base molecule or reaction.

Throws:
DaylightException

rotate

public void rotate(float angleInRadians)
            throws DaylightException
from dt_rotate.

Throws:
DaylightException

scale

public void scale(float scaleX,
                  float scaleY)
           throws DaylightException
from dt_scale.

Throws:
DaylightException

translate

public void translate(float addX,
                      float addY)
               throws DaylightException
from dt_translate.

Throws:
DaylightException

getFrameGraphicsAttribute

public int getFrameGraphicsAttribute()
                              throws DaylightException
from dt_framega.

Throws:
DaylightException

setFrameGraphicsAttribute

public void setFrameGraphicsAttribute(int ga)
                               throws DaylightException
from dt_setframega.

Throws:
DaylightException

getGraphicsAttribute

public int getGraphicsAttribute(Atom atom)
                         throws DaylightException
from dt_ga.

Throws:
DaylightException

getGraphicsAttribute

public int getGraphicsAttribute(Bond bond)
                         throws DaylightException
from dt_ga.

Throws:
DaylightException

getGraphicsAttribute

public int getGraphicsAttribute(Cycle cycle)
                         throws DaylightException
from dt_ga.

Throws:
DaylightException

setGraphicsAttribute

public void setGraphicsAttribute(Atom atom,
                                 int ga)
                          throws DaylightException
from dt_setga.

Throws:
DaylightException

setGraphicsAttribute

public void setGraphicsAttribute(Bond bond,
                                 int ga)
                          throws DaylightException
from dt_setga.

Throws:
DaylightException

setGraphicsAttribute

public void setGraphicsAttribute(Cycle cycle,
                                 int ga)
                          throws DaylightException
from dt_setga.

Throws:
DaylightException

getLabel1

public DepictionLabel getLabel1(Atom atom)
                         throws DaylightException
from dt_label1.

Throws:
DaylightException

getLabel1

public DepictionLabel getLabel1(Bond bond)
                         throws DaylightException
from dt_label1.

Throws:
DaylightException

getLabel1

public DepictionLabel getLabel1(Cycle cycle)
                         throws DaylightException
from dt_label1.

Throws:
DaylightException

getLabel1

public DepictionLabel getLabel1(Molecule molecule)
                         throws DaylightException
from dt_label1.

Throws:
DaylightException

setLabel1

public void setLabel1(Atom atom,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel1.

Throws:
DaylightException

setLabel1

public void setLabel1(Bond bond,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel1.

Throws:
DaylightException

setLabel1

public void setLabel1(Cycle cycle,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel1.

Throws:
DaylightException

setLabel1

public void setLabel1(Molecule molecule,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel1.

Throws:
DaylightException

getLabel2

public DepictionLabel getLabel2(Atom atom)
                         throws DaylightException
from dt_label2.

Throws:
DaylightException

getLabel2

public DepictionLabel getLabel2(Bond bond)
                         throws DaylightException
from dt_label2.

Throws:
DaylightException

getLabel2

public DepictionLabel getLabel2(Cycle cycle)
                         throws DaylightException
from dt_label2.

Throws:
DaylightException

getLabel2

public DepictionLabel getLabel2(Molecule molecule)
                         throws DaylightException
from dt_label2.

Throws:
DaylightException

setLabel2

public void setLabel2(Atom atom,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel2.

Throws:
DaylightException

setLabel2

public void setLabel2(Bond bond,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel2.

Throws:
DaylightException

setLabel2

public void setLabel2(Cycle cycle,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel2.

Throws:
DaylightException

setLabel2

public void setLabel2(Molecule molecule,
                      DepictionLabel label)
               throws DaylightException
from dt_setlabel2.

Throws:
DaylightException

finalize

protected void finalize()
                 throws java.lang.Throwable
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

Overrides:
finalize in class DaylightObject
Throws:
java.lang.Throwable