sim.portrayal
Interface Portrayal2D

All Superinterfaces:
Portrayal, java.io.Serializable
All Known Implementing Classes:
FieldPortrayal2D, SimplePortrayal2D

public interface Portrayal2D
extends Portrayal

The basic 2D portrayal interface. It adds the draw method in the 2D context.


Method Summary
 void draw(java.lang.Object object, java.awt.Graphics2D graphics, DrawInfo2D info)
          Draw a portrayed object centered at the origin in info, and with the given scaling factors.
 
Methods inherited from interface sim.portrayal.Portrayal
getInspector, getName, setSelected
 

Method Detail

draw

public void draw(java.lang.Object object,
                 java.awt.Graphics2D graphics,
                 DrawInfo2D info)
Draw a portrayed object centered at the origin in info, and with the given scaling factors. draw(...) will not be called until portray(obj) has been called on a Portrayal2D at least once. But you should have some default null drawing capability just in case.