Package visuals.stats
Class LeaderboardsController
java.lang.Object
visuals.stats.LeaderboardsController
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ChartGUIprivate ModeTypeprivate Boolean(package private) AnchorPane(package private) final ResourceBundleprivate ScoreControllerprivate booleanprivate UserController -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidblackOff()voidchangeLanguage(Locale locale) private voidchart()private voidprivate voidInitializes the controller class.private voidinitializes the tableview, adds columns, fills them and styles the whole thingprivate voidinitView()Initializes the fxml elements in view.voidsets the current mode to easy and updates the tableviewvoidsets the current mode to hard and updates the tableviewvoidsets the current mode to medium and updates the tableviewvoidreloads scores from servervoidreturns to main menuvoidtoggles between showing user scores and global scoresprivate voidset fonts get the font from resources folder buttons set font and background should be dark purple with white font also add hover light purple hover effectprivate voidupdates the info label to reflect currently displayed scoresprivate voidupdateTable(ModeType mode, boolean userOnly) Updates the tableview with new scores
-
Field Details
-
buttonReturn
-
buttonEasy
-
buttonMedium
-
buttonHard
-
buttonUserGlobal
-
scoreTable
-
anchorLbs
-
labelTitle
-
buttonRefresh
-
labelInfo
-
chartPane
-
rugsweeper
-
leaderBlack
AnchorPane leaderBlack -
scoreController
-
userController
-
showUserOnly
private boolean showUserOnly -
currentMode
-
chartGUI
ChartGUI chartGUI -
isChartOnline
-
r
-
-
Constructor Details
-
LeaderboardsController
public LeaderboardsController()
-
-
Method Details
-
initialize
private void initialize()Initializes the controller class. This method is automatically called after the fxml file has been loaded. -
blackOff
private void blackOff() -
initView
private void initView()Initializes the fxml elements in view. calls initTable(), sets styles. -
chart
private void chart() -
styleButton
set fonts get the font from resources folder buttons set font and background should be dark purple with white font also add hover light purple hover effect- Parameters:
b- Button to style
-
initTable
private void initTable()initializes the tableview, adds columns, fills them and styles the whole thing -
updateTable
Updates the tableview with new scores- Parameters:
mode- difficulty modeuserOnly- if true, only shows user scores, else shows all scores
-
chartReCreation
private void chartReCreation() -
setButtonEasy
public void setButtonEasy()sets the current mode to easy and updates the tableview -
setButtonMedium
public void setButtonMedium()sets the current mode to medium and updates the tableview -
setButtonHard
public void setButtonHard()sets the current mode to hard and updates the tableview -
setButtonUserGlobal
public void setButtonUserGlobal()toggles between showing user scores and global scores -
setButtonReturn
public void setButtonReturn()returns to main menu -
updateLabelInfo
private void updateLabelInfo()updates the info label to reflect currently displayed scores -
setButtonRefresh
public void setButtonRefresh()reloads scores from server -
changeLanguage
-