|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.gui.Display2D
uchicago.src.sim.gui.HexaDisplay2D
uchicago.src.sim.gui.Value2DHexaDisplay
public class Value2DHexaDisplay
Displays 2d arrays of values (Integers or ints). As a Displayable this class
iterates through a Discrete2DSpace, turns the integers into
colors according to a ColorMap, and
draws these colors in the appropriate cells.
| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.gui.HexaDisplay2D |
|---|
frameColor, isFramed, polyClip, polyDraw, view, xTrans, xTrans1q, yTrans, 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 | |
|---|---|
Value2DHexaDisplay(Discrete2DSpace grid,
ColorMap map)
Creates a Value2DDisplay to display the specified Discrete2DSpace using the specified ColorMap. |
|
| Method Summary | |
|---|---|
void |
drawDisplay(SimGraphics g)
Draws the Discrete2DSpace converting the Numbers contained therein to Colors according to the ColorMap specified in the constructor |
java.util.ArrayList |
getObjectsAt(int x,
int y)
Gets an ArrayList of Objects at an x, y screen (pixel) coordinate. |
boolean |
isZeroTransparent()
Returns whether a zero value in space drawn by this grid is transparent or drawn according to the color map. |
void |
setDisplayMapping(int m,
int c)
Linear transform of states (doubles, floats, integers etc.) to colors for drawing. color = state / m + c |
void |
setZeroTransparent(boolean val)
Sets whether or not a zero value in space drawn by this grid is transparent or drawn according to the color map. |
| Methods inherited from class uchicago.src.sim.gui.HexaDisplay2D |
|---|
getCoordinates, getDisplayableInfo, getFrameColor, getSize, isFramed, selectPolygon, setFrameColor, setFramed, setHexagons, setMoveableXY, viewEventPerformed |
| Methods inherited from class uchicago.src.sim.gui.Display2D |
|---|
getGrid, reSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Value2DHexaDisplay(Discrete2DSpace grid,
ColorMap map)
| Method Detail |
|---|
public void setDisplayMapping(int m,
int c)
public void setZeroTransparent(boolean val)
val - if true, zero value will be drawn as transparent, otherwise
the value in the color map is drawn.public boolean isZeroTransparent()
public void drawDisplay(SimGraphics g)
drawDisplay in interface DisplayabledrawDisplay in class Display2D
public java.util.ArrayList getObjectsAt(int x,
int y)
x - the x screen coordinate.y - the y screen coordinate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||