|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.gridworld.gui.AbstractDisplay
info.gridworld.gui.ImageDisplay
public class ImageDisplay
An ImageDisplay displays an object as a tinted image from an image file whose
name matches the class name.
This code is not tested on the AP CS A and AB exams. It contains GUI
implementation details that are not intended to be understood by AP CS
students.
| Constructor Summary | |
|---|---|
ImageDisplay(java.lang.Class cl)
Constructs an object that knows how to display an image. |
|
| Method Summary | |
|---|---|
void |
draw(java.lang.Object obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
Draws a unit-length object facing North. |
| Methods inherited from class info.gridworld.gui.AbstractDisplay |
|---|
draw, getProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageDisplay(java.lang.Class cl)
throws java.io.IOException
cl - name of class from which to construct a search string.
java.io.IOException| Method Detail |
|---|
public void draw(java.lang.Object obj,
java.awt.Component comp,
java.awt.Graphics2D g2)
draw in class AbstractDisplayobj - object we want to drawcomp - the component we're drawing ong2 - drawing surface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||