RePast
v. 2.0

uchicago.src.sim.gui
Class GisDisplay

java.lang.Object
  |
  +--uchicago.src.sim.gui.GisDisplay
All Implemented Interfaces:
Displayable, Probeable

public class GisDisplay
extends Object
implements Displayable, Probeable


Field Summary
 
Fields inherited from interface uchicago.src.sim.gui.Displayable
TOGGLE_LINKS, TOGGLE_NODES, TOGGLE_UPDATE_LAYOUT, TOGGLE_VIEW, TOGGLE_WRAP
 
Constructor Summary
GisDisplay()
           
GisDisplay(int width)
           
 
Method Summary
 void addLayer(GisLayer l)
           
 void drawDisplay(SimGraphics g)
          Draws whatever implements this interface on the SimGraphics object
 ArrayList getDisplayableInfo()
          Returns an ArrayList of DisplayInfo objects used by a DisplaySurface to create the View menu for that displayable
 int getHeight()
           
 int getNodeHeight()
           
 int getNodeWidth()
           
 ArrayList getObjectsAt(int x, int y)
          Gets the objects at the coordinate x, y.
 Dimension getSize()
          Gets the size of the display.
 int getWidth()
           
 uchicago.src.sim.gui.GisDisplay.IntPoint scalePoint(com.vividsolutions.jts.geom.Coordinate point)
           
 void setMoveableXY(Moveable moveable, int x, int y)
          Sets the new coordinates for specified moveable.
 void setNodeHeight(int nodeHeight)
           
 void setNodeWidth(int nodeWidth)
           
 void setWidth(int width)
           
 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
 

Constructor Detail

GisDisplay

public GisDisplay()

GisDisplay

public GisDisplay(int width)
Method Detail

getNodeWidth

public int getNodeWidth()

setNodeWidth

public void setNodeWidth(int nodeWidth)

getNodeHeight

public int getNodeHeight()

setNodeHeight

public void setNodeHeight(int nodeHeight)

addLayer

public void addLayer(GisLayer l)

drawDisplay

public void drawDisplay(SimGraphics g)
Description copied from interface: Displayable
Draws whatever implements this interface on the SimGraphics object

Specified by:
drawDisplay in interface Displayable

getDisplayableInfo

public ArrayList getDisplayableInfo()
Description copied from interface: Displayable
Returns an ArrayList of DisplayInfo objects used by a DisplaySurface to create the View menu for that displayable

Specified by:
getDisplayableInfo in interface Displayable
See Also:
DisplayInfo

viewEventPerformed

public void viewEventPerformed(ViewEvent evt)
Description copied from interface: Displayable
Invoked when a display event occurs, through the view menu of a display surface for example. Not used to do the actual drawing.

Specified by:
viewEventPerformed in interface Displayable

getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getHeight

public int getHeight()

getSize

public Dimension getSize()
Description copied from interface: Displayable
Gets the size of the display.

Specified by:
getSize in interface Displayable

scalePoint

public uchicago.src.sim.gui.GisDisplay.IntPoint scalePoint(com.vividsolutions.jts.geom.Coordinate point)

getObjectsAt

public ArrayList getObjectsAt(int x,
                              int y)
Description copied from interface: Probeable
Gets the objects at the coordinate x, y. X and Y are screen coordinates.

Specified by:
getObjectsAt in interface Probeable
Parameters:
x - the x screen coordinate.
y - the y screen coordinate.
Returns:
the object at the x, y coordinate.

setMoveableXY

public void setMoveableXY(Moveable moveable,
                          int x,
                          int y)
Description copied from interface: Probeable
Sets the new coordinates for specified moveable. This goes through probeable as some translation between screen pixel coordinates and the simulation coordinates may be necessary.

Specified by:
setMoveableXY in interface Probeable
Parameters:
moveable - the moveable whose coordinates are changed
x - the x coordinate in pixels
y - the y coordinate in pixels

RePast
v. 2.0

Bug reports and feature requests to RePast