Package Css
Class Css
- java.lang.Object
-
- Css.Css
-
public final class Css extends java.lang.Object
Css class used for styling different JavaFX elements
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
BORDER_COLOR_LIGHT
private static java.lang.String
BORDER_RADIUS
private static java.lang.String
BORDER_WIDTH
private static java.lang.String
BOX_BACKGROUND_COLOR
private static java.lang.String
FONT
private static java.lang.String
PANE_STYLE
-
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 labelstatic void
setButton(int width, int height, int fontSize, javafx.scene.control.Button... buttons)
Styles buttons and sets height, width and font size by given paramsstatic 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 containerstatic void
setFeedBackLabel(FeedbackType feedBackType, int fontSize, javafx.scene.control.Label... labels)
Sets styling for feedback labelsstatic void
setHomeButton(javafx.scene.control.Button button)
Sets home button styling in the headerstatic void
setLabel(int fontSize, javafx.scene.control.Label... labels)
Sets styling for labelsstatic void
setLoadingAnimation(javafx.scene.control.ProgressIndicator... progressIndicators)
Styles ProgressIndicatorsstatic void
setMapPane(javafx.scene.layout.StackPane stackPane)
Sets styling for the stack pane in the map scenestatic void
setPane(javafx.scene.layout.Pane... panes)
Styles panesstatic void
setScrollPane(javafx.scene.control.ScrollPane scrollPane)
Sets styling for the scroll panestatic void
setTagContainerButton(javafx.scene.control.Button... buttons)
Style buttons in the tag container classstatic void
setTextField(int width, int height, int fontSize, javafx.scene.control.TextField... textFields)
Styles textFields and sets height, width and font size by given paramsstatic void
setTextFont(int fontSize, javafx.scene.text.Text... texts)
Styles font of a text
-
-
-
Field Detail
-
BORDER_RADIUS
private static final java.lang.String BORDER_RADIUS
- See Also:
- Constant Field Values
-
BORDER_WIDTH
private static final java.lang.String BORDER_WIDTH
- See Also:
- Constant Field Values
-
BORDER_COLOR_LIGHT
private static final java.lang.String BORDER_COLOR_LIGHT
- See Also:
- Constant Field Values
-
BOX_BACKGROUND_COLOR
private static final java.lang.String BOX_BACKGROUND_COLOR
- See Also:
- Constant Field Values
-
FONT
private static final java.lang.String FONT
- See Also:
- Constant Field Values
-
PANE_STYLE
private static final java.lang.String PANE_STYLE
- See Also:
- Constant Field Values
-
-
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 buttonsheight
- the preferred height of the buttonsfontSize
- the font size of the text in the buttonsbuttons
- 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 buttoncontainer
- a HboxcontainerHeight
- height of buttoncontainerWidth
- 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 fieldsheight
- the preferred height of text fieldsfontSize
- the font size of the prompt text in text fieldstextFields
- 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 labelslabels
- 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 fontlabels
- , 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 showfontSize
- the size of the fontlabel
- 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 fonttexts
- a number of texts
-
setLoadingAnimation
public static void setLoadingAnimation(javafx.scene.control.ProgressIndicator... progressIndicators)
Styles ProgressIndicators- Parameters:
progressIndicators
- an amount of progressIndicators
-
-