|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--javax.media.jai.widget.ImageCanvas
A simple output widget for a RenderedImage. ImageCanvas subclasses java.awt.Canvas, and can be used in any context that calls for a Canvas. It monitors resize and update events and automatically requests tiles from its source on demand. Any displayed area outside the image is displayed in grey.
There is currently no policy regarding what sorts of widgets, if any, will be part of JAI.
Due to the limitations of BufferedImage, only TYPE_BYTE of band 1, 2, 3, 4, and TYPE_USHORT of band 1, 2, 3 images can be displayed using this widget.
Inner Class Summary | |
static interface |
ImageCanvas.PaintListener
Deprecated. An interface used to notify listeners during a paint
just after the image has been painted on the image canvas. |
Inner classes inherited from class java.awt.Canvas |
Canvas.AccessibleAWTCanvas |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent |
Field Summary | |
protected int |
canvasHeight
Deprecated. The height of the canvas. |
protected int |
canvasWidth
Deprecated. The width of the canvas. |
protected ColorModel |
colorModel
Deprecated. The image's ColorModel or one we supply. |
protected boolean |
drawBorder
Deprecated. |
protected RenderedImage |
im
Deprecated. The source RenderedImage. |
protected int |
imHeight
Deprecated. |
protected int |
imWidth
Deprecated. |
protected int |
maxTileX
Deprecated. The image's max X tile. |
protected int |
maxTileY
Deprecated. The image's max Y tile. |
protected int |
minTileX
Deprecated. The image's min X tile. |
protected int |
minTileY
Deprecated. The image's min Y tile. |
protected int |
originX
Deprecated. The pixel to display in the upper left corner or the canvas. |
protected int |
originY
Deprecated. The pixel to display in the upper left corner or the canvas. |
protected int |
padX
Deprecated. used to center image in it's container |
protected int |
padY
Deprecated. |
protected SampleModel |
sampleModel
Deprecated. The image's SampleModel. |
protected int |
tileGridXOffset
Deprecated. The image's tile grid X offset. |
protected int |
tileGridYOffset
Deprecated. The image's tile grid Y offset. |
protected int |
tileHeight
Deprecated. The image's tile height. |
protected int |
tileWidth
Deprecated. The image's tile width. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ImageCanvas(RenderedImage im)
Deprecated. Constructs an ImageCanvas to display a RenderedImage. |
|
ImageCanvas(RenderedImage im,
boolean drawBorder)
Deprecated. Constructs an ImageCanvas to display a RenderedImage. |
Method Summary | |
void |
addNotify()
Deprecated. |
void |
addPaintListener(ImageCanvas.PaintListener pl)
Deprecated. Adds the specified PaintListener to the canvas. |
Dimension |
getMaximumSize()
Deprecated. |
Dimension |
getMinimumSize()
Deprecated. |
Dimension |
getPreferredSize()
Deprecated. |
int |
getXOrigin()
Deprecated. |
int |
getXPad()
Deprecated. |
int |
getYOrigin()
Deprecated. |
int |
getYPad()
Deprecated. |
void |
paint(Graphics g)
Deprecated. Paint the image onto a Graphics object. |
void |
removePaintListener(ImageCanvas.PaintListener pl)
Deprecated. Removes the specified PaintListener from the canvas. |
void |
set(RenderedImage im)
Deprecated. Changes the source image to a new RenderedImage. |
void |
setBounds(int x,
int y,
int width,
int height)
Deprecated. Records a new size. |
void |
setOrigin(int x,
int y)
Deprecated. Changes the pixel to set Origin at x,y |
void |
update(Graphics g)
Deprecated. There is no need to erase prior to drawing, so we override the default update method to simply call paint(). |
Methods inherited from class java.awt.Canvas |
getAccessibleContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected RenderedImage im
protected SampleModel sampleModel
protected ColorModel colorModel
protected int minTileX
protected int maxTileX
protected int minTileY
protected int maxTileY
protected int tileWidth
protected int tileHeight
protected int tileGridXOffset
protected int tileGridYOffset
protected int imWidth
protected int imHeight
protected int padX
protected int padY
protected boolean drawBorder
protected int originX
protected int originY
protected int canvasWidth
protected int canvasHeight
Constructor Detail |
public ImageCanvas(RenderedImage im, boolean drawBorder)
im
- a RenderedImage to be displayed.drawBorder
- true if a raised border is desired.public ImageCanvas(RenderedImage im)
im
- a RenderedImage to be displayed.Method Detail |
public void addNotify()
addNotify
in class Canvas
public void set(RenderedImage im)
public void setOrigin(int x, int y)
public int getXOrigin()
public int getYOrigin()
public int getXPad()
public int getYPad()
public Dimension getMinimumSize()
getMinimumSize
in class Component
public Dimension getPreferredSize()
getPreferredSize
in class Component
public Dimension getMaximumSize()
getMaximumSize
in class Component
public void setBounds(int x, int y, int width, int height)
setBounds
in class Component
public void update(Graphics g)
update
in class Component
public void paint(Graphics g)
paint
in class Canvas
public void addPaintListener(ImageCanvas.PaintListener pl)
PaintListener
to the canvas.public void removePaintListener(ImageCanvas.PaintListener pl)
PaintListener
from the canvas.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |