com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d
Class ImageComponentState

java.lang.Object
  extended by com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState
      extended by com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.NodeComponentState
          extended by com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.ImageComponentState
Direct Known Subclasses:
ImageComponent2DState, ImageComponent2DURLState, ImageComponent3DState

public abstract class ImageComponentState
extends NodeComponentState


Field Summary
protected  boolean byReference
           
private static int DATA_BUFFER_INT
           
private static int DIRECT_COLOR_MODEL
           
protected  int format
           
static byte GZIP_COMPRESSION
          Use GZIP to compress images.
protected  int height
           
static byte JPEG_COMPRESSION
          Use JPEG compression for images JPEG compression is currently the default.
static byte NO_COMPRESSION
          Do not compress the images
private static int SINGLE_PIXEL_PACKED_SAMPLE_MODEL
           
protected  int width
           
protected  boolean yUp
           
 
Fields inherited from class com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState
control, node, nodeClassName, symbol
 
Constructor Summary
ImageComponentState(SymbolTableData symbol, Controller control)
           
 
Method Summary
protected  java.awt.image.BufferedImage readBufferedImage(java.io.DataInput in)
           
private  java.awt.image.BufferedImage readBufferedImageGzipCompression(java.io.DataInput in)
           
private  java.awt.image.BufferedImage readBufferedImageJpegCompression(java.io.DataInput in)
           
private  java.awt.image.BufferedImage readBufferedImageNoCompression(java.io.DataInput in)
           
private  java.awt.image.ColorModel readColorModel(java.io.DataInput in)
           
protected  void readConstructorParams(java.io.DataInput in)
          Read the parameters required for the constructor of the Java3D object
private  java.awt.image.DataBuffer readDataBuffer(java.io.DataInput in)
           
private  java.awt.image.DataBufferInt readDataBufferInt(java.io.DataInput in)
           
private  java.awt.image.DirectColorModel readDirectColorModel(java.io.DataInput in)
           
private  java.awt.image.SampleModel readSampleModel(java.io.DataInput in)
           
private  java.awt.image.SinglePixelPackedSampleModel readSinglePixelPackedSampleModel(java.io.DataInput in)
           
private  java.awt.image.WritableRaster readWritableRaster(java.io.DataInput in)
           
protected  void writeBufferedImage(java.io.DataOutput out, java.awt.image.BufferedImage image)
           
private  void writeBufferedImageGzipCompression(java.io.DataOutput out, java.awt.image.BufferedImage image)
           
private  void writeBufferedImageJpegCompression(java.io.DataOutput out, java.awt.image.BufferedImage image)
           
private  void writeBufferedImageNoCompression(java.io.DataOutput out, java.awt.image.BufferedImage image)
           
private  void writeColorModel(java.io.DataOutput out, java.awt.image.ColorModel colorModel)
           
protected  void writeConstructorParams(java.io.DataOutput out)
          Write the parameters required for the constructor of the Java3D object
private  void writeDataBuffer(java.io.DataOutput out, java.awt.image.DataBuffer buffer)
           
private  void writeDataBufferInt(java.io.DataOutput out, java.awt.image.DataBufferInt buffer)
           
private  void writeDirectColorModel(java.io.DataOutput out, java.awt.image.DirectColorModel colorModel)
           
private  void writeSampleModel(java.io.DataOutput out, java.awt.image.SampleModel model)
           
private  void writeSinglePixelPackedSampleModel(java.io.DataOutput out, java.awt.image.SinglePixelPackedSampleModel model)
           
private  void writeWritableRaster(java.io.DataOutput out, java.awt.image.WritableRaster raster)
           
 
Methods inherited from class com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.NodeComponentState
addSubReference, readObject, writeObject
 
Methods inherited from class com.sun.j3d.utils.scenegraph.io.state.javax.media.j3d.SceneGraphObjectState
buildGraph, cleanup, createNode, createNode, createNode, createNode, createState, getNode, getNodeID, getSymbol, readString, writeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

protected int format

height

protected int height

width

protected int width

byReference

protected boolean byReference

yUp

protected boolean yUp

DIRECT_COLOR_MODEL

private static final int DIRECT_COLOR_MODEL
See Also:
Constant Field Values

SINGLE_PIXEL_PACKED_SAMPLE_MODEL

private static final int SINGLE_PIXEL_PACKED_SAMPLE_MODEL
See Also:
Constant Field Values

DATA_BUFFER_INT

private static final int DATA_BUFFER_INT
See Also:
Constant Field Values

NO_COMPRESSION

public static final byte NO_COMPRESSION
Do not compress the images

See Also:
Constant Field Values

GZIP_COMPRESSION

public static final byte GZIP_COMPRESSION
Use GZIP to compress images. GZIP decompression is very slow

See Also:
Constant Field Values

JPEG_COMPRESSION

public static final byte JPEG_COMPRESSION
Use JPEG compression for images JPEG compression is currently the default. The file format supports other compression algorithms but there is currently no API to select the algorithm. This feature is on hold pending imageio in Java 1.4

