
prefuse.util.display.DebugStatsPainter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of prefuse-vienna Show documentation
Show all versions of prefuse-vienna Show documentation
Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language.
The newest version!
package prefuse.util.display;
import java.awt.Graphics2D;
import prefuse.Display;
import prefuse.util.PrefuseLib;
/**
* PinatListener that paints useful debugging statistics over a prefuse
* display. This includes the current frame rate, the number of visible
* items, memory usage, and display navigation information.
*
* @author jeffrey heer
*/
public class DebugStatsPainter implements PaintListener {
/**
* Does nothing.
* @see prefuse.util.display.PaintListener#prePaint(prefuse.Display, java.awt.Graphics2D)
*/
public void prePaint(Display d, Graphics2D g) {
}
/**
* Prints a debugging statistics string in the Display.
* @see prefuse.util.display.PaintListener#postPaint(prefuse.Display, java.awt.Graphics2D)
*/
public void postPaint(Display d, Graphics2D g) {
g.setFont(d.getFont());
g.setColor(d.getForeground());
g.drawString(PrefuseLib.getDisplayStats(d), 5, 15);
}
} // end of class DebugStatsPainter
© 2015 - 2025 Weber Informatics LLC | Privacy Policy