d513d5f9fa
XXXDrawers. ImagePanel.java removed.
25 lines
565 B
Java
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;
|
|
}
|
|
|
|
} |