org.jscience.astronomy
Class AstronomyTextureLoader

java.lang.Object
  extended by com.sun.j3d.utils.image.TextureLoader
      extended by org.jscience.astronomy.AstronomyTextureLoader

public class AstronomyTextureLoader
extends com.sun.j3d.utils.image.TextureLoader

A texture loading utility that doesn't require an image observer for constructing objects. This class extends the TextureLoader class of the com.sun.j3d.utils.image package.


Field Summary
 
Fields inherited from class com.sun.j3d.utils.image.TextureLoader
ALLOW_NON_POWER_OF_TWO, BY_REFERENCE, GENERATE_MIPMAP, Y_UP
 
Constructor Summary
AstronomyTextureLoader(java.awt.Image image)
          Constructs a AstronomyTextureLoader object loading the specified iamge in default (RGBA) format.
AstronomyTextureLoader(java.awt.Image image, int flags)
          Constructs a AstronomyTextureLoader object loading the specified image and option flags in the default (RGBA) format.
AstronomyTextureLoader(java.awt.Image image, java.lang.String format)
          Constructs a AstronomyTextureLoader object loading the specified file using the specified format.
AstronomyTextureLoader(java.awt.Image image, java.lang.String format, int flags)
          Constructs a AstronomyTextureLoader object loading the specified file with specified format and flags.
AstronomyTextureLoader(java.lang.String fname)
          Constructs a AstronomyTextureLoader object loading the specified file using the default format (RGBA).
AstronomyTextureLoader(java.lang.String fname, int flags)
          Constructs a AstronomyTextureLoader object loading the specified file with the specified flags.
AstronomyTextureLoader(java.lang.String fname, java.lang.String format)
          Constructs a AstronomyTextureLoader object loading the specified file using the specified format.
AstronomyTextureLoader(java.lang.String fname, java.lang.String format, int flags)
          Constructs a AstronomyTextureLoader object loading the specified file using the specified format and flags.
AstronomyTextureLoader(java.net.URL url)
          Constructs a AstronomyTextureLoader object loading the specified URL using the default format.
AstronomyTextureLoader(java.net.URL url, int flags)
          Constructs a AstronomyTextureLoader object loading the specified URL using the specified flags.
AstronomyTextureLoader(java.net.URL url, java.lang.String format)
          Constructs a AstronomyTextureLoader object loading the specified URL using the specified format.
AstronomyTextureLoader(java.net.URL url, java.lang.String format, int flags)
          Constructs a AstronomyTextureLoader object loading the specified URL using the specified format and flags.
 
Method Summary
static java.awt.Component getImageObserver()
          Retreve the object used as the image observer for AstronomyTextureLoader objects.
static void setImageObserver(java.awt.Component imageObserver)
          Specify an object to server as the image observer.
 
Methods inherited from class com.sun.j3d.utils.image.TextureLoader
getImage, getScaledImage, getScaledImage, getTexture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AstronomyTextureLoader

public AstronomyTextureLoader(java.awt.Image image)
Constructs a AstronomyTextureLoader object loading the specified iamge in default (RGBA) format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
image - the image object to load

AstronomyTextureLoader

public AstronomyTextureLoader(java.awt.Image image,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified image and option flags in the default (RGBA) format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
image - the image object to load
flags - the flags to use in construction (e.g. generate mipmap)

AstronomyTextureLoader

public AstronomyTextureLoader(java.awt.Image image,
                              java.lang.String format)
Constructs a AstronomyTextureLoader object loading the specified file using the specified format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
image - the image object to load
format - specificaiton of which channels to use (e.g. RGB)

AstronomyTextureLoader

public AstronomyTextureLoader(java.awt.Image image,
                              java.lang.String format,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified file with specified format and flags. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
image - the image object to load
format - specificaiton of which channels to use (e.g. RGB)
flags - the flags to use in construction (e.g. generate mipmap)

AstronomyTextureLoader

public AstronomyTextureLoader(java.lang.String fname)
Constructs a AstronomyTextureLoader object loading the specified file using the default format (RGBA). The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
fname - the name of the file to load

AstronomyTextureLoader

public AstronomyTextureLoader(java.lang.String fname,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified file with the specified flags. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
fname - the name of the file to load
flags - the flags to use in construction (e.g. generate mipmap)

AstronomyTextureLoader

public AstronomyTextureLoader(java.lang.String fname,
                              java.lang.String format)
Constructs a AstronomyTextureLoader object loading the specified file using the specified format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
fname - the name of the file to load
format - specificaiton of which channels to use (e.g. RGB)

AstronomyTextureLoader

public AstronomyTextureLoader(java.lang.String fname,
                              java.lang.String format,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified file using the specified format and flags. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
fname - the name of the file to load
format - specificaiton of which channels to use (e.g. RGB)
flags - the flags to use in construction (e.g. generate mipmap)

AstronomyTextureLoader

public AstronomyTextureLoader(java.net.URL url)
Constructs a AstronomyTextureLoader object loading the specified URL using the default format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
url - specifies the URL of the image to load

AstronomyTextureLoader

public AstronomyTextureLoader(java.net.URL url,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified URL using the specified flags. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
url - specifies the URL of the image to load
flags - the flags to use in construction (e.g. generate mipmap)

AstronomyTextureLoader

public AstronomyTextureLoader(java.net.URL url,
                              java.lang.String format)
Constructs a AstronomyTextureLoader object loading the specified URL using the specified format. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
url - specifies the URL of the image to load
format - specificaiton of which channels to use (e.g. RGB)

AstronomyTextureLoader

public AstronomyTextureLoader(java.net.URL url,
                              java.lang.String format,
                              int flags)
Constructs a AstronomyTextureLoader object loading the specified URL using the specified format and flags. The an image observer must be set using the setImageObserver() method before using this constructor.

Parameters:
url - specifies the URL of the image to load
format - specificaiton of which channels to use (e.g. RGB)
flags - the flags to use in construction (e.g. generate mipmap)
Method Detail

setImageObserver

public static void setImageObserver(java.awt.Component imageObserver)
Specify an object to server as the image observer. Use this method once before constructing any texture loaders.

Parameters:
imageObserver - the object to be used in subsequent AstronomyTextureLoader constuctions

getImageObserver

public static java.awt.Component getImageObserver()
Retreve the object used as the image observer for AstronomyTextureLoader objects. Use this method when the image observer is needed.

Returns:
the object used in as the image observer in subsequent AstronomyTextureLoader constuctions