diva.canvas.toolbox
Class ImageFigure

java.lang.Object
  extended by diva.canvas.AbstractFigure
      extended by diva.canvas.toolbox.ImageFigure
All Implemented Interfaces:
CanvasComponent, Figure, VisibleComponent, UserObjectContainer

public class ImageFigure
extends AbstractFigure

A figure which draws a user-specified image.

Version:
$Revision: 1.7 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu)

Constructor Summary
ImageFigure()
          Create an empty image figure.
ImageFigure(Image i)
          Create an image figure displaying the given image.
 
Method Summary
 Image getImage()
          Return the figure's image.
 Shape getShape()
          Return the rectangular shape of the image, or a small rectangle if the image is null.
 void paint(Graphics2D g)
          Paint the figure's image.
 void setImage(Image i)
          Set the figure's image.
 void transform(AffineTransform t)
          Perform an affine transform on this image.
 
Methods inherited from class diva.canvas.AbstractFigure
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, hit, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisible, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFigure

public ImageFigure()
Create an empty image figure.


ImageFigure

public ImageFigure(Image i)
Create an image figure displaying the given image.

Method Detail

getImage

public Image getImage()
Return the figure's image.


getShape

public Shape getShape()
Return the rectangular shape of the image, or a small rectangle if the image is null.

Specified by:
getShape in interface Figure
Specified by:
getShape in class AbstractFigure

paint

public void paint(Graphics2D g)
Paint the figure's image.

Specified by:
paint in interface VisibleComponent
Specified by:
paint in class AbstractFigure

setImage

public void setImage(Image i)
Set the figure's image.


transform

public void transform(AffineTransform t)
Perform an affine transform on this image.

Specified by:
transform in interface Figure
Specified by:
transform in class AbstractFigure


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.