See Also:
Constant Field Values
Constructor Detail

ImageComponentState

public ImageComponentState(SymbolTableData symbol,
                           Controller control)
Method Detail

writeConstructorParams

protected void writeConstructorParams(java.io.DataOutput out)
                               throws java.io.IOException
Description copied from class: SceneGraphObjectState
Write the parameters required for the constructor of the Java3D object

Overrides:
writeConstructorParams in class SceneGraphObjectState
Throws:
java.io.IOException

readConstructorParams

protected void readConstructorParams(java.io.DataInput in)
                              throws java.io.IOException
Description copied from class: SceneGraphObjectState
Read the parameters required for the constructor of the Java3D object

Overrides:
readConstructorParams in class SceneGraphObjectState
Throws:
java.io.IOException

writeBufferedImage

protected void writeBufferedImage(java.io.DataOutput out,
                                  java.awt.image.BufferedImage image)
                           throws java.io.IOException
Throws:
java.io.IOException

writeBufferedImageNoCompression

private void writeBufferedImageNoCompression(java.io.DataOutput out,
                                             java.awt.image.BufferedImage image)
                                      throws java.io.IOException
Throws:
java.io.IOException

writeBufferedImageGzipCompression

private void writeBufferedImageGzipCompression(java.io.DataOutput out,
                                               java.awt.image.BufferedImage image)
                                        throws java.io.IOException
Throws:
java.io.IOException

writeBufferedImageJpegCompression

private void writeBufferedImageJpegCompression(java.io.DataOutput out,
                                               java.awt.image.BufferedImage image)
                                        throws java.io.IOException
Throws:
java.io.IOException

readBufferedImage

protected java.awt.image.BufferedImage readBufferedImage(java.io.DataInput in)
                                                  throws java.io.IOException
Throws:
java.io.IOException

readBufferedImageNoCompression

private java.awt.image.BufferedImage readBufferedImageNoCompression(java.io.DataInput in)
                                                             throws java.io.IOException
Throws:
java.io.IOException

readBufferedImageGzipCompression

private java.awt.image.BufferedImage readBufferedImageGzipCompression(java.io.DataInput in)
                                                               throws java.io.IOException
Throws:
java.io.IOException

readBufferedImageJpegCompression

private java.awt.image.BufferedImage readBufferedImageJpegCompression(java.io.DataInput in)
                                                               throws java.io.IOException
Throws:
java.io.IOException

writeColorModel

private void writeColorModel(java.io.DataOutput out,
                             java.awt.image.ColorModel colorModel)
                      throws java.io.IOException
Throws:
java.io.IOException

readColorModel

private java.awt.image.ColorModel readColorModel(java.io.DataInput in)
                                          throws java.io.IOException
Throws:
java.io.IOException

writeDirectColorModel

private void writeDirectColorModel(java.io.DataOutput out,
                                   java.awt.image.DirectColorModel colorModel)
                            throws java.io.IOException
Throws:
java.io.IOException

readDirectColorModel

private java.awt.image.DirectColorModel readDirectColorModel(java.io.DataInput in)
                                                      throws java.io.IOException
Throws:
java.io.IOException

writeWritableRaster

private void writeWritableRaster(java.io.DataOutput out,
                                 java.awt.image.WritableRaster raster)
                          throws java.io.IOException
Throws:
java.io.IOException

readWritableRaster

private java.awt.image.WritableRaster readWritableRaster(java.io.DataInput in)
                                                  throws java.io.IOException
Throws:
java.io.IOException

writeSampleModel

private void writeSampleModel(java.io.DataOutput out,
                              java.awt.image.SampleModel model)
                       throws java.io.IOException
Throws:
java.io.IOException

readSampleModel

private java.awt.image.SampleModel readSampleModel(java.io.DataInput in)
                                            throws java.io.IOException
Throws:
java.io.IOException

writeSinglePixelPackedSampleModel

private void writeSinglePixelPackedSampleModel(java.io.DataOutput out,
                                               java.awt.image.SinglePixelPackedSampleModel model)
                                        throws java.io.IOException
Throws:
java.io.IOException

readSinglePixelPackedSampleModel

private java.awt.image.SinglePixelPackedSampleModel readSinglePixelPackedSampleModel(java.io.DataInput in)
                                                                              throws java.io.IOException
Throws:
java.io.IOException

writeDataBuffer

private void writeDataBuffer(java.io.DataOutput out,
                             java.awt.image.DataBuffer buffer)
                      throws java.io.IOException
Throws:
java.io.IOException

readDataBuffer

private java.awt.image.DataBuffer readDataBuffer(java.io.DataInput in)
                                          throws java.io.IOException
Throws:
java.io.IOException

writeDataBufferInt

private void writeDataBufferInt(java.io.DataOutput out,
                                java.awt.image.DataBufferInt buffer)
                         throws java.io.IOException
Throws:
java.io.IOException

readDataBufferInt

private java.awt.image.DataBufferInt readDataBufferInt(java.io.DataInput in)
                                                throws java.io.IOException
Throws:
java.io.IOException


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.