visad.bom.annotations
Class ImageJ3D
- java.lang.Object
-
- visad.bom.annotations.ImageJ3D
-
- All Implemented Interfaces:
- ScreenAnnotation
public class ImageJ3D extends java.lang.Object implements ScreenAnnotation
Meant to encapsulate information representing an Image which is going to be rendered on a VisAD display without being subject to the usual VisAD transformations. Thus the Image should stick in Screen Coordinates.
-
-
Field Summary
Fields Modifier and Type Field and Description static intBOTTOM_LEFTImage bottom left positioned on x, ystatic intBOTTOM_RIGHTImage bottom right positioned on x, ystatic intCENTERImage centre positioned on x, ystatic intTOP_LEFTImage top left positioned on x, ystatic intTOP_RIGHTImage top right positioned on x, y
-
Constructor Summary
Constructors Constructor and Description ImageJ3D(java.awt.Image image, int position, int x, int y, double zValue, double scaleFactor)Constructs a ImageJ3D from specified values in screen coordinates.ImageJ3D(java.lang.String filename, int position, int x, int y, double zValue, double scaleFactor)Constructs a ImageJ3D from specified values in screen coordinates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidsetImage(java.awt.Image image)Set the Image for this object.voidsetImageJ3Ds(int x, int y)Set coordinates for the ImageJ3D.voidsetPosition(int position)Set the relative position for this object.voidsetScaleFactor(double scaleFactor)Set the amount to magnify the image.voidsetZValue(double zValue)java.lang.ObjecttoDrawable(DisplayImpl display)Make the Object into aShape3D.
-
-
-
Field Detail
-
TOP_LEFT
public static final int TOP_LEFT
Image top left positioned on x, y- See Also:
- Constant Field Values
-
TOP_RIGHT
public static final int TOP_RIGHT
Image top right positioned on x, y- See Also:
- Constant Field Values
-
BOTTOM_RIGHT
public static final int BOTTOM_RIGHT
Image bottom right positioned on x, y- See Also:
- Constant Field Values
-
BOTTOM_LEFT
public static final int BOTTOM_LEFT
Image bottom left positioned on x, y- See Also:
- Constant Field Values
-
CENTER
public static final int CENTER
Image centre positioned on x, y- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImageJ3D
public ImageJ3D(java.lang.String filename, int position, int x, int y, double zValue, double scaleFactor) throws VisADExceptionConstructs a ImageJ3D from specified values in screen coordinates.- Parameters:
filename- of a valid GIF, JPEG or PNG file.position- how to place the image relative to (x, y); one of Image.TOP_LEFT (default), Image.TOP_RIGHT, Image.BOTTOM_RIGHT, Image.BOTTOM_LEFT, Image.CENTERx- x screen coordinate of image location.y- y screen coordinate of image location.zValue- Virtual world value; larger z is in front.scaleFactor- scale factor for image magnification; greater than 0.0.- Throws:
VisADException- if the Image is bad.
-
ImageJ3D
public ImageJ3D(java.awt.Image image, int position, int x, int y, double zValue, double scaleFactor) throws VisADExceptionConstructs a ImageJ3D from specified values in screen coordinates.- Parameters:
image- base java.awt.Image object to represent.position- how to place the image relative to (x, y); one of Image.TOP_LEFT (default), Image.TOP_RIGHT, Image.BOTTOM_RIGHT, Image.BOTTOM_LEFT, Image.CENTERx- x screen coordinate of image location.y- y screen coordinate of image location.zValue- Virtual world value; larger z is in front.scaleFactor- scale factor for image magnification; greater than 0.0.- Throws:
VisADException- if the Image is bad.
-
-
Method Detail
-
setImage
public void setImage(java.awt.Image image) throws VisADExceptionSet the Image for this object.- Parameters:
image- base java.awt.Image object to represent.- Throws:
VisADException- if the Image is bad.
-
setPosition
public void setPosition(int position)
Set the relative position for this object.- Parameters:
position- how to place the image relative to (x, y); one of Image.TOP_LEFT (default), Image.TOP_RIGHT, Image.BOTTOM_RIGHT, Image.BOTTOM_LEFT, Image.CENTER
-
setScaleFactor
public void setScaleFactor(double scaleFactor)
Set the amount to magnify the image.- Parameters:
scaleFactor- scale factor for image magnification; greater than 0.0.
-
setImageJ3Ds
public void setImageJ3Ds(int x, int y)Set coordinates for the ImageJ3D.- Parameters:
x- x screen coordinate of image location.y- y screen coordinate of image location.
-
setZValue
public void setZValue(double zValue)
- Parameters:
zValue- Virtual world value; larger z is in front.
-
toDrawable
public java.lang.Object toDrawable(DisplayImpl display) throws VisADException
Description copied from interface:ScreenAnnotationMake the Object into aShape3D.- Specified by:
toDrawablein interfaceScreenAnnotation- Parameters:
display- the VisAD display for this Image.- Returns:
- the Image description as a Shape3D object.
- Throws:
VisADException- if there is a VisAD problem.
-
-
DMelt 3.0 © DataMelt by jWork.ORG