|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
Test.ImageCanvas
public class 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.
This class has been deprecated. The source code has been moved to the samples/widget directory. These widgets are no longer supported.
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 |
---|
public ImageCanvas(java.awt.image.RenderedImage im, boolean drawBorder)
im
- a RenderedImage to be displayed.drawBorder
- true if a raised border is desired.public ImageCanvas(java.awt.image.RenderedImage im)
im
- a RenderedImage to be displayed.Method Detail |
---|
public void addNotify()
addNotify
in class java.awt.Canvas
public void set(java.awt.image.RenderedImage im)
public void setOrigin(int x, int y)
public int getXOrigin()
public int getYOrigin()
public int getXPad()
public int getYPad()
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class java.awt.Component
public void setBounds(int x, int y, int width, int height)
setBounds
in class java.awt.Component
public void update(java.awt.Graphics g)
update
in class java.awt.Canvas
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |