| javax.media.j3d.ImageComponent2D org.jdesktop.j3d.utils.scenegraph.ImageComponent2DURL
ImageComponent2DURL | public class ImageComponent2DURL extends javax.media.j3d.ImageComponent2D implements SceneGraphStateProvider(Code) | | A subclass of ImageComponent2D that includes a base URL and image name. There
is also an associated state class for SceneGraphIO so when this node is saved
only the baseURL and imageName are written, not the image itself. A simple
AssetManager is provided which will load the images from the combined URL and
imageName. Users can replace the asset manager with to provide more advanced
handling if required.
The imageName may contain both the filename and a directory hierarchy
ie
baseURL http://server.com/textures
imageName material/stone/flagstone.jpg
author: paulby |
Inner Class :public interface AssetManager | |
Inner Class :static class SimpleAssetManager implements AssetManager | |
Constructor Summary | |
public | ImageComponent2DURL(ImageComponent2D ic, java.net.URL baseURL, String imageName) Special constructor that creates a new ImageComponent2DURL from the provided
ImageComponent2D. | public | ImageComponent2DURL(int format, int width, int height, boolean byReference, boolean yUp, java.net.URL baseURL, String imageName) Constructs a 2D image component object using the specified
format, width, height, byReference flag, and yUp flag.
Default values are used for all other parameters.
Parameters: format - the image component format, one of: FORMAT_RGB,FORMAT_RGBA, etc. Parameters: width - the number of columns of pixels in this image componentobject Parameters: height - the number of rows of pixels in this image componentobject Parameters: byReference - a flag that indicates whether the data is copiedinto this image component object or is accessed by reference. Parameters: yUp - a flag that indicates the y-orientation of this imagecomponent. | public | ImageComponent2DURL(int format, int width, int height, boolean byReference, boolean yUp, java.net.URL baseURL, String imageName, boolean dontUseAssetManager) Constructs a 2D image component object using the specified
format, width, height, byReference flag, and yUp flag.
Default values are used for all other parameters.
If dontUseAssetManager is true then the constructor will not use
the asset manager to load the image.
Parameters: format - the image component format, one of: FORMAT_RGB,FORMAT_RGBA, etc. Parameters: width - the number of columns of pixels in this image componentobject Parameters: height - the number of rows of pixels in this image componentobject Parameters: byReference - a flag that indicates whether the data is copiedinto this image component object or is accessed by reference. Parameters: yUp - a flag that indicates the y-orientation of this imagecomponent. |
ImageComponent2DURL | public ImageComponent2DURL(ImageComponent2D ic, java.net.URL baseURL, String imageName)(Code) | | Special constructor that creates a new ImageComponent2DURL from the provided
ImageComponent2D. This constructor will not call the AssetManager to load the
image, instead taking the image from the provide ImageComponent2D.
|
ImageComponent2DURL | public ImageComponent2DURL(int format, int width, int height, boolean byReference, boolean yUp, java.net.URL baseURL, String imageName)(Code) | | Constructs a 2D image component object using the specified
format, width, height, byReference flag, and yUp flag.
Default values are used for all other parameters.
Parameters: format - the image component format, one of: FORMAT_RGB,FORMAT_RGBA, etc. Parameters: width - the number of columns of pixels in this image componentobject Parameters: height - the number of rows of pixels in this image componentobject Parameters: byReference - a flag that indicates whether the data is copiedinto this image component object or is accessed by reference. Parameters: yUp - a flag that indicates the y-orientation of this imagecomponent. If yUp is set to true, the origin of the image isthe lower left; otherwise, the origin of the image is the upperleft. Parameters: baseURL - The base URL for the image location Parameters: imageName - The path and name of the image exception: IllegalArgumentException - if format is invalid, or ifwidth or height are not positive. |
ImageComponent2DURL | public ImageComponent2DURL(int format, int width, int height, boolean byReference, boolean yUp, java.net.URL baseURL, String imageName, boolean dontUseAssetManager)(Code) | | Constructs a 2D image component object using the specified
format, width, height, byReference flag, and yUp flag.
Default values are used for all other parameters.
If dontUseAssetManager is true then the constructor will not use
the asset manager to load the image.
Parameters: format - the image component format, one of: FORMAT_RGB,FORMAT_RGBA, etc. Parameters: width - the number of columns of pixels in this image componentobject Parameters: height - the number of rows of pixels in this image componentobject Parameters: byReference - a flag that indicates whether the data is copiedinto this image component object or is accessed by reference. Parameters: yUp - a flag that indicates the y-orientation of this imagecomponent. If yUp is set to true, the origin of the image isthe lower left; otherwise, the origin of the image is the upperleft. Parameters: baseURL - The base URL for the image location Parameters: imageName - The path and name of the image exception: IllegalArgumentException - if format is invalid, or ifwidth or height are not positive. |
getAssetManager | public static AssetManager getAssetManager()(Code) | | Get the current asset manager.
|
getBaseURL | public java.net.URL getBaseURL()(Code) | | Get the Base URL for this image component
TheURL for this image component |
getImageName | public String getImageName()(Code) | | Get the name of the image
The baseURL prepended to the name will give the full
URL of the image
|
setAssetManager | public static void setAssetManager(AssetManager manager)(Code) | | Set the asset manager to handle all ImageComponent2DURL objects.
|
setBaseURL | public void setBaseURL(java.net.URL url)(Code) | | Set the Base URL for this image component
Parameters: url - The URL for the image component |
setImageName | public void setImageName(String imageName)(Code) | | Set the name of the image
The baseURL prepended to the name will give the full
URL of the image
|
Methods inherited from javax.media.j3d.ImageComponent2D | public NodeComponent cloneNodeComponent()(Code)(Java Doc) public BufferedImage getImage()(Code)(Java Doc) public NioImageBuffer getNioImage()(Code)(Java Doc) public RenderedImage getRenderedImage()(Code)(Java Doc) public void set(BufferedImage image)(Code)(Java Doc) public void set(RenderedImage image)(Code)(Java Doc) public void set(NioImageBuffer image)(Code)(Java Doc) public void setSubImage(RenderedImage image, int width, int height, int srcX, int srcY, int dstX, int dstY)(Code)(Java Doc) public void updateData(Updater updater, int x, int y, int width, int height)(Code)(Java Doc)
|
|
|