1 package org.catacomb.druid.util;
2
3 import java.awt.image.BufferedImage;
4 import java.io.File;
5
6 import org.catacomb.util.AWTUtil;
7 import org.catacomb.util.ImageUtil;
8
9
10
11 public class Snapshot {
12
13
14
15
16 public void saveSnapshot(Object obj) {
17 BufferedImage img = AWTUtil.getBufferedImage(obj);
18
19 File fw = FileChooser.getChooser().getFileToWrite("snapshot");
20 if (img != null) {
21 if (fw != null) {
22 ImageUtil.writePNG(img, fw);
23 }
24 }
25 }
26
27
28
29
30
31 }