Class ImageCanvas

java.lang.Object
java.awt.Component
java.awt.Canvas
com.vividsolutions.wms.ui.ImageCanvas
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ImageCanvas extends Canvas
A simple canvas which draws a given image in the upper left corner of itself.
Author:
Chris Hodgson chodgson@refractions.net
See Also:
  • Constructor Details

    • ImageCanvas

      public ImageCanvas()
      Creates a new instance of ImageCanvas.
  • Method Details

    • setImage

      public void setImage(Image img)
      Sets the Image to be displayed on the canvas.
      Parameters:
      img - the Image to be displayed
    • paint

      public void paint(Graphics g)
      Paints its Image (if specified) in the upper-left hand corner of itself.
      Overrides:
      paint in class Canvas
      Parameters:
      g - the Graphics object on which to paint.