All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ca.bc.europa.awt.ImagePanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----ca.bc.europa.awt.ImagePanel

public class ImagePanel
extends Panel
implements Runnable

The ImagePanel class displays an image in the background.

The ImagePanel loads the input panel and uses double buffering to eliminate flicker during display of the panel and its subcomponents.

See Also:
Container, Runnable

Constructor Index

 o ImagePanel()
Create an ImagePanel.
 o ImagePanel(Image, int, int)
Create an ImagePanel
 o ImagePanel(int, int)
Create an ImagePanel with a solid color, set with setBackground(Color).
 o ImagePanel(URL, int, int)
Create an ImagePanel

Method Index

 o getPreferredSize()
 o paint(Graphics)
 o run()
 o setImage(Image)
 o update(Graphics)

Constructors

 o ImagePanel
 public ImagePanel(URL imageURL,
                   int w,
                   int h)
Create an ImagePanel

Parameters:
imageURL - A URL to a background image that will be displayed.
w - The width of the panel. The image is NOT resized to fit the component.
h - The height of the panel. The image is NOT resized to fit the component.
 o ImagePanel
 public ImagePanel(Image image,
                   int w,
                   int h)
Create an ImagePanel

Parameters:
image - An image that will be displayed in the background.
w - The width of the panel. The image is NOT resized to fit the component.
h - The height of the panel. The image is NOT resized to fit the component.
 o ImagePanel
 public ImagePanel(int w,
                   int h)
Create an ImagePanel with a solid color, set with setBackground(Color).

Parameters:
w - The width of the panel. The image is NOT resized to fit the component.
h - The height of the panel. The image is NOT resized to fit the component.
 o ImagePanel
 public ImagePanel()
Create an ImagePanel.

Methods

 o setImage
 public void setImage(Image image)
 o getPreferredSize
 public Dimension getPreferredSize()
Overrides:
getPreferredSize in class Container
 o update
 public void update(Graphics g)
Overrides:
update in class Container
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o run
 public synchronized void run()

All Packages  Class Hierarchy  This Package  Previous  Next  Index