|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.gui.Display2D
public abstract class Display2D
Base class for all discrete 2D displays. Encapsulates a Discrete2DSpace and allows that space to be displayed on a DisplaySurface. The typical user should not use this class directly. The objects in the Discrete2DSpace are displayed in cells whose dimensions can be programmaticly and graphicaly defined. The size (that is, the size in pixels) of a Display2D is the size of the Discrete2DSpace * the cell size.
DisplaySurface,
Discrete2DSpace| Field Summary | |
|---|---|
protected Discrete2DSpace |
grid
|
protected java.awt.Dimension |
size
|
| Fields inherited from interface uchicago.src.sim.gui.Displayable |
|---|
TOGGLE_LINKS, TOGGLE_NODES, TOGGLE_UPDATE_LAYOUT, TOGGLE_VIEW, TOGGLE_WRAP |
| Constructor Summary | |
|---|---|
Display2D(Discrete2DSpace grid)
Constructs a Display2D with specified Discrete2DSpace to display |
|
| Method Summary | |
|---|---|
abstract void |
drawDisplay(SimGraphics g)
Draws whatever implements this interface on the SimGraphics object |
Discrete2DSpace |
getGrid()
Gets the Discrete2DSpace that is being displayed |
java.awt.Dimension |
getSize()
Gets the size of the display. |
void |
reSize(int width,
int height)
Resizes the display to the appropriate width and height adjusting the CELL SIZE as appropriate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uchicago.src.sim.gui.Displayable |
|---|
getDisplayableInfo, viewEventPerformed |
| Field Detail |
|---|
protected Discrete2DSpace grid
protected java.awt.Dimension size
| Constructor Detail |
|---|
public Display2D(Discrete2DSpace grid)
grid - the space to display| Method Detail |
|---|
public Discrete2DSpace getGrid()
public java.awt.Dimension getSize()
getSize in interface Displayable
public void reSize(int width,
int height)
public abstract void drawDisplay(SimGraphics g)
Displayable
drawDisplay in interface Displayable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||