sim.portrayal.grid
Interface DrawPolicy
public interface DrawPolicy
Called by Sparse2DPortrayal and Object2DPortrayal to determine if all objects
should be drawn or only one. The Bags provided contain objects all sitting in
the same cell location onscreen.
Method Summary |
boolean |
objectToDraw(Bag fromHere,
Bag addToHere)
Give the bag fromHere (which you should NOT MODIFY), which contains objects all
occupying the same location, add to the bag addtoHere only those objects you wish to be drawn,
then return DONE. |
DRAW_ALL
static final boolean DRAW_ALL
- See Also:
- Constant Field Values
DONE
static final boolean DONE
- See Also:
- Constant Field Values
objectToDraw
boolean objectToDraw(Bag fromHere,
Bag addToHere)
- Give the bag fromHere (which you should NOT MODIFY), which contains objects all
occupying the same location, add to the bag addtoHere only those objects you wish to be drawn,
then return DONE. Alternatively, simply make no additions, then return DRAW_ALL if you wish the
entire fromHere bag to be drawn. If you don't want anything to be drawn, just return DONE.
Do not replace the array in addToHere.