public class DirectReactionDrawer extends AbstractDirectDrawer
params
Constructor and Description |
---|
DirectReactionDrawer(AbstractDirectReactionLayout layout) |
DirectReactionDrawer(Params params) |
DirectReactionDrawer(Params params,
AbstractDirectReactionLayout layout) |
DirectReactionDrawer(Params params,
AbstractDirectReactionLayout layout,
AbstractAWTReactionLayout exactReactionLayout) |
Modifier and Type | Method and Description |
---|---|
void |
align(org.openscience.cdk.interfaces.IReaction reaction,
int w,
int h,
double actualWidth,
double actualHeight,
double zoom) |
double |
calculateZoom(int targetWidth,
int targetHeight,
java.awt.geom.Rectangle2D totalBounds) |
BoundsTree |
centerOn(org.openscience.cdk.interfaces.IReaction reaction,
double cx,
double cy,
BoundsTree boundsTree) |
BoundsTree |
centerOnOrigin(org.openscience.cdk.interfaces.IReaction reaction,
BoundsTree boundsTree) |
void |
drawLabelPanel(java.util.Map<java.lang.String,java.lang.String> labelMap,
BoundsTree labelBoundsTree,
java.awt.Graphics2D g) |
void |
drawMappings(org.openscience.cdk.interfaces.IReaction reaction,
java.awt.Graphics2D g) |
void |
drawMoleculeSet(org.openscience.cdk.interfaces.IAtomContainerSet reactants,
java.lang.String reactionID,
double yAxis,
BoundsTree boundsTree,
java.awt.Graphics2D g) |
void |
drawPlus(org.openscience.cdk.interfaces.IAtomContainer ac,
java.lang.String acLabel,
double yAxis,
BoundsTree boundsTree,
java.awt.Graphics2D g) |
java.awt.Image |
drawReaction(org.openscience.cdk.interfaces.IReaction reaction) |
java.awt.Image |
drawReaction(org.openscience.cdk.interfaces.IReaction reaction,
boolean invert)
Draw a natural-scale reaction.
|
void |
drawReaction(org.openscience.cdk.interfaces.IReaction reaction,
BoundsTree boundsTree,
int w,
int h,
double zoom,
java.awt.Graphics2D g)
Draw a zoomed reaction.
|
java.awt.Image |
drawReaction(org.openscience.cdk.interfaces.IReaction reaction,
int w,
int h)
Draw a zoomed reaction.
|
java.awt.Image |
drawReaction(org.openscience.cdk.interfaces.IReaction reaction,
int w,
int h,
boolean invert)
Draw a zoomed reaction.
|
void |
drawReactionID(org.openscience.cdk.interfaces.IReaction reaction,
int w,
java.awt.Graphics2D g) |
java.awt.geom.Rectangle2D |
getDrawnBounds(java.util.List<org.openscience.cdk.interfaces.IAtom> atoms) |
BoundsTree |
getExactReactionBounds(org.openscience.cdk.interfaces.IReaction reaction,
java.awt.Graphics2D g) |
AbstractDirectReactionLayout |
getLayout() |
double |
getMaxLabelHeight(BoundsTree tree,
java.util.Map<java.lang.String,java.lang.String> labels,
java.awt.Graphics2D g) |
DirectMoleculeDrawer |
getMoleculeDrawer() |
Params |
getParams() |
javax.vecmath.Vector2d |
getReactionAxis() |
BoundsTree |
getReactionBounds(org.openscience.cdk.interfaces.IReaction reaction) |
void |
highlightSubgraph(java.util.List<org.openscience.cdk.interfaces.IAtom> atoms,
java.awt.Color color) |
java.util.Map<java.lang.String,java.lang.String> |
makeLabelMap(org.openscience.cdk.interfaces.IReaction reaction) |
void |
printBoundsTree(BoundsTree tree,
java.util.List<java.lang.String> labels) |
BoundsTree |
shift(org.openscience.cdk.interfaces.IReaction reaction,
BoundsTree unshiftedTree,
double dx,
double dy) |
drawLine, getTextBounds, getTextPoint, makeBlankImage, makeBlankImage, setParams
public DirectReactionDrawer(AbstractDirectReactionLayout layout)
layout
- public DirectReactionDrawer(Params params)
params
- public DirectReactionDrawer(Params params, AbstractDirectReactionLayout layout)
params
- layout
- public DirectReactionDrawer(Params params, AbstractDirectReactionLayout layout, AbstractAWTReactionLayout exactReactionLayout)
params
- layout
- exactReactionLayout
- public AbstractDirectReactionLayout getLayout()
public java.awt.Image drawReaction(org.openscience.cdk.interfaces.IReaction reaction)
reaction
- public java.awt.Image drawReaction(org.openscience.cdk.interfaces.IReaction reaction, int w, int h)
reaction
- w
- h
- public java.util.Map<java.lang.String,java.lang.String> makeLabelMap(org.openscience.cdk.interfaces.IReaction reaction)
reaction
- public java.awt.Image drawReaction(org.openscience.cdk.interfaces.IReaction reaction, int w, int h, boolean invert)
reaction
- w
- h
- invert
- public java.awt.Image drawReaction(org.openscience.cdk.interfaces.IReaction reaction, boolean invert)
reaction
- invert
- public void drawReaction(org.openscience.cdk.interfaces.IReaction reaction, BoundsTree boundsTree, int w, int h, double zoom, java.awt.Graphics2D g)
reaction
- boundsTree
- w
- h
- zoom
- g
- public void drawLabelPanel(java.util.Map<java.lang.String,java.lang.String> labelMap, BoundsTree labelBoundsTree, java.awt.Graphics2D g)
labelMap
- labelBoundsTree
- g
- public double getMaxLabelHeight(BoundsTree tree, java.util.Map<java.lang.String,java.lang.String> labels, java.awt.Graphics2D g)
tree
- labels
- g
- public void printBoundsTree(BoundsTree tree, java.util.List<java.lang.String> labels)
tree
- labels
- public BoundsTree centerOnOrigin(org.openscience.cdk.interfaces.IReaction reaction, BoundsTree boundsTree)
reaction
- boundsTree
- public BoundsTree centerOn(org.openscience.cdk.interfaces.IReaction reaction, double cx, double cy, BoundsTree boundsTree)
reaction
- cx
- cy
- boundsTree
- public BoundsTree shift(org.openscience.cdk.interfaces.IReaction reaction, BoundsTree unshiftedTree, double dx, double dy)
reaction
- unshiftedTree
- dx
- dy
- public void align(org.openscience.cdk.interfaces.IReaction reaction, int w, int h, double actualWidth, double actualHeight, double zoom)
reaction
- w
- h
- actualWidth
- actualHeight
- zoom
- public void drawReactionID(org.openscience.cdk.interfaces.IReaction reaction, int w, java.awt.Graphics2D g)
reaction
- w
- g
- public BoundsTree getReactionBounds(org.openscience.cdk.interfaces.IReaction reaction)
reaction
- public BoundsTree getExactReactionBounds(org.openscience.cdk.interfaces.IReaction reaction, java.awt.Graphics2D g)
reaction
- g
- public double calculateZoom(int targetWidth, int targetHeight, java.awt.geom.Rectangle2D totalBounds)
targetWidth
- targetHeight
- totalBounds
- public java.awt.geom.Rectangle2D getDrawnBounds(java.util.List<org.openscience.cdk.interfaces.IAtom> atoms)
atoms
- public javax.vecmath.Vector2d getReactionAxis()
public void drawMappings(org.openscience.cdk.interfaces.IReaction reaction, java.awt.Graphics2D g)
reaction
- g
- public void drawMoleculeSet(org.openscience.cdk.interfaces.IAtomContainerSet reactants, java.lang.String reactionID, double yAxis, BoundsTree boundsTree, java.awt.Graphics2D g)
reactants
- reactionID
- yAxis
- boundsTree
- g
- public void drawPlus(org.openscience.cdk.interfaces.IAtomContainer ac, java.lang.String acLabel, double yAxis, BoundsTree boundsTree, java.awt.Graphics2D g)
ac
- acLabel
- yAxis
- boundsTree
- g
- public Params getParams()
getParams
in class AbstractDirectDrawer
public void highlightSubgraph(java.util.List<org.openscience.cdk.interfaces.IAtom> atoms, java.awt.Color color)
atoms
- color
- public DirectMoleculeDrawer getMoleculeDrawer()