Class dpscomponents.panel.ImagePanel
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dpscomponents.panel.ImagePanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----dpscomponents.panel.ImagePanel

public class ImagePanel
extends Panel
This is a (hopefully general) class used to turn images into "layout-able" components with a definite size.
Version:
1.0 03-04-97
Author:
Daren Stotler

Constructor Index

 o ImagePanel(Applet, String)
Constructor.

Method Index

 o minimumSize()
I assume this doesn't get used much.
 o paint(Graphics)
Ye olde paint method used to actually draw the image and nothing more.
 o preferredSize()
This is the one I expect to get called.

Constructors

 o ImagePanel
  public ImagePanel(Applet foo,
                    String img_name)
Constructor. Use Applet here to make this more general.
Parameters:
foo - Applet which provides the CodeBase needed to read the image
img_name - String containing the name of the image to be read

Methods

 o paint
  public void paint(Graphics g)
Ye olde paint method used to actually draw the image and nothing more.
Parameters:
g - Graphics context where the image will be drawn
Overrides:
paint in class Component
 o minimumSize
  public Dimension minimumSize()
I assume this doesn't get used much.
Returns:
a minimum Dimension for the panel
Overrides:
minimumSize in class Container
 o preferredSize
  public Dimension preferredSize()
This is the one I expect to get called.
Returns:
the preferred Dimension of the panel; same as the image size
Overrides:
preferredSize in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index