Class ImageCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ImageCanvas
- public class ImageCanvas
- extends Canvas
-
ImageCanvas(Image)
- Constructs component with given image on its background.
-
getMinimumSize()
- Gets the mininimum size of this component.
-
getPreferredSize()
-
Gets the preferred size of this component.
-
paint(Graphics)
- This method is called to draw this component.
-
update(Graphics)
-
Updates this component.
ImageCanvas
public ImageCanvas(Image image)
- Constructs component with given image on its background.
- Parameters:
- image - image to show.
paint
public void paint(Graphics g)
- This method is called to draw this component. Draws image over the canvas.
- Parameters:
- g - the graphics context.
- Overrides:
- paint in class Canvas
- See Also:
- Graphics
update
public void update(Graphics g)
- Updates this component.
- Parameters:
- g - the specified context to use for updating.
- Overrides:
- update in class Component
getMinimumSize
public Dimension getMinimumSize()
- Gets the mininimum size of this component.
- Returns:
- A dimension object indicating this component's minimum size.
- Overrides:
- getMinimumSize in class Component
getPreferredSize
public Dimension getPreferredSize()
- Gets the preferred size of this component.
- Returns:
- A dimension object indicating this component's preferred size.
- Overrides:
- getPreferredSize in class Component