All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.figures.ImageFigure

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.figures.AttributeFigure
                   |
                   +----CH.ifa.draw.figures.ImageFigure

public class ImageFigure
extends AttributeFigure
implements ImageObserver
A Figure that shows an Image. Images shown by an image figure are shared by using the Iconkit.

See Also:
Iconkit

Constructor Index

 o ImageFigure()
 o ImageFigure(Image, String, Point)

Method Index

 o basicDisplayBox(Point, Point)
Sets the display box of a figure.
 o basicMoveBy(int, int)
Moves the figure.
 o displayBox()
Gets the display box of a figure.
 o draw(Graphics)
Draws the figure in the given graphics.
 o handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes.
 o imageUpdate(Image, int, int, int, int, int)
Handles asynchroneous image updates.
 o read(StorableInput)
Reads the ImageFigure from a StorableInput.
 o write(StorableOutput)
Writes the ImageFigure to a StorableOutput.

Constructors

 o ImageFigure
 public ImageFigure()
 o ImageFigure
 public ImageFigure(Image image,
                    String fileName,
                    Point origin)

Methods

 o basicDisplayBox
 public void basicDisplayBox(Point origin,
                             Point corner)
Sets the display box of a figure.

Overrides:
basicDisplayBox in class AbstractFigure
 o handles
 public Vector handles()
Returns the handles of a Figure that can be used to manipulate some of its attributes.

Overrides:
handles in class AbstractFigure
 o displayBox
 public Rectangle displayBox()
Gets the display box of a figure.

Overrides:
displayBox in class AbstractFigure
 o basicMoveBy
 protected void basicMoveBy(int x,
                            int y)
Moves the figure.

Overrides:
basicMoveBy in class AbstractFigure
 o draw
 public void draw(Graphics g)
Draws the figure in the given graphics.

Overrides:
draw in class AttributeFigure
 o imageUpdate
 public boolean imageUpdate(Image img,
                            int flags,
                            int x,
                            int y,
                            int w,
                            int h)
Handles asynchroneous image updates.

 o write
 public void write(StorableOutput dw)
Writes the ImageFigure to a StorableOutput. Only a reference to the image, that is its pathname is saved.

Overrides:
write in class AttributeFigure
 o read
 public void read(StorableInput dr) throws IOException
Reads the ImageFigure from a StorableInput. It registers the referenced figure to be loaded from the Iconkit.

Overrides:
read in class AttributeFigure
See Also:
registerImage

All Packages  Class Hierarchy  This Package  Previous  Next  Index