public class ImageHandler
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.io.File |
currentImage
The file of the currently-open image
|
private boolean |
imageChanged
Whether or not the image has been changed from its last save
|
private Paint |
paint
The main class of the program
|
Constructor and Description |
---|
ImageHandler(Paint paint)
Create an ImageHandler
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
getCurrentImageFile() |
javafx.scene.image.Image |
getImage() |
boolean |
getImageChanged() |
void |
setCurrentImageFile(java.io.File newImage)
Sets the File of the image
|
void |
setImage(java.io.File f)
Loads an image from a File
|
void |
setImageChanged(boolean changed) |
private Paint paint
private java.io.File currentImage
private boolean imageChanged
public ImageHandler(Paint paint)
paint
- the main class of the programpublic void setImage(java.io.File f)
f
- the File from which to load the imagepublic javafx.scene.image.Image getImage()
public java.io.File getCurrentImageFile()
public void setCurrentImageFile(java.io.File newImage)
newImage
- the File which should be overwritten on savepublic void setImageChanged(boolean changed)
changed
- whether the image has been changed since last savepublic boolean getImageChanged()