Class spt.gui.ImagePanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spt.gui.ImagePanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----spt.gui.ImagePanel

public class ImagePanel
extends Panel
A Panel that displays an Image.

Constructor Index

 o ImagePanel(String)
Creates an ImagePanel with the image in the specified file (no good for applets).
 o ImagePanel(Applet, URL)
Creates an ImagePanel with the image in the specified URL (applets only).

Method Index

 o createDisabledImage(Image, Component)
Return a "grayed-out" version of the given image.
 o disableImage()
 o getImage()
 o loadImage(Component, String)
Load an image.
 o loadImage(Applet, URL)
Load an image.
 o paint(Graphics)
 o resizeToImage()
Resize the Panel to the size of the current image.
 o scale(double)
Scale the image.

Constructors

 o ImagePanel
  public ImagePanel(String file) throws FileNotFoundException
Creates an ImagePanel with the image in the specified file (no good for applets).
 o ImagePanel
  public ImagePanel(Applet a,
                    URL file)
Creates an ImagePanel with the image in the specified URL (applets only).

Methods

 o loadImage
  public static Image loadImage(Component comp,
                                String file) throws FileNotFoundException
Load an image.
 o loadImage
  public static Image loadImage(Applet a,
                                URL file)
Load an image.
 o createDisabledImage
  public static Image createDisabledImage(Image im,
                                          Component comp)
Return a "grayed-out" version of the given image.
 o disableImage
  public void disableImage()
 o getImage
  public Image getImage()
 o scale
  public void scale(double pct)
Scale the image. (1.0 = 100%).
 o resizeToImage
  public void resizeToImage()
Resize the Panel to the size of the current image.
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index