|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.chart.AbstractChart
com.davisor.graphics.chart.ImageChart
com.davisor.graphics.chart.BufferedChart
BufferedChart represents a drawable chart, based on a buffered image.
BufferedImage,
ChartAttributes,
ChartFactory,
Serialized Form| Field Summary |
| Fields inherited from class com.davisor.graphics.chart.ImageChart |
M_backArea, M_graphics, M_image, M_imageParams, M_plotArea |
| Fields inherited from class com.davisor.graphics.chart.AbstractChart |
M_annotatedShapes, M_contentType, M_height, M_resolution, M_width |
| Constructor Summary | |
|
BufferedChart(BufferedChart bc)
Shallow copy constructor. |
protected |
BufferedChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.lang.String contentType,
java.util.List annotatedShapes)
Creates a new image chart. |
|
BufferedChart(java.lang.String contentType,
ChartAttributes attr)
Creates a chart out of the given factory and attributes. |
| Method Summary | |
java.awt.Image |
getImage()
Gets chart image. |
protected void |
setAntialiasDefaults(ChartAttributes attr)
Sets current graphics' context antialias default rendering hints. |
| Methods inherited from class com.davisor.graphics.chart.ImageChart |
getAnnotatedShapes, getBackArea, getGraphics, getImageParams, getPlotArea, putContent, putImage, putImage, putImage, putImage, setAntialiasMode, setAntialiasMode, writeReplace |
| Methods inherited from class com.davisor.graphics.chart.AbstractChart |
addAnnotatedShape, getContentType, getHeight, getHeightInMillimeters, getResolution, getSizeInMillimeters, getWidth, getWidthInMillimeters, putChart, putChart, setContentType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BufferedChart(BufferedChart bc)
protected BufferedChart(java.lang.Number width,
java.lang.Number height,
java.lang.Number resolution,
java.lang.String contentType,
java.util.List annotatedShapes)
width - chart width, in millimeters (may be null)height - chart height, in millimeters (may be null)resolution - resolution, in pixels-per-millimeters (may be null)contentType - chart content encoding type (may be null)annotatedShapes - list of annotated shapes (may be null)
public BufferedChart(java.lang.String contentType,
ChartAttributes attr)
After the creation, the image will first be filled with the chart background color. If the chart render attributes also define a stroke, then a borderline of the given color is drawn around the chart. If the color is not set, black color is used as default.
After the image has been created, a rectangle object is created to record the inner bounds of the drawable area of the image. If a borderline was drawn around the image, the border area is reduced from the bounds.
A graphics' context is also created for the image. If a borderline was drawn around the image, an initial translation is added to the context, so that the context origo coincides with the left upper corner of the drawable area inside the border line. The context rendering hints are configured as described by the chart attributes.
contentType - chart content encoding type (may be null)attr - chart attributesImageChart.getBackArea(),
ImageChart.getGraphics(),
ImageChart.getPlotArea(),
BufferedImage| Method Detail |
public java.awt.Image getImage()
getImage in class ImageChartImageChart.getGraphics()protected void setAntialiasDefaults(ChartAttributes attr)
This implementation determines if the current image is an indexed
buffered image, if it defines a transparent color, and if
antialias mode is RenderAttributes.AUTO. If so,
antialiasing is turned off, because such a combination does not
look good. Othewise, default antialias defaults are used instead,
as defined by ImageChart.setAntialiasDefaults(ChartAttributes).
setAntialiasDefaults in class ImageChartattr - attributes to read encoder info fromChartAttributes.getEncoderInfo(),
MimeInfo,
MimeInfo#configureHints
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||