fixed a bug where AbstractDrawer would load images several times
This commit is contained in:
parent
12ac49938d
commit
5acae3c527
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user