_bbGraphics.clearRect(getDisplayX(), getDisplayY(), getDisplayWidth(), getDisplayHeight());
if (trace == true)
{
for (int idx = 0; idx < _particles.size(); idx++)
{
final Particle particle = _particles.get(idx);
particle.drawTrace(_bbGraphics);
}
}
for (int idx = 0; idx < _particles.size(); idx++)
{
final Particle particle = _particles.get(idx);
particle.draw(_bbGraphics, false);
if (info == true)
{
final FontRenderContext frc = _bbGraphics.getFontRenderContext();
final String infoString = particle.toString();
final Rectangle2D rect = _bbGraphics.getFont().getStringBounds(infoString, frc);
double x = particle.x;
double y = particle.y;
if (x < getDisplayX())
{
x = getDisplayX();
}
if ((x + rect.getWidth()) > getDisplayWidth())
{
x = getDisplayWidth() - rect.getWidth();
}
if (y < getDisplayY())
{
y = getDisplayY() + rect.getHeight();
}
if ((y + rect.getHeight()) > getDisplayHeight())
{
y = getDisplayHeight();
}
_bbGraphics.setPaint(particle.getColor());
_bbGraphics.drawString(infoString, (int) x, (int) y);
}
}
}
if (stats == true)