Logo Search packages:      
Sourcecode: cdk version File versions  Download package

org::openscience::cdk::renderer::Renderer2D Class Reference

Inheritance diagram for org::openscience::cdk::renderer::Renderer2D:

org::openscience::cdk::renderer::SimpleRenderer2D org::openscience::cdk::renderer::IRenderer2D org::openscience::cdk::renderer::AbstractRenderer2D org::openscience::cdk::renderer::ISimpleRenderer2D org::openscience::cdk::renderer::ISimpleRenderer2D org::openscience::cdk::renderer::AlphaRenderer2D

List of all members.


Detailed Description

A Renderer class which draws 2D representations of molecules onto a given graphics objects using information from a Renderer2DModel.

This renderer uses two coordinate systems. One that is a world coordinates system which is generated from the document coordinates. Additionally, the screen coordinates make up the second system, and are calculated by applying a zoom factor to the world coordinates.

The coordinate system used for display has its origin in the left-bottom corner, with the x axis to the right, and the y axis towards the top of the screen. The system is thus right handed.

The two main methods are paintMolecule() and paintChemModel(). Others might not show full rendering, e.g. anti-aliasing.

This modules tries to adhere to guidelines being developed by the IUPAC which results can be found at http://www.angelfire.com/sc3/iupacstructures/ .

Author:
steinbeck

egonw .module render .created 2002-10-03 .keyword viewer, 2D-viewer

See also:
org.openscience.cdk.renderer.Renderer2DModel

Definition at line 63 of file Renderer2D.java.


Public Member Functions

abstract Renderer2DModel getRenderer2DModel ()
Renderer2DModel getRenderer2DModel ()
int[] getScreenCoordinates (int[] coords)
void mouseDragged (MouseEvent mouseEvent)
void mouseMoved (MouseEvent mouseEvent)
void paintAnyBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintAromaticRingBondCDKStyle (org.openscience.cdk.interfaces.IBond bond, IRing ring, Color bondColor, Graphics2D graphics)
void paintAtom (IAtomContainer container, IAtom atom, Graphics2D graphics)
void paintAtoms (IAtomContainer atomCon, Graphics2D graphics)
void paintAtomSymbol (IAtom atom, Color backColor, Graphics2D graphics, int alignment, int atomNumber, boolean isRadical)
void paintBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintBonds (IAtomContainer atomCon, IRingSet ringSet, Graphics2D graphics)
void paintBoundingBox (double[] minmax, String caption, int side, Graphics2D graphics)
void paintChemModel (IChemModel model, Graphics2D graphics)
void paintColouredAtomBackground (org.openscience.cdk.interfaces.IAtom atom, Color color, Graphics2D graphics)
void paintDashedWedgeBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintDoubleBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintEmptySpace (int x, int y, int width, int height, int border, Color backColor, Graphics2D graphics)
void paintInnerBond (org.openscience.cdk.interfaces.IBond bond, IRing ring, Color bondColor, Graphics2D graphics)
void paintLassoLines (Graphics2D graphics)
void paintMolecule (IAtomContainer atomCon, Graphics2D graphics, boolean split, boolean redossr)
void paintMolecule (IAtomContainer atomCon, Graphics2D graphics)
void paintMolecule (IAtomContainer atomCon, Graphics2D graphics, Rectangle2D bounds)
void paintMoleculeSet (IMoleculeSet moleculeSet, Graphics2D graphics, boolean split)
void paintMoleculeSet (IMoleculeSet moleculeSet, Graphics2D graphics)
void paintNumberOnly (IAtom atom, Color backColor, Graphics2D graphics, int atomNumber)
void paintOneBond (int[] coords, Color bondColor, Graphics2D graphics)
void paintPointerVector (Graphics2D graphics)
void paintPseudoAtomLabel (IPseudoAtom atom, Color backColor, Graphics2D graphics, int alignment, boolean isRadical)
void paintReaction (IReaction reaction, Graphics2D graphics)
abstract void paintReactionSet (IReactionSet reactionSet, Graphics2D graphics)
void paintReactionSet (org.openscience.cdk.interfaces.IReactionSet reactionSet, Graphics2D graphics)
void paintRingBond (org.openscience.cdk.interfaces.IBond bond, IRing ring, Color bondColor, Graphics2D graphics)
void paintRingRing (IRing ring, Color bondColor, Graphics2D graphics)
void paintSingleBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintToolTip (org.openscience.cdk.interfaces.IAtom atom, Graphics2D graphics, int atomNumber)
void paintTripleBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void paintWedgeBond (org.openscience.cdk.interfaces.IBond bond, Color bondColor, Graphics2D graphics)
void redoSSSR (List moleculesList)
 Renderer2D (Renderer2DModel r2dm)
 Renderer2D ()
boolean ringIsAromatic (IRing ring)
abstract void setRenderer2DModel (Renderer2DModel model)
void setRenderer2DModel (Renderer2DModel r2dm)
void updateRenderingCoordinates (IAtomContainer atomCon, Renderer2DModel r2dm)

Public Attributes

boolean useScreenSize = true

Protected Member Functions

void customizeRendering (Graphics2D graphics)
Point getScreenCoordinates (Point point)
float getScreenSize (int size)
void setupIsotopeFactory (IChemObject object)
int[] shortenBond (int[] coords, int edges)

Protected Attributes

LoggingTool logger
Renderer2DModel r2dm

Package Attributes

boolean debug = true
int graphicsHeight
IsotopeFactory isotopeFactory
int oldatomcount = 0
int oldbondcount = 0
IRingSet ringSet
int[] tooltiparea = null

Static Package Attributes

static final BasicStroke stroke = new BasicStroke(1.0f)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index