Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.graphics
Class ImageView

    java.lang.Object
      ru.biosoft.graphics.View
          ru.biosoft.graphics.ImageView

All Implemented Interfaces:
  java.awt.image.ImageObserver

public class ImageView
extends View
implements java.awt.image.ImageObserver

Paints GIF or JPEG image. You can use `AffineTransform` to scale the image.

Field Summary
`protected java.awt.Image` | `image` Image.

Fields inherited from class ru.biosoft.graphics.View
`ACTIVE, at, BASELINE, BOTTOM, CENTER, HIDE, LEFT, model, RIGHT, shape, TOP, type`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`ImageView(java.awt.Image image, int x, int y)`
`ImageView(java.awt.Image image, int x, int y, int width, int height)` Constructs ImageView object for the specified Image object.

Method Summary
`boolean` | `imageUpdate(java.awt.Image img, int info, int x, int y, int width, int height)` Implements the image observer interface.
`void` | `move(int tx, int ty)` Move the image (left top corner) to specified point.
`void` | `paint(java.awt.Graphics2D g2)` Paints this view on specified Graphics2D.
`protected void` | `validateImageSize()`

Methods inherited from class ru.biosoft.graphics.View
`getBounds, getModel, getShape, intersects, isActive, isVisible, move, scale, setActive, setLocation, setLocation, setModel, setToScale, setVisible, updateBounds`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### image

    protected java.awt.Image image

  Image.

Constructor Detail

### ImageView

    public ImageView(java.awt.Image image,
                     int x,
                     int y,
                     int width,
                     int height)

  Constructs ImageView object for the specified Image object. If width or height less then 1, then they will be initialized using `Image.getWidth(java.awt.image.ImageObserver)` and `Image.getHeight(java.awt.image.ImageObserver)` methods.

### ImageView

    public ImageView(java.awt.Image image,
                     int x,
                     int y)

Method Detail

### imageUpdate

    public boolean imageUpdate(java.awt.Image img,
                               int info,
                               int x,
                               int y,
                               int width,
                               int height)

  Implements the image observer interface.

  Specified by:
    `imageUpdate` in interface `java.awt.image.ImageObserver`

### validateImageSize

    protected void validateImageSize()

### move

    public void move(int tx,
                     int ty)

  Move the image (left top corner) to specified point.

  Specified by:
    `move` in class `View`
  Parameters:
    `tx` - offset along the X axis direction.
    `ty` - offset along the Y axis direction.

### paint

    public void paint(java.awt.Graphics2D g2)

  Description copied from class: `View`
  Paints this view on specified Graphics2D.

  Overrides:
    `paint` in class `View`
  Parameters:
    `g2` - specified Graphics2D.

Overview | Package | Class | Use | Tree | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.