Test
Class ImageCanvas

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Canvas
          extended by Test.ImageCanvas
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

Deprecated. as of 1.1

public class ImageCanvas
extends java.awt.Canvas

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.

This class has been deprecated. The source code has been moved to the samples/widget directory. These widgets are no longer supported.

See Also:
Serialized Form

Field Summary
 
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(java.awt.image.RenderedImage im)
          Deprecated. Constructs an ImageCanvas to display a RenderedImage.
ImageCanvas(java.awt.image.RenderedImage im, boolean drawBorder)
          Deprecated. Constructs an ImageCanvas to display a RenderedImage.
 
Method Summary
 void addNotify()
          Deprecated.  
 java.awt.Dimension getMaximumSize()
          Deprecated.  
 java.awt.Dimension getMinimumSize()
          Deprecated.  
 java.awt.Dimension getPreferredSize()
          Deprecated.  
 int getXOrigin()
          Deprecated.  
 int getXPad()
          Deprecated.  
 int getYOrigin()
          Deprecated.  
 int getYPad()
          Deprecated.  
 void paint(java.awt.Graphics g)
          Deprecated. Paint the image onto a Graphics object.
 void set(java.awt.image.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(java.awt.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
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageCanvas

public ImageCanvas(java.awt.image.RenderedImage im,
                   boolean drawBorder)
Deprecated. 
Constructs an ImageCanvas to display a RenderedImage.

Parameters:
im - a RenderedImage to be displayed.
drawBorder - true if a raised border is desired.

ImageCanvas

public ImageCanvas(java.awt.image.RenderedImage im)
Deprecated. 
Constructs an ImageCanvas to display a RenderedImage.

Parameters:
im - a RenderedImage to be displayed.
Method Detail

addNotify

public void addNotify()
Deprecated. 
Overrides:
addNotify in class java.awt.Canvas

set

public void set(java.awt.image.RenderedImage im)
Deprecated. 
Changes the source image to a new RenderedImage.


setOrigin

public void setOrigin(int x,
                      int y)
Deprecated. 
Changes the pixel to set Origin at x,y


getXOrigin

public int getXOrigin()
Deprecated. 

getYOrigin

public int getYOrigin()
Deprecated. 

getXPad

public int getXPad()
Deprecated. 

getYPad

public int getYPad()
Deprecated. 

getMinimumSize

public java.awt.Dimension getMinimumSize()
Deprecated. 
Overrides:
getMinimumSize in class java.awt.Component

getPreferredSize

public java.awt.Dimension getPreferredSize()
Deprecated. 
Overrides:
getPreferredSize in class java.awt.Component

getMaximumSize

public java.awt.Dimension getMaximumSize()
Deprecated. 
Overrides:
getMaximumSize in class java.awt.Component

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Deprecated. 
Records a new size. Called by the AWT.

Overrides:
setBounds in class java.awt.Component

update

public void update(java.awt.Graphics g)
Deprecated. 
There is no need to erase prior to drawing, so we override the default update method to simply call paint().

Overrides:
update in class java.awt.Canvas

paint

public void paint(java.awt.Graphics g)
Deprecated. 
Paint the image onto a Graphics object. The painting is performed tile-by-tile, and includes a grey region covering the unused portion of image tiles as well as the general background.

Overrides:
paint in class java.awt.Canvas