25 lines
548 B
Java
25 lines
548 B
Java
package cicaprojekt;
|
|
|
|
import java.awt.image.BufferedImage;
|
|
import java.io.IOException;
|
|
|
|
|
|
public abstract class AbstractDrawer implements Drawer {
|
|
private static ImageStorage storage;
|
|
private String filename;
|
|
|
|
|
|
public AbstractDrawer(String path) throws IOException {
|
|
storage = new ImageStorage();
|
|
filename = path;
|
|
}
|
|
|
|
public void changeImage(String path) throws IOException {
|
|
filename = path;
|
|
}
|
|
|
|
@Override
|
|
public BufferedImage getImage() {
|
|
return storage.getImage(filename);
|
|
}
|
|
} |