public class AWTDrawVisitorWithImageMap
extends org.openscience.cdk.renderer.visitor.AbstractAWTDrawVisitor
IDrawVisitor
interface for the AWT
widget toolkit, allowing molecules to be rendered with toolkits based on
AWT, like the Java reference graphics platform Swing.Constructor and Description |
---|
AWTDrawVisitorWithImageMap(Graphics2D graphics)
Constructs a new
IDrawVisitor using the AWT widget toolkit,
taking a Graphics2D object to which the chemical content
is drawn. |
Modifier and Type | Method and Description |
---|---|
Graphics2D |
getGraphics()
Returns the
Graphics2D for for this visitor. |
org.openscience.cdk.renderer.RendererModel |
getRendererModel()
Returns the current
RendererModel . |
Map<Integer,BasicStroke> |
getStrokeMap()
Returns the current stroke map.
|
protected void |
imageMap(ImageMapAreaElement atomSymbol,
Rectangle2D textBounds) |
void |
setFontManager(org.openscience.cdk.renderer.font.IFontManager fontManager)
The font manager must be set by any renderer that uses this class!
This manager is needed to keep track of fonts of the right size.
|
void |
setRendererModel(org.openscience.cdk.renderer.RendererModel rendererModel) |
void |
visit(org.openscience.cdk.renderer.elements.IRenderingElement element) |
public AWTDrawVisitorWithImageMap(Graphics2D graphics)
IDrawVisitor
using the AWT widget toolkit,
taking a Graphics2D
object to which the chemical content
is drawn.graphics
- Graphics2D
to which will be drawnpublic org.openscience.cdk.renderer.RendererModel getRendererModel()
RendererModel
.public Map<Integer,BasicStroke> getStrokeMap()
Map
with Integer as keys and BasicStroke
s.public Graphics2D getGraphics()
Graphics2D
for for this visitor.Graphics2D
objectprotected void imageMap(ImageMapAreaElement atomSymbol, Rectangle2D textBounds)
public void visit(org.openscience.cdk.renderer.elements.IRenderingElement element)
public void setFontManager(org.openscience.cdk.renderer.font.IFontManager fontManager)
fontManager
- the IFontManager
to be usedpublic void setRendererModel(org.openscience.cdk.renderer.RendererModel rendererModel)
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.