|
|||||||
| 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
|
+--demo.webcab.chat.gui.ImagePanel
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.
| 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 |
public static final int FLAG_NONE
public static final int FLAG_SPREAD
| Constructor Detail |
public ImagePanel(int width,
int height)
public ImagePanel(int width,
int height,
int imgFlag)
| Method Detail |
public static boolean isImageValid(java.awt.Image img,
java.awt.Component listener)
public void setDimensions(java.awt.Dimension dim)
public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic void update(java.awt.Graphics g)
update in class java.awt.Componentpublic boolean hasImage()
public void paint(java.awt.Graphics g)
paint in class java.awt.Canvaspublic void setImgFlag(int flag)
public int getImgFlag()
public void backup(java.awt.Image backupImage)
public java.awt.Dimension getImageDimension()
public void newImage(java.awt.Image givenImage)
public void newImage(java.lang.String fileAddress)
public void newImage(java.net.URL url,
java.lang.String name)
public void refresh()
public void setBounds(int x,
int y,
int w,
int h)
setBounds in class java.awt.Component
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||