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
-
ImagePanel(Applet, String)
- Constructor.
-
minimumSize()
- I assume this doesn't get used much.
-
paint(Graphics)
-
Ye olde paint method used to actually draw the image and
nothing more.
-
preferredSize()
- This is the one I expect to get called.
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
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
minimumSize
public Dimension minimumSize()
- I assume this doesn't get used much.
- Returns:
- a minimum Dimension for the panel
- Overrides:
- minimumSize in class Container
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