scenic
Class SceneImage

java.lang.Object
  extended by scenic.SceneNode
      extended by scenic.SceneLeaf
          extended by scenic.SceneImage
All Implemented Interfaces:
ScenicImageObserver

public class SceneImage
extends SceneLeaf
implements ScenicImageObserver

This class is used to draw an image.


Constructor Summary
SceneImage(ScenicImage image)
          Creates a SceneImage object with the given image.
SceneImage(ScenicImage image, java.awt.geom.Rectangle2D sourceRect)
          Creates a SceneImage object with the given image.
 
Method Summary
 ScenicImage getImage()
          Gets the image.
 java.awt.geom.Rectangle2D getSourceRect()
          Gets the source rectangle.
 void setImage(ScenicImage image)
          Sets the image.
 void setSourceRect(java.awt.geom.Rectangle2D sourceRect)
          Sets the source rectangle.
 void update(ScenicImage image)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneImage

public SceneImage(ScenicImage image)
Creates a SceneImage object with the given image.

Parameters:
image - the image.

SceneImage

public SceneImage(ScenicImage image,
                  java.awt.geom.Rectangle2D sourceRect)
Creates a SceneImage object with the given image.

Parameters:
image - the image.
sourceRect - the part of the image that is displayed.
Method Detail

getImage

public ScenicImage getImage()
Gets the image.


setImage

public void setImage(ScenicImage image)
Sets the image.


getSourceRect

public java.awt.geom.Rectangle2D getSourceRect()
Gets the source rectangle. The source rectangle specifies the part of the image that is displayed. If the rectangle is null, the entire image is displayed.


setSourceRect

public void setSourceRect(java.awt.geom.Rectangle2D sourceRect)
Sets the source rectangle. The source rectangle specifies the part of the image that is displayed. If the rectangle is null, the entire image is displayed.


update

public void update(ScenicImage image)
Specified by:
update in interface ScenicImageObserver