|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.repastdemos.life.InfiniteSpaceDisplay
public class InfiniteSpaceDisplay
Display class for displaying InfiniteLifeSpaces. This acts as a window into the sparse matrix that is the InfiniteLifeSpace. The origin and width of the window can be set while the model is running and thus provide a scrolling window into the space.
| Field Summary | |
|---|---|
protected boolean |
view
|
| Fields inherited from interface uchicago.src.sim.gui.Displayable |
|---|
TOGGLE_LINKS, TOGGLE_NODES, TOGGLE_UPDATE_LAYOUT, TOGGLE_VIEW, TOGGLE_WRAP |
| Constructor Summary | |
|---|---|
InfiniteSpaceDisplay(SparseObjectMatrix matrix,
int x,
int y,
int width,
int height,
int max)
|
|
| Method Summary | |
|---|---|
void |
drawDisplay(SimGraphics g)
Draws the objects (Drawables) contained by the view window. |
java.util.ArrayList |
getDisplayableInfo()
Returns an ArrayList of DisplayInfo objects used by a DisplaySurface to create the View menu for that displayable |
java.util.ArrayList |
getObjectsAt(int mx,
int my)
Gets a list of objects at the specified screen (pixel) coordinates. |
java.awt.Dimension |
getSize()
Gets the size of the display. |
int |
getViewX()
Gets the x origin of the view window. |
int |
getViewY()
Gets the y origin of the view window. |
void |
reSize(int width,
int height)
|
void |
setMoveableXY(Moveable moveable,
int x,
int y)
Sets the new coordinates for specified moveable. |
void |
setViewWindow(int x,
int y,
int width,
int height)
Sets the origin and width of the window into the "infinite" space. |
void |
viewEventPerformed(ViewEvent evt)
Invoked when a display event occurs, through the view menu of a display surface for example. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean view
| Constructor Detail |
|---|
public InfiniteSpaceDisplay(SparseObjectMatrix matrix,
int x,
int y,
int width,
int height,
int max)
| Method Detail |
|---|
public void setViewWindow(int x,
int y,
int width,
int height)
public int getViewX()
public int getViewY()
public java.util.ArrayList getObjectsAt(int mx,
int my)
getObjectsAt in interface Probeablemx - the x screen coordinate.my - the y screen coordinate.
public void setMoveableXY(Moveable moveable,
int x,
int y)
setMoveableXY in interface Probeablemoveable - the moveable whose coordinates are changedx - the x coordinate in pixelsy - the y coordinate in pixelspublic void drawDisplay(SimGraphics g)
drawDisplay in interface Displayableg - the graphics context on which to drawpublic java.util.ArrayList getDisplayableInfo()
Displayable
getDisplayableInfo in interface DisplayableDisplayInfopublic void viewEventPerformed(ViewEvent evt)
Displayable
viewEventPerformed in interface Displayablepublic java.awt.Dimension getSize()
Displayable
getSize in interface Displayable
public void reSize(int width,
int height)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||