public class Paint
extends javafx.application.Application
Modifier and Type | Field and Description |
---|---|
private PaintController |
controller
The controller of the program
|
private static int |
HEIGHT
The starting width/height of the stage
|
private ImageHandler |
imageHandler
The program's image handler
|
private javafx.stage.Stage |
primaryStage
The primary stage of the program
|
private static java.io.File |
startFile
The file to be opened when the program is opened
Remains null unless a command-line argument containing a file name is passed to the program
|
private java.lang.String |
title
The text in the title bar of the window corresponding to the file name
|
private java.lang.String |
titleAppend
The string to be appended to the title bar
|
private static int |
WIDTH
The starting width/height of the stage
|
Constructor and Description |
---|
Paint() |
Modifier and Type | Method and Description |
---|---|
PaintController |
getController() |
ImageHandler |
getImageHandler() |
javafx.stage.Stage |
getStage() |
static void |
main(java.lang.String[] args)
Launch the program
|
void |
setFileName(java.lang.String name)
Sets the name of the current file, for use in the window title
|
void |
setUnsaved(boolean unsaved)
Update the unsaved changes indicator (*) in the window title
|
void |
start(javafx.stage.Stage primaryStage) |
private static final int WIDTH
private static final int HEIGHT
private static java.io.File startFile
private javafx.stage.Stage primaryStage
private PaintController controller
private ImageHandler imageHandler
private java.lang.String title
private final java.lang.String titleAppend
public void start(javafx.stage.Stage primaryStage)
start
in class javafx.application.Application
public static void main(java.lang.String[] args)
args
- args[0] will be interpreted as a file and PaintFX will attempt to open that file on launchpublic PaintController getController()
public javafx.stage.Stage getStage()
public ImageHandler getImageHandler()
public void setFileName(java.lang.String name)
name
- the name of the current filepublic void setUnsaved(boolean unsaved)
unsaved
- whether the image has been changed since last save