## demo.webcab.chat.gui
Class ImagePanel

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Canvas
                  |
                  +--demo.webcab.chat.gui.ImagePanel

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ImagePanel
extends java.awt.Canvas
implements java.io.Serializable

This class represents the canvas which draws an image. So instead of drawing an image, you add it like a component. This class is supposed to be used internally, so no further documentation will be provided.

Author:
  WebCab Components
See Also:
  Serialized Form

Inner classes inherited from class java.awt.Canvas
`java.awt.Canvas.AccessibleAWTCanvas`

Inner classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent`

Field Summary
`static int` `FLAG_NONE`
`static int` `FLAG_SPREAD`

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
`ImagePanel(int width, int height)`
`ImagePanel(int width, int height, int imgFlag)`

Method Summary
`void` `backup(java.awt.Image backupImage)`
`java.awt.Dimension` `getImageDimension()`
`int` `getImgFlag()`
`java.awt.Dimension` `getMinimumSize()`
`java.awt.Dimension` `getPreferredSize()`
`boolean` `hasImage()`
`static boolean` `isImageValid(java.awt.Image img, java.awt.Component listener)`
`void` `newImage(java.awt.Image givenImage)`
`void` `newImage(java.lang.String fileAddress)`
`void` `newImage(java.net.URL url, java.lang.String name)`
`void` `paint(java.awt.Graphics g)`
`void` `refresh()`
`void` `setBounds(int x, int y, int w, int h)`
`void` `setDimensions(java.awt.Dimension dim)`
`void` `setImgFlag(int flag)`
`void` `update(java.awt.Graphics g)`

Methods inherited from class java.awt.Canvas
`addNotify, getAccessibleContext`

Methods inherited from class java.awt.Component

`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FLAG_NONE

    public static final int FLAG_NONE

### FLAG_SPREAD

    public static final int FLAG_SPREAD

Constructor Detail

### ImagePanel

    public ImagePanel(int width,
                      int height)

### ImagePanel

    public ImagePanel(int width,
                      int height,
                      int imgFlag)

Method Detail

### isImageValid

    public static boolean isImageValid(java.awt.Image img,
                                       java.awt.Component listener)

### setDimensions

    public void setDimensions(java.awt.Dimension dim)

### getMinimumSize

    public java.awt.Dimension getMinimumSize()

  Overrides:
    `getMinimumSize` in class `java.awt.Component`

### getPreferredSize

    public java.awt.Dimension getPreferredSize()

  Overrides:
    `getPreferredSize` in class `java.awt.Component`

### update

    public void update(java.awt.Graphics g)

  Overrides:
    `update` in class `java.awt.Component`

### hasImage

    public boolean hasImage()

### paint

    public void paint(java.awt.Graphics g)

  Overrides:
    `paint` in class `java.awt.Canvas`

### setImgFlag

    public void setImgFlag(int flag)

### getImgFlag

    public int getImgFlag()

### backup

    public void backup(java.awt.Image backupImage)

### getImageDimension

    public java.awt.Dimension getImageDimension()

### newImage

    public void newImage(java.awt.Image givenImage)

### newImage

    public void newImage(java.lang.String fileAddress)

### newImage

    public void newImage(java.net.URL url,
                         java.lang.String name)

### refresh

    public void refresh()

### setBounds

    public void setBounds(int x,
                          int y,
                          int w,
                          int h)

  Overrides:
    `setBounds` in class `java.awt.Component`