|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsim.portrayal.SimplePortrayal2D
sim.portrayal.simple.RectanglePortrayal2D
sim.portrayal.simple.ValuePortrayal2D
public class ValuePortrayal2D
The ValuePortrayal2D is the default portrayal for ValueGridPortrayal2Ds. It requires a parent (the ValueGridPortrayal2D), which it uses to determine the correct colors for a given object. The objects portrayed must be instances of MutableDouble, where the value represents the level of the color.
| Nested Class Summary | |
|---|---|
static class |
ValuePortrayal2D.DoubleFilter
|
static class |
ValuePortrayal2D.Filter
|
static class |
ValuePortrayal2D.IntFilter
|
| Field Summary |
|---|
| Fields inherited from class sim.portrayal.simple.RectanglePortrayal2D |
|---|
filled, paint, scale |
| Fields inherited from class sim.portrayal.SimplePortrayal2D |
|---|
TYPE_HIT_OBJECT, TYPE_SELECTED_OBJECT |
| Constructor Summary | |
|---|---|
ValuePortrayal2D()
|
|
ValuePortrayal2D(ValueGridPortrayal2D parent)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
draw(java.lang.Object object,
java.awt.Graphics2D graphics,
DrawInfo2D info)
Draw a the given object with an origin at (info.draw.x, info.draw.y), and with the coordinate system scaled by so that 1 unit is in the x and y directions are equal to info.draw.width and info.draw.height respectively in pixels. |
Inspector |
getInspector(LocationWrapper wrapper,
GUIState state)
Provide an inspector for an object. |
java.lang.String |
getName(LocationWrapper wrapper)
Returns a static, one-line name for the given object that is useful for a human to distinguish it from other objects. |
java.lang.String |
getStatus(LocationWrapper wrapper)
Returns a simple, informative one-line description of the current status of the object, which may change at any time to reflect how the object is changing. |
void |
setParent(ValueGridPortrayal2D parent)
Deprecated. does nothing now |
| Methods inherited from class sim.portrayal.simple.RectanglePortrayal2D |
|---|
hitObject |
| Methods inherited from class sim.portrayal.SimplePortrayal2D |
|---|
handleMouseEvent, setSelected |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ValuePortrayal2D()
public ValuePortrayal2D(ValueGridPortrayal2D parent)
| Method Detail |
|---|
public void setParent(ValueGridPortrayal2D parent)
public void draw(java.lang.Object object,
java.awt.Graphics2D graphics,
DrawInfo2D info)
Portrayal2D
draw in interface Portrayal2Ddraw in class RectanglePortrayal2D
public Inspector getInspector(LocationWrapper wrapper,
GUIState state)
Portrayal
getInspector in interface PortrayalgetInspector in class SimplePortrayal2Dpublic java.lang.String getStatus(LocationWrapper wrapper)
Portrayal
getStatus in interface PortrayalgetStatus in class SimplePortrayal2Dpublic java.lang.String getName(LocationWrapper wrapper)
Portrayal
getName in interface PortrayalgetName in class SimplePortrayal2D
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||