hexIT
Class DrawableAdapter

java.lang.Object
  extended byhexIT.DrawableAdapter
All Implemented Interfaces:
Drawable

public class DrawableAdapter
extends java.lang.Object
implements Drawable

A DrawableAdapater is a simple implementation of the Drawable interface. It can be extended to make easily custom drawable objects.


Constructor Summary
DrawableAdapter()
          Creates a drawable adapter with no associated image.
DrawableAdapter(java.lang.String new_imgFilename)
          Creates a new drawable adapter loading the specified image file as this drawable object's image.
 
Method Summary
 java.awt.Image getImage()
          Get the image associated with this drawable object.
 void setImage(java.awt.Image new_img)
          Set the image associated with this drawable object.
 void setImage(java.lang.String filename)
          Set the image associated with this drawable object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableAdapter

public DrawableAdapter(java.lang.String new_imgFilename)
Creates a new drawable adapter loading the specified image file as this drawable object's image. Supported filenames are all those supported by ImageTools.loadImage().


DrawableAdapter

public DrawableAdapter()
Creates a drawable adapter with no associated image.

Method Detail

getImage

public java.awt.Image getImage()
Get the image associated with this drawable object.

Specified by:
getImage in interface Drawable

setImage

public void setImage(java.awt.Image new_img)
Set the image associated with this drawable object.

Specified by:
setImage in interface Drawable

setImage

public void setImage(java.lang.String filename)
Set the image associated with this drawable object.