|
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.Display2D
|
+--uchicago.src.sim.gui.HexaDisplay2D
Base class for two dimensional displays of hexagonal spaces. This class takes care of calculating the hexagon sizes, but itself does not do any drawing.
| Field Summary | |
protected Color |
frameColor
|
protected boolean |
isFramed
|
protected static Polygon |
polyClip
|
protected Polygon |
polyDraw
|
protected boolean |
view
|
protected static int |
xTrans
|
protected static int |
xTrans1q
|
protected static int |
yTrans
|
protected static int |
yTransHalf
|
| Fields inherited from class uchicago.src.sim.gui.Display2D |
grid, size |
| Fields inherited from interface uchicago.src.sim.gui.Displayable |
TOGGLE_LINKS, TOGGLE_NODES, TOGGLE_UPDATE_LAYOUT, TOGGLE_VIEW, TOGGLE_WRAP |
| Constructor Summary | |
HexaDisplay2D(Discrete2DSpace hexagrid)
Creates a HexaDisplay2D for the specifed Discrete2DSpace |
|
| Method Summary | |
protected Dimension |
getCoordinates(int x,
int y)
|
ArrayList |
getDisplayableInfo()
Gets a list of the DisplayInfo objects associated with this HexDisplay. |
Color |
getFrameColor()
|
Dimension |
getSize()
Gets the size of the display. |
boolean |
isFramed()
|
protected Dimension |
selectPolygon(int x,
int y,
int x1,
int y1,
int x2,
int y2)
|
void |
setFrameColor(Color c)
|
void |
setFramed(boolean b)
|
protected void |
setHexagons()
|
void |
setMoveableXY(Moveable moveable,
int x,
int y)
Sets the new coordinates for specified moveable. |
void |
viewEventPerformed(ViewEvent evt)
Invoked when a viewEvent for this display is fired by the DisplaySurface. |
| Methods inherited from class uchicago.src.sim.gui.Display2D |
drawDisplay, getGrid, reSize |
| 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.Probeable |
getObjectsAt |
| Field Detail |
protected boolean view
protected boolean isFramed
protected Color frameColor
protected static int xTrans
protected static int xTrans1q
protected static int yTrans
protected static int yTransHalf
protected static Polygon polyClip
protected Polygon polyDraw
| Constructor Detail |
public HexaDisplay2D(Discrete2DSpace hexagrid)
| Method Detail |
protected void setHexagons()
public ArrayList getDisplayableInfo()
getDisplayableInfo in interface DisplayableDisplayInfopublic void viewEventPerformed(ViewEvent evt)
viewEventPerformed in interface Displayable
protected Dimension selectPolygon(int x,
int y,
int x1,
int y1,
int x2,
int y2)
protected Dimension getCoordinates(int x,
int y)
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 Color getFrameColor()
public void setFrameColor(Color c)
public boolean isFramed()
public void setFramed(boolean b)
public Dimension getSize()
Display2D
getSize in interface DisplayablegetSize in class Display2D
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||