Package Css

Class Css


  • public final class Css
    extends java.lang.Object
    Css class used for styling different JavaFX elements
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Css()
      Private constructor to hinder creation of utility class
    • Method Summary

      Modifier and Type Method Description
      static void playFeedBackLabelTransition​(FeedbackType feedBackType, java.lang.String labelMessage, int fontSize, javafx.scene.control.Label label)
      Plays a fading transition on a feedback label
      static void setButton​(int width, int height, int fontSize, javafx.scene.control.Button... buttons)
      Styles buttons and sets height, width and font size by given params
      static void setContainer​(javafx.scene.control.Button button, javafx.scene.layout.HBox container, int containerHeight, int containerWidth)
      Sets style in image container class for a button and container
      static void setFeedBackLabel​(FeedbackType feedBackType, int fontSize, javafx.scene.control.Label... labels)
      Sets styling for feedback labels
      static void setHomeButton​(javafx.scene.control.Button button)
      Sets home button styling in the header
      static void setLabel​(int fontSize, javafx.scene.control.Label... labels)
      Sets styling for labels
      static void setLoadingAnimation​(javafx.scene.control.ProgressIndicator... progressIndicators)
      Styles ProgressIndicators
      static void setMapPane​(javafx.scene.layout.StackPane stackPane)
      Sets styling for the stack pane in the map scene
      static void setPane​(javafx.scene.layout.Pane... panes)
      Styles panes
      static void setScrollPane​(javafx.scene.control.ScrollPane scrollPane)
      Sets styling for the scroll pane
      static void setTagContainerButton​(javafx.scene.control.Button... buttons)
      Style buttons in the tag container class
      static void setTextField​(int width, int height, int fontSize, javafx.scene.control.TextField... textFields)
      Styles textFields and sets height, width and font size by given params
      static void setTextFont​(int fontSize, javafx.scene.text.Text... texts)
      Styles font of a text
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Css

        private Css()
        Private constructor to hinder creation of utility class
    • Method Detail

      • setPane

        public static void setPane​(javafx.scene.layout.Pane... panes)
        Styles panes
        Parameters:
        panes - an amount of panes
      • setMapPane

        public static void setMapPane​(javafx.scene.layout.StackPane stackPane)
        Sets styling for the stack pane in the map scene
        Parameters:
        stackPane - a stack pane
      • setButton

        public static void setButton​(int width,
                                     int height,
                                     int fontSize,
                                     javafx.scene.control.Button... buttons)
        Styles buttons and sets height, width and font size by given params
        Parameters:
        width - the preferred width of buttons
        height - the preferred height of the buttons
        fontSize - the font size of the text in the buttons
        buttons - an amount of buttons
      • setTagContainerButton

        public static void setTagContainerButton​(javafx.scene.control.Button... buttons)
        Style buttons in the tag container class
        Parameters:
        buttons - an amount of buttons
      • setHomeButton

        public static void setHomeButton​(javafx.scene.control.Button button)
        Sets home button styling in the header
        Parameters:
        button - a button
      • setContainer

        public static void setContainer​(javafx.scene.control.Button button,
                                        javafx.scene.layout.HBox container,
                                        int containerHeight,
                                        int containerWidth)
        Sets style in image container class for a button and container
        Parameters:
        button - a button
        container - a Hbox
        containerHeight - height of button
        containerWidth - width of button
      • setTextField

        public static void setTextField​(int width,
                                        int height,
                                        int fontSize,
                                        javafx.scene.control.TextField... textFields)
        Styles textFields and sets height, width and font size by given params
        Parameters:
        width - the preferred width of text fields
        height - the preferred height of text fields
        fontSize - the font size of the prompt text in text fields
        textFields - an amount of text fields
      • setScrollPane

        public static void setScrollPane​(javafx.scene.control.ScrollPane scrollPane)
        Sets styling for the scroll pane
        Parameters:
        scrollPane - a scroll pane
      • setLabel

        public static void setLabel​(int fontSize,
                                    javafx.scene.control.Label... labels)
        Sets styling for labels
        Parameters:
        fontSize - the size of the font in the labels
        labels - An amount of Labels
      • setFeedBackLabel

        public static void setFeedBackLabel​(FeedbackType feedBackType,
                                            int fontSize,
                                            javafx.scene.control.Label... labels)
        Sets styling for feedback labels
        Parameters:
        feedBackType - FeedbackType Enum, the type of feedback (success or error)
        fontSize - the size of the font
        labels - , an amount of labels.
      • playFeedBackLabelTransition

        public static void playFeedBackLabelTransition​(FeedbackType feedBackType,
                                                       java.lang.String labelMessage,
                                                       int fontSize,
                                                       javafx.scene.control.Label label)
        Plays a fading transition on a feedback label
        Parameters:
        feedBackType - FeedbackType Enum, the type of feedback (success or error)
        labelMessage - feedback message the label will show
        fontSize - the size of the font
        label - label to play the transition on
      • setTextFont

        public static void setTextFont​(int fontSize,
                                       javafx.scene.text.Text... texts)
        Styles font of a text
        Parameters:
        fontSize - the size of the font
        texts - a number of texts
      • setLoadingAnimation

        public static void setLoadingAnimation​(javafx.scene.control.ProgressIndicator... progressIndicators)
        Styles ProgressIndicators
        Parameters:
        progressIndicators - an amount of progressIndicators