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.LabelFEEDBACK_LABELprivate javafx.scene.control.ButtonFILE_EXPLORERprivate javafx.scene.control.ProgressIndicatorLOADING_ANIMATIONprivate java.lang.StringselectedDirectoryprivate javafx.scene.control.TextFieldTITLE_FIELDprivate javafx.scene.control.LabelTITLE_LABELprivate javafx.scene.control.ButtonUPLOAD_BUTTONprivate javafx.scene.control.TextFieldURL_FIELDprivate javafx.scene.control.LabelURL_LABELprivate javafx.scene.control.ButtonVIEW_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 booleancheckField()Checks if title or url are missing Used in uploadCompleteprivate static java.util.MapgetProperties()Method that gets Cloudinary properties Used in uploadComplete(package private) voidsetLayout()Overrides SceneRoot method.private voiduploadComplete()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
-
-