|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Canvas javax.media.j3d.Canvas3D com.imsl.chart3d.Canvas3DChart
public class Canvas3DChart
A canvas for rendering a 3D chart.
Nested Class Summary | |
---|---|
static interface |
Canvas3DChart.Paint
Interface for 2D drawing on the canvas before or after the the 3D image is drawn. |
Nested classes/interfaces inherited from class java.awt.Canvas |
---|
Canvas.AccessibleAWTCanvas |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.media.j3d.Canvas3D |
---|
FIELD_ALL, FIELD_LEFT, FIELD_RIGHT |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Canvas3DChart()
Creates a Canvas3DChart with a new Chart3D object. |
|
Canvas3DChart(Chart3D chart)
Creates a Canvas3DChart with a given Chart3D object. |
Method Summary | |
---|---|
void |
addPostRenderPaint(Canvas3DChart.Paint paint)
Adds a Paint object to draw to the canvas after the the 3D image is rendered. |
void |
addPreRenderPaint(Canvas3DChart.Paint paint)
Adds a Paint object to draw to the canvas before the the 3D image is rendered. |
Chart3D |
getChart3D()
Returns the Chart3D associated with this canvas. |
void |
paint(Graphics g)
Paint method overriden to correct a problem in JDK 1.4. |
void |
postRender()
Calls the Paint objects added to the post-render list. |
void |
postSwap()
Writes the chart to a file as a bitmap image. |
void |
preRender()
Calls the Paint objects added to the pre-render list. |
void |
removePostRenderPaint(Canvas3DChart.Paint paint)
Removes a Paint object from the list of post-render Paint objects. |
void |
removePreRenderPaint(Canvas3DChart.Paint paint)
Removes a Paint object from the list of pre-render Paint objects. |
void |
render()
Creates a scene graph from the chart tree and starts rendering the scene graph into this canvas. |
void |
write(String filename,
String format)
Write the canvas as an image file after it is next redrawn. |
Methods inherited from class java.awt.Canvas |
---|
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Canvas3DChart()
public Canvas3DChart(Chart3D chart)
chart
- is the Chart3D
object associated with this canvas.Method Detail |
---|
public void addPostRenderPaint(Canvas3DChart.Paint paint)
paint
- is the Paint
object to be removed.public void addPreRenderPaint(Canvas3DChart.Paint paint)
paint
- implements the paint
method
to be called before the 3D image is rendered.public Chart3D getChart3D()
public void paint(Graphics g)
paint
in class Canvas3D
public void postRender()
Paint
objects added to the post-render list.
This routine is called by the Java 3D rendering loop after completing
all rendering to the canvas for this frame and before the buffer swap.
NOTE: Applications should not call this method.
postRender
in class Canvas3D
public void postSwap()
write
method to trigger writing of the image.
NOTE: Applications should not call this method.
postSwap
in class Canvas3D
public void preRender()
Paint
objects added to the pre-render list.
This routine is called by the Java 3D rendering loop after clearing
the canvas and before any rendering has been done for this frame.
NOTE: Applications should not call this method.
preRender
in class Canvas3D
public void removePostRenderPaint(Canvas3DChart.Paint paint)
paint
- is the Paint
object to be removed.public void removePreRenderPaint(Canvas3DChart.Paint paint)
paint
- implements the paint
method
to be called before the 3D image is rendered.public void render()
public void write(String filename, String format)
filename
- is the name of the file to which the image is to be written.format
- is the image format name, such as "PNG" or "JPEG".
The supported formats are the same as for ImageIO.write.ImageIO.write(java.awt.image.RenderedImage, java.lang.String, javax.imageio.stream.ImageOutputStream)
|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |