|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--gov.lanl.Pids.ImageCanvas
The class ImageCanvas implements a display canvas for images.
| 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 im)
constructs an image canvas for a given image |
|
ImageCanvas(java.awt.Image im,
boolean icon)
creates an image canvas for a given image and resizes it to icon size if necessary |
|
ImageCanvas(java.awt.Image im,
int x,
int y)
constructs an image canvas of a specified size |
|
ImageCanvas(java.net.URL base,
java.lang.String ref)
creates an ImageCanvas from the image at this URL, full size |
|
ImageCanvas(java.net.URL base,
java.lang.String ref,
boolean icon)
creates an ImageCanvas from the image at this URL, icon size |
|
| Method Summary | |
int |
getHeight()
gets the height of the image displayed on the canvas |
int |
getWidth()
gets the width of the image displayed on the canvas |
void |
paint(java.awt.Graphics g)
draws the image in the canvas |
void |
reset(java.awt.Image im)
changes the image displayed on the canvas and repaints the image canvas |
void |
reset(java.awt.Image im,
int x,
int y)
changes the image displayed on the canvas, resizes the images, and repaints the image canvas |
void |
update(java.awt.Graphics g)
overwrites the component updates to prevent erasing, i.e., flickering |
| Methods inherited from class java.awt.Canvas |
addNotify, 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, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ImageCanvas(java.net.URL base,
java.lang.String ref)
base - the base URLref - the image filename from the base URL
public ImageCanvas(java.net.URL base,
java.lang.String ref,
boolean icon)
base - the base URLref - the image filename from the base URLicon - if true resize for iconpublic ImageCanvas(java.awt.Image im)
im - the image
public ImageCanvas(java.awt.Image im,
int x,
int y)
im - the image to usex - the size in the x directiony - the size in the y direction
public ImageCanvas(java.awt.Image im,
boolean icon)
im - the imageicon - if true resize to an icon| Method Detail |
public void reset(java.awt.Image im)
im - the image to use
public void reset(java.awt.Image im,
int x,
int y)
im - the image to usex - the width to resize toy - the height to resize topublic void paint(java.awt.Graphics g)
paint in class java.awt.Canvasg - the graphics contextpublic int getWidth()
getWidth in class java.awt.Componentpublic int getHeight()
getHeight in class java.awt.Componentpublic void update(java.awt.Graphics g)
update in class java.awt.Canvas
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||