use of com.tagtraum.perf.gcviewer.view.model.GCPreferences in project GCViewer by chewiebug.
the class SimpleChartRenderer method render.
public void render(GCModel model, FileOutputStream outputStream) throws IOException {
GCPreferences gcPreferences = new GCPreferences();
gcPreferences.load();
Dimension d = new Dimension(gcPreferences.getWindowWidth(), gcPreferences.getWindowHeight());
BufferedImage image = new BufferedImage(d.width, d.height, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics = image.createGraphics();
graphics.setBackground(Color.WHITE);
graphics.clearRect(0, 0, image.getWidth(), image.getHeight());
ChartDrawingParameters params = new ChartDrawingParameters(model, gcPreferences, d, graphics, image, outputStream);
if (EventQueue.isDispatchThread()) {
drawAndSaveToStream(params);
} else {
new SwingChartToStreamHelper().execute(params);
}
}
use of com.tagtraum.perf.gcviewer.view.model.GCPreferences in project GCViewer by chewiebug.
the class TestGCModelLoaderController method setUp.
@Before
public void setUp() throws Exception {
gcViewerGui = new GCViewerGui();
controller = new GCModelLoaderControllerImpl(gcViewerGui);
new GCViewerGuiBuilder().initGCViewerGui(gcViewerGui, controller);
new GCViewerGuiController().applyPreferences(gcViewerGui, new GCPreferences());
}
Aggregations