Package Roots
Class UploadRoot
- java.lang.Object
-
- Roots.SceneRoot
-
- Roots.UploadRoot
-
final class UploadRoot extends SceneRoot
Class for the upload root
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.Label
FEEDBACK_LABEL
private javafx.scene.control.Button
FILE_EXPLORER
private javafx.scene.control.ProgressIndicator
LOADING_ANIMATION
private java.lang.String
selectedDirectory
private javafx.scene.control.TextField
TITLE_FIELD
private javafx.scene.control.Label
TITLE_LABEL
private javafx.scene.control.Button
UPLOAD_BUTTON
private javafx.scene.control.TextField
URL_FIELD
private javafx.scene.control.Label
URL_LABEL
private javafx.scene.control.Button
VIEW_PHOTOS_BUTTON
-
Constructor Summary
Constructors Constructor Description UploadRoot()
Constructor that sets up the layout of the upload root
-
Method Summary
Modifier and Type Method Description private boolean
checkField()
Checks if title or url are missing Used in uploadCompleteprivate static java.util.Map
getProperties()
Method that gets Cloudinary properties Used in uploadComplete(package private) void
setLayout()
Overrides SceneRoot method.private void
uploadComplete()
Upload the image path to the database Sets feedbackLabel to error message if something went wrong-
Methods inherited from class Roots.SceneRoot
getBorderPane, getGridPane, setGridPane, setPageTitle
-
-
-
-
Field Detail
-
TITLE_LABEL
private final javafx.scene.control.Label TITLE_LABEL
-
TITLE_FIELD
private final javafx.scene.control.TextField TITLE_FIELD
-
URL_LABEL
private final javafx.scene.control.Label URL_LABEL
-
URL_FIELD
private final javafx.scene.control.TextField URL_FIELD
-
UPLOAD_BUTTON
private final javafx.scene.control.Button UPLOAD_BUTTON
-
FEEDBACK_LABEL
private final javafx.scene.control.Label FEEDBACK_LABEL
-
LOADING_ANIMATION
private final javafx.scene.control.ProgressIndicator LOADING_ANIMATION
-
FILE_EXPLORER
private final javafx.scene.control.Button FILE_EXPLORER
-
VIEW_PHOTOS_BUTTON
private final javafx.scene.control.Button VIEW_PHOTOS_BUTTON
-
selectedDirectory
private java.lang.String selectedDirectory
-
-
Method Detail
-
getProperties
private static java.util.Map getProperties()
Method that gets Cloudinary properties Used in uploadComplete- Returns:
- returns a map with the properties
-
setLayout
void setLayout()
Overrides SceneRoot method. Assigns layout components to RootBuilders GridPane Sets styling to layout components Sets functionality to button nodes Used in constructor
-
checkField
private boolean checkField()
Checks if title or url are missing Used in uploadComplete- Returns:
- boolean value, true if trimmed TextFields are equal to 0
-
uploadComplete
private void uploadComplete()
Upload the image path to the database Sets feedbackLabel to error message if something went wrong
-
-