org.jmol.g3d
Class Swing3D

java.lang.Object
  extended by org.jmol.g3d.Platform3D
      extended by org.jmol.g3d.Swing3D

final class Swing3D
extends Platform3D

Implementation of Platform3D when using Swing on JVMs >= 1.2

Uses the BufferedImage classe to turn an int[] into an Image that can be drawn.

This is used by everything except MSFT Internet Explorer with the MSFT JVM, and Netscape 4.* on both Win32 and MacOS 9.

Author:
Miguel, miguel@jmol.org

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jmol.g3d.Platform3D
Platform3D.ClearingThread
 
Field Summary
private static boolean backgroundTransparent
           
private static java.awt.image.DirectColorModel rgbColorModel
           
private static java.awt.image.DirectColorModel rgbColorModelT
           
private static int[] sampleModelBitMasks
           
private static int[] sampleModelBitMasksT
           
 
Fields inherited from class org.jmol.g3d.Platform3D
bufferHeight, bufferSize, bufferSizeT, bufferWidth, clearingThread, desireClearingThread, forcePlatformAWT, gOffscreen, heightOffscreen, imageOffscreen, imagePixelBuffer, pBuffer, pBufferT, useClearingThread, widthOffscreen, windowHeight, windowSize, windowWidth, zBuffer, zBufferT
 
Constructor Summary
Swing3D()
           
 
Method Summary
(package private)  java.awt.Image allocateImage()
           
(package private)  java.awt.Image allocateOffscreenImage(int width, int height)
           
(package private)  java.awt.Graphics getGraphics(java.awt.Image image)
           
(package private) static java.awt.Graphics getStaticGraphics(java.awt.Image image)
           
(package private)  void setBackgroundTransparent(boolean tf)
           
 
Methods inherited from class org.jmol.g3d.Platform3D
allocateBuffers, allocateTBuffers, checkOffscreenSize, clearScreenBuffer, clearScreenBufferThreaded, clearTBuffer, createInstance, hasContent, initialize, notifyEndOfRendering, obtainScreenBuffer, releaseBuffers, setBackgroundColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rgbColorModel

private static final java.awt.image.DirectColorModel rgbColorModel

sampleModelBitMasks

private static final int[] sampleModelBitMasks

rgbColorModelT

private static final java.awt.image.DirectColorModel rgbColorModelT

sampleModelBitMasksT

private static final int[] sampleModelBitMasksT

backgroundTransparent

private static boolean backgroundTransparent
Constructor Detail

Swing3D

Swing3D()
Method Detail

allocateImage

java.awt.Image allocateImage()
Specified by:
allocateImage in class Platform3D

setBackgroundTransparent

void setBackgroundTransparent(boolean tf)
Overrides:
setBackgroundTransparent in class Platform3D

allocateOffscreenImage

java.awt.Image allocateOffscreenImage(int width,
                                      int height)
Specified by:
allocateOffscreenImage in class Platform3D

getGraphics

java.awt.Graphics getGraphics(java.awt.Image image)
Specified by:
getGraphics in class Platform3D

getStaticGraphics

static java.awt.Graphics getStaticGraphics(java.awt.Image image)