public class GeomSSCanvas3D extends BGFGCanvas3D implements java.awt.print.Printable
Modified by: Joseph A. Huwaldt
Modifier and Type | Class and Description |
---|---|
static class |
GeomSSCanvas3D.PDViewAngle
Pre-defined view angles used with
setView . |
Constructor and Description |
---|
GeomSSCanvas3D(GeomElement geometry,
int width,
int height)
Constructs and initializes a new Canvas3D object that Java 3D can render into.
|
Modifier and Type | Method and Description |
---|---|
void |
addTransformChangeListener(TransformChangeListener listener)
Add a
TransformChangeListener to this canvas. |
GeomSSScene |
getScene() |
void |
postSwap()
Process code after we have swapped the image to the foreground.
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
Prints the 3D model image from this canvas to the specified Graphics context using
the specified page format.
|
void |
removeTransformChangeListener(TransformChangeListener listener)
Remove a
TransformChangeListener from this canvas. |
void |
setView(GeomSSCanvas3D.PDViewAngle viewAngle)
Set the viewing angle for this canvas to one of the pre-set angles.
|
void |
waitForRendering(long timeout)
Causes the calling thread to wait until either the current rendering is complete,
or until the specified amount of time has elapsed.
|
addBackground, addOverlay, clearBackgrounds, clearOverlays, getBackground, getNumberBackgrounds, getNumberOverlays, getOverlay, postRender, preRender, removeBackground, removeBackground, removeOverlay, removeOverlay, setBackground, setOverlay
addCaptureObserver, removeCaptureObserver
public GeomSSCanvas3D(GeomElement geometry, int width, int height)
geometry
- The geometry to be displayed.width
- The width of the canvas (must be > 0).height
- The height of the canvas (must be > 0).java.lang.IllegalArgumentException
- if the specified GraphicsConfiguration does not
support 3D renderingpublic GeomSSScene getScene()
public void setView(GeomSSCanvas3D.PDViewAngle viewAngle)
viewAngle
- The pre-defined viewing angle for this canvas.public void addTransformChangeListener(TransformChangeListener listener)
TransformChangeListener
to this canvas.listener
- The transform change listener to add.public void removeTransformChangeListener(TransformChangeListener listener)
TransformChangeListener
from this canvas.listener
- The transform change listener to remove.public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
graphics
- the context into which the page is drawnpageFormat
- the size and orientation of the page being drawnpageIndex
- the zero based index of the page to be drawn.java.awt.print.PrinterException
public void postSwap()
postSwap
in class ImageCaptureCanvas3D
public void waitForRendering(long timeout) throws java.lang.IllegalArgumentException
timeout
- the maximum time to wait in milliseconds.java.lang.IllegalArgumentException
- if the value of timeout is negative.