fixed a bug where AbstractDrawer would load images several times

This commit is contained in:
Kjistóf 2016-05-14 21:03:15 +02:00
parent 12ac49938d
commit 5acae3c527

View File

@ -6,11 +6,18 @@ import java.io.IOException;
public abstract class AbstractDrawer implements Drawer { public abstract class AbstractDrawer implements Drawer {
private static ImageStorage storage; private static ImageStorage storage;
static {
try {
storage = new ImageStorage();
}
catch (IOException e) { /* TODO kitalálni, hogy itt mit kéne csinálni */ }
}
private String filename; private String filename;
public AbstractDrawer(String path) throws IOException { public AbstractDrawer(String path) throws IOException {
storage = new ImageStorage();
filename = path; filename = path;
} }