public class PictureBlockDisplay extends ScaledImageDisplay
PictureBlockDisplay object displays a
PictureBlock object, or any object with a
pictureIcon method, as a picture in a grid.| Constructor and Description |
|---|
PictureBlockDisplay()
Constructs a display object that can display grid objects that have
a
pictureIcon method. |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(GridObject obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Draws a unit-length object using an image.
|
getIcon, imageLoadedOK, setIconaddDecorator, adjust, draw, removeDecoratorpublic PictureBlockDisplay()
pictureIcon method.public void draw(GridObject obj, java.awt.Component comp, java.awt.Graphics2D g2)
adjust method to make further
adjustments (for example, rotating and tinting
the image) as appropriate.
(Precondition: obj has a pictureIcon method.)draw in class ScaledImageDisplayobj - object we want to drawcomp - component on which to drawg2 - drawing surface