Class BoundedImage

All Implemented Interfaces:
ImageObserver, Drawable, Interactive, Measurable, Selectable
Direct Known Subclasses:
BoundedTextLine

public class BoundedImage extends BoundedShape implements ImageObserver
An image is bounded by hot spots for dragging and resizing.
Version:
1.0
Author:
W. Christian
  • Field Details

    • image

      protected Image image
  • Constructor Details

    • BoundedImage

      public BoundedImage(Image image, double x, double y)
      Constructs a bounded image centered at the given location.
      Parameters:
      x - double
      y - double
      image - Image
  • Method Details

    • draw

      public void draw(DrawingPanel panel, Graphics g)
      Draws the image.
      Specified by:
      draw in interface Drawable
      Overrides:
      draw in class BoundedShape
      Parameters:
      panel - the world in which the arrow is viewed
      g - the graphics context upon which to draw
    • imageUpdate

      public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height)
      Specified by:
      imageUpdate in interface ImageObserver