Package Roots

Class UploadRoot


  • final class UploadRoot
    extends SceneRoot
    Class for the upload root
    • 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 uploadComplete
      private 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 java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
    • Constructor Detail

      • UploadRoot

        UploadRoot()
        Constructor that sets up the layout of the upload root
    • 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
        Overrides:
        setLayout in class SceneRoot
      • 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