Package visuals.stats

Class LeaderboardsController

java.lang.Object
visuals.stats.LeaderboardsController

public class LeaderboardsController extends Object
  • Field Details

    • buttonReturn

      public Button buttonReturn
    • buttonEasy

      public Button buttonEasy
    • buttonMedium

      public Button buttonMedium
    • buttonHard

      public Button buttonHard
    • buttonUserGlobal

      public Button buttonUserGlobal
    • scoreTable

      public TableView<Score> scoreTable
    • anchorLbs

      public AnchorPane anchorLbs
    • labelTitle

      public Label labelTitle
    • buttonRefresh

      public Button buttonRefresh
    • labelInfo

      public Label labelInfo
    • chartPane

      public Pane chartPane
    • rugsweeper

      public ImageView rugsweeper
    • leaderBlack

      AnchorPane leaderBlack
    • scoreController

      private ScoreController scoreController
    • userController

      private UserController userController
    • showUserOnly

      private boolean showUserOnly
    • currentMode

      private ModeType currentMode
    • chartGUI

      ChartGUI chartGUI
    • isChartOnline

      private Boolean isChartOnline
    • r

      final ResourceBundle 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

      private void styleButton(Button b)
      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

      private void updateTable(ModeType mode, boolean userOnly)
      Updates the tableview with new scores
      Parameters:
      mode - difficulty mode
      userOnly - 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

      public void changeLanguage(Locale locale)