Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.portrayal
Interface Portrayal

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  Portrayal2D, Portrayal3D

All Known Implementing Classes:
  FieldPortrayal2D, FieldPortrayal3D, QuadPortrayal, SimplePortrayal2D, SimplePortrayal3D

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

    public Inspector getInspector(LocationWrapper wrapper,
                                  GUIState state)

  Provide an inspector for an object.

### getName

    public 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

    public 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

    public 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD