cicaprojekt/cicaprojekt/AbstractDrawer.java
2016-05-09 16:56:41 +02:00

25 lines
565 B
Java

package cicaprojekt;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public abstract class AbstractDrawer implements Drawer {
private BufferedImage image;
public AbstractDrawer(String path) throws IOException {
image = ImageIO.read(new File(path));
}
public void changeImage(String path) throws IOException {
image = ImageIO.read(new File(path));
}
@Override
public BufferedImage getImage() {
return image;
}
}