All Packages Class Hierarchy This Package Previous Next Index
Class ca.bc.europa.awt.ImageLabel
java.lang.Object
|
+----java.awt.Component
|
+----ca.bc.europa.awt.ImageLabel
- public class ImageLabel
- extends Component
- implements Runnable
The ImageLabel
class displays an image.
The image is either specified as an Image object, or a URL is
supplied to the image. A separate thread is spawned to ensure that
the image is loaded as soon as possible.
- See Also:
- Component, Runnable
-
ImageLabel()
- Create an ImageLabel.
-
ImageLabel(Image, int, int)
- Create an ImageLabel.
-
ImageLabel(int, int)
- Create an ImageLabel.
-
ImageLabel(URL, int, int)
- Create an ImageLabel
-
getPreferredSize()
- Get the preferred component size.
-
paint(Graphics)
- Draw the component.
-
run()
-
-
setImage(Image)
- Set the image to be displayed.
-
update(Graphics)
- Update display.
ImageLabel
public ImageLabel(URL imageURL,
int w,
int h)
- Create an ImageLabel
- Parameters:
- imageURL - A URL to the image that will be displayed.
- w - The width of the component. The image is NOT resized to
fit the component.
- h - The height of the component. The image is NOT resized to
fit the component.
ImageLabel
public ImageLabel(Image im,
int w,
int h)
- Create an ImageLabel.
- Parameters:
- w - The component width.
- h - The component height.
- im - The image to display.
ImageLabel
public ImageLabel(int w,
int h)
- Create an ImageLabel.
- Parameters:
- w - The componenet width.
- h - The component height.
ImageLabel
public ImageLabel()
- Create an ImageLabel.
setImage
public void setImage(Image im)
- Set the image to be displayed.
- Parameters:
- im - The image to be displayed.
getPreferredSize
public Dimension getPreferredSize()
- Get the preferred component size.
- Overrides:
- getPreferredSize in class Component
- See Also:
- Component
update
public void update(Graphics g)
- Update display.
- Overrides:
- update in class Component
- See Also:
- Component
paint
public void paint(Graphics g)
- Draw the component.
- Overrides:
- paint in class Component
- See Also:
- Component
run
public synchronized void run()
All Packages Class Hierarchy This Package Previous Next Index