sim.portrayal
Interface Portrayal

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Portrayal2D, Portrayal3D
All Known Implementing Classes:
AdjustablePortrayal2D, Axes, BoxPortrayal3D, CircledPortrayal2D, CircledPortrayal3D, ConePortrayal3D, ContinuousPortrayal2D, ContinuousPortrayal3D, CubePortrayal3D, CylinderPortrayal3D, FacetedPortrayal2D, FastHexaObjectGridPortrayal2D, FastHexaValueGridPortrayal2D, FastObjectGridPortrayal2D, FastValueGridPortrayal2D, FieldPortrayal2D, FieldPortrayal3D, HexagonalPortrayal2D, HexaObjectGridPortrayal2D, HexaSparseGridPortrayal2D, HexaValueGridPortrayal2D, ImagePortrayal2D, ImagePortrayal3D, LabelledPortrayal2D, LabelledPortrayal3D, LightPortrayal3D, MeshPortrayal, MovablePortrayal2D, NetworkPortrayal2D, ObjectGridPortrayal2D, ObjectGridPortrayal3D, OrientedPortrayal2D, OvalPortrayal2D, PrimitivePortrayal3D, QuadPortrayal, RectanglePortrayal2D, Shape3DPortrayal3D, ShapePortrayal2D, SharedGroupPortrayal3D, SimpleEdgePortrayal2D, SimplePortrayal2D, SimplePortrayal3D, SparseFieldPortrayal3D, SparseGrid2DPortrayal3D, SparseGridPortrayal2D, SparseGridPortrayal3D, SpherePortrayal3D, TilePortrayal, TrailedPortrayal2D, TransformedPortrayal2D, TransformedPortrayal3D, ValueGrid2DPortrayal3D, ValueGridPortrayal2D, ValueGridPortrayal3D, ValuePortrayal2D, ValuePortrayal3D, WireFrameBoxPortrayal3D

public interface Portrayal
extends java.io.Serializable

A common interface for portrayal classes.


Method Summary
 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.
 boolean setSelected(LocationWrapper wrapper, boolean selected)
          Change the portrayal state to reflect the fact that you've been selected or not selected.
 

Method Detail

getInspector

Inspector getInspector(LocationWrapper wrapper,
                       GUIState state)
Provide an inspector for an object.


getName

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. A simple default would be just to return "" + object.


getStatus

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. A simple default would be just to return getName(wrapper).


setSelected

boolean setSelected(LocationWrapper wrapper,
                    boolean selected)
Change the portrayal state to reflect the fact that you've been selected or not selected. Always return true, except if you've received a setSelected(true) and in fact do not wish to be selectable, in which case return false in that sole situation.