|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--uchicago.src.sim.gui.Painter
|
+--uchicago.src.sim.gui.LocalPainter
Used by DisplaySurface to do the actual painting of displayables. A typical user should never use this class directly.
| Field Summary | |
protected boolean |
eraseBox
|
protected boolean |
firstDraw
|
protected BufferedImage |
origImage
|
protected int |
prevHeight
|
protected int |
prevWidth
|
protected int |
prevX
|
protected int |
prevY
|
| Fields inherited from class uchicago.src.sim.gui.Painter |
bgColor, buffImage, displayables, g2, height, origHeight, origWidth, simGraphics, surface, toolkit, width |
| Constructor Summary | |
LocalPainter()
Creates a LocalPainter. |
|
LocalPainter(DisplaySurface s,
int w,
int h)
Creates a LocalPainter using the specified displaySurface, and with the specified width and height. |
|
| Method Summary | |
void |
drawRect(Graphics g,
int x,
int y,
int rectWidth,
int rectHeight)
|
void |
eraseRect(Graphics g)
|
void |
paint(Graphics g)
Paints all the displayables on the screen in the order they were added to the display surface |
void |
takeSnapshot(DataOutputStream os)
Takes a snapshot of the current screen image and writes it to the specified output stream |
| Methods inherited from class uchicago.src.sim.gui.Painter |
addDisplayable, createBufferedImage, createGraphics2D, dispose, finalize, getCurrentImage, getGraphics, init, paintBackground, removeDisplayable, reSize, setBackgroundColor |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean firstDraw
protected BufferedImage origImage
protected int prevX
protected int prevY
protected int prevWidth
protected int prevHeight
protected boolean eraseBox
| Constructor Detail |
public LocalPainter()
public LocalPainter(DisplaySurface s,
int w,
int h)
s - the displaySurface associated with this LocalPainterw - the width of the painterh - the height of the painter| Method Detail |
public void eraseRect(Graphics g)
eraseRect in class Painter
public void drawRect(Graphics g,
int x,
int y,
int rectWidth,
int rectHeight)
drawRect in class Painterpublic void paint(Graphics g)
paint in class Painterpublic void takeSnapshot(DataOutputStream os)
takeSnapshot in class Painteros - the OutputStream to write the snapshot to
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||