ambit2.core.io
Class CompoundImageTools

Package class diagram package CompoundImageTools
java.lang.Object
  extended by ambit2.core.io.CompoundImageTools

public class CompoundImageTools
extends java.lang.Object

Generates BufferedImage from smiles or compound.


Field Summary
protected  java.awt.Color background
           
protected  java.awt.Color borderColor
           
protected  int borderWidth
           
protected  java.awt.image.BufferedImage defaultImage
           
protected  java.awt.Dimension imageSize
           
protected  org.openscience.cdk.smiles.SmilesParser parser
           
 
Constructor Summary
CompoundImageTools()
           
CompoundImageTools(java.awt.Dimension cellSize)
           
 
Method Summary
static void generate2D(org.openscience.cdk.interfaces.IAtomContainer molecule, boolean generateCoordinates, org.openscience.cdk.interfaces.IMoleculeSet molecules)
           
 java.awt.image.BufferedImage generateImage(java.lang.String smiles)
           
 java.awt.Color getBackground()
           
 java.awt.Color getBorderColor()
           
 int getBorderWidth()
           
 java.awt.Image getDefaultImage()
           
 java.awt.image.BufferedImage getImage(java.util.ArrayList<?> list)
           
 java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule)
           
 java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule, org.openscience.cdk.interfaces.IAtomContainer highlighted)
           
 java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule, org.openscience.cdk.interfaces.IAtomContainer highlighted, boolean build2d)
           
 java.awt.image.BufferedImage getImage(java.lang.Object o)
           
 java.awt.image.BufferedImage getImage(java.lang.String smiles)
           
 java.awt.Dimension getImageSize()
           
 void paint(org.openscience.cdk.renderer.Renderer2D renderer, org.openscience.cdk.interfaces.IMoleculeSet molecules, boolean explicitH, java.awt.Graphics2D g, org.openscience.cdk.interfaces.IAtomContainer highlighted)
           
static void paint(org.openscience.cdk.renderer.Renderer2D renderer, org.openscience.cdk.interfaces.IMoleculeSet molecules, boolean explicitH, java.awt.Graphics2D g, org.openscience.cdk.interfaces.IAtomContainer highlighted, java.awt.Dimension imageSize)
          TODO sort molecules, in order to display the largest part first
protected static void printCoordinates(org.openscience.cdk.renderer.Renderer2DModel model)
           
 void setBackground(java.awt.Color background)
           
 void setBorderColor(java.awt.Color borderColor)
          Creates gradient border of this color.
 void setBorderWidth(int borderWidth)
           
 void setDefaultImage(java.awt.image.BufferedImage defaultImage)
           
 void setImageSize(java.awt.Dimension imageSize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSize

protected java.awt.Dimension imageSize

background

protected java.awt.Color background

defaultImage

protected java.awt.image.BufferedImage defaultImage

borderColor

protected java.awt.Color borderColor

borderWidth

protected int borderWidth

parser

protected org.openscience.cdk.smiles.SmilesParser parser
Constructor Detail

CompoundImageTools

public CompoundImageTools()

CompoundImageTools

public CompoundImageTools(java.awt.Dimension cellSize)
Method Detail

getBorderWidth

public int getBorderWidth()

setBorderWidth

public void setBorderWidth(int borderWidth)

getBorderColor

public java.awt.Color getBorderColor()

setBorderColor

public void setBorderColor(java.awt.Color borderColor)
Creates gradient border of this color. Set the same as background color if you don't want shadowing effect.

Parameters:
borderColor -

getImage

public java.awt.image.BufferedImage getImage(java.lang.Object o)

generateImage

public java.awt.image.BufferedImage generateImage(java.lang.String smiles)
                                           throws org.openscience.cdk.exception.CDKException
Throws:
org.openscience.cdk.exception.CDKException

getImage

public java.awt.image.BufferedImage getImage(java.lang.String smiles)

getImage

public java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule)

getImage

public java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                             org.openscience.cdk.interfaces.IAtomContainer highlighted)

getImage

public java.awt.image.BufferedImage getImage(org.openscience.cdk.interfaces.IAtomContainer molecule,
                                             org.openscience.cdk.interfaces.IAtomContainer highlighted,
                                             boolean build2d)

generate2D

public static void generate2D(org.openscience.cdk.interfaces.IAtomContainer molecule,
                              boolean generateCoordinates,
                              org.openscience.cdk.interfaces.IMoleculeSet molecules)

paint

public void paint(org.openscience.cdk.renderer.Renderer2D renderer,
                  org.openscience.cdk.interfaces.IMoleculeSet molecules,
                  boolean explicitH,
                  java.awt.Graphics2D g,
                  org.openscience.cdk.interfaces.IAtomContainer highlighted)

paint

public static void paint(org.openscience.cdk.renderer.Renderer2D renderer,
                         org.openscience.cdk.interfaces.IMoleculeSet molecules,
                         boolean explicitH,
                         java.awt.Graphics2D g,
                         org.openscience.cdk.interfaces.IAtomContainer highlighted,
                         java.awt.Dimension imageSize)
TODO sort molecules, in order to display the largest part first

Parameters:
renderer -
molecules -
explicitH -
g -
highlighted -
imageSize -

printCoordinates

protected static void printCoordinates(org.openscience.cdk.renderer.Renderer2DModel model)

getImage

public java.awt.image.BufferedImage getImage(java.util.ArrayList<?> list)

getBackground

public java.awt.Color getBackground()

setBackground

public void setBackground(java.awt.Color background)

getImageSize

public java.awt.Dimension getImageSize()

setImageSize

public void setImageSize(java.awt.Dimension imageSize)

getDefaultImage

public java.awt.Image getDefaultImage()

setDefaultImage

public void setDefaultImage(java.awt.image.BufferedImage defaultImage)