Fix: checkstyle issues

This commit is contained in:
Julian Kropff
2026-04-09 10:53:49 +02:00
parent e5f814b853
commit a99cf16c7e
5 changed files with 43 additions and 45 deletions
@@ -7,11 +7,11 @@ import javafx.scene.layout.VBox;
/**
* Controller for the casino gaming area.
*
* <p>Responsible for: - the display of the poker table and the player interface, - the
* processing of user input, - the interface to the game engine and the network protocol.
* <p>Responsible for: - the display of the poker table and the player interface, - the processing
* of user input, - the interface to the game engine and the network protocol.
*
* <p>Notes: - The `onTableClick()` method currently serves only as test logic.
* It may no longer be functional and will be replaced by the final game interaction in the future.
* <p>Notes: - The `onTableClick()` method currently serves only as test logic. It may no longer be
* functional and will be replaced by the final game interaction in the future.
*/
public class CasinoGameController {
@@ -12,8 +12,8 @@ import javafx.stage.Stage;
* <p>Starts the JavaFX application, loads the graphical user interface from the FXML file, and
* initializes the main stage for the game.
*
* <p>Tasks: - Loads the FXML interface "/ui-structure/Casinogameui.fxml". - Loads the
* application icon from "/images/logoinverted.png". - Starts the application in full-screen mode.
* <p>Tasks: - Loads the FXML interface "/ui-structure/Casinogameui.fxml". - Loads the application
* icon from "/images/logoinverted.png". - Starts the application in full-screen mode.
*/
public class CasinoGameUI extends Application {
@@ -33,22 +33,21 @@ import org.apache.logging.log4j.Logger;
/**
* Experimental embedded browser for Casono.
*
* <p>This class implements a simple embedded web browser based on {@link
* javafx.scene.web.WebView}. The browser primarily serves as a utility within the game to
* display external content such as web pages or videos.
* <p>This class implements a simple embedded web browser based on {@link javafx.scene.web.WebView}.
* The browser primarily serves as a utility within the game to display external content such as web
* pages or videos.
*
* <p>Status The browser is currently in an experimental phase. Some
* security mechanisms are based on experimental AI-driven recommendations and may
* change in future versions.
* <p>Status The browser is currently in an experimental phase. Some security mechanisms are based
* on experimental AI-driven recommendations and may change in future versions.
*
* <p>Purpose The browser is currently being used experimentally to: Explain poker rules directly within the game
* Display help pages or documentation Play videos (e.g., tutorials or explanations)
* <p>Purpose The browser is currently being used experimentally to: Explain poker rules directly
* within the game Display help pages or documentation Play videos (e.g., tutorials or explanations)
* via platforms such as YouTube
*
* <p>Security Mechanisms Since external websites can be loaded, some basic
* protective measures have been integrated: - Mandatory HTTPS for websites - Whitelist for known domains -
* Warning for unknown websites - JavaScript disabled by default (but can be enabled for
* Google, etc.) - Pop-up blocker - Automatic cookie deletion upon closing
* <p>Security Mechanisms Since external websites can be loaded, some basic protective measures have
* been integrated: - Mandatory HTTPS for websites - Whitelist for known domains - Warning for
* unknown websites - JavaScript disabled by default (but can be enabled for Google, etc.) - Pop-up
* blocker - Automatic cookie deletion upon closing
*/
public class CasinoBrowserController {
@@ -112,8 +111,8 @@ public class CasinoBrowserController {
/**
* Opens a new browser window and loads a specified webpage.
*
* <p>If the webpage is not on the list of trusted domains, the user
* will be asked whether the page should be loaded anyway.
* <p>If the webpage is not on the list of trusted domains, the user will be asked whether the
* page should be loaded anyway.
*
* @param url the URL of the webpage to be loaded
*/
@@ -212,7 +211,8 @@ public class CasinoBrowserController {
var stream = CasinoBrowserController.class.getResourceAsStream(LOGO_PATH);
Image logo = new Image(stream);
// Variable streamM abbreviated to comply with the 100-character limit (LineLength)
// Variable streamM abbreviated to comply with the 100-character
// limit (LineLength)
var streamM =
CasinoBrowserController.class.getResourceAsStream(LOGO_PATH_MAIN);
Image logomain = new Image(streamM);
@@ -455,12 +455,12 @@ public class CasinoBrowserController {
/**
* Loads a URL in the browser after performing basic security checks.
*
* <p>Before loading a page, the following checks are performed: - Verification of the
* protocol (only HTTPS allowed) - Verification of the domain against a whitelist - Protection against
* <p>Before loading a page, the following checks are performed: - Verification of the protocol
* (only HTTPS allowed) - Verification of the domain against a whitelist - Protection against
* domain spoofing
*
* <p>If a domain is not classified as trustworthy, the user must
* confirm that the page may still be opened.
* <p>If a domain is not classified as trustworthy, the user must confirm that the page may
* still be opened.
*
* @param engine the browser's WebEngine renderer
* @param url the web address to be loaded
@@ -13,9 +13,8 @@ import org.apache.logging.log4j.Logger;
/**
* Controller for the interactive taskbar within the poker UI.
*
* Responsible for: - Drag-and-drop movement of the taskbar,
* - Input and management of game stakes, - Control of general
* menu functions such as Exit.
* <p>Responsible for: - Drag-and-drop movement of the taskbar, - Input and management of game
* stakes, - Control of general menu functions such as Exit.
*/
public class TaskbarController {
@@ -37,8 +36,8 @@ public class TaskbarController {
private static final int CREDIT_STEP = 5;
/**
* Called when the taskbar is clicked with the mouse. Saves the relative
* position for later, correct repositioning.
* Called when the taskbar is clicked with the mouse. Saves the relative position for later,
* correct repositioning.
*
* @param event The mouse event
*/
@@ -49,11 +48,10 @@ public class TaskbarController {
}
/**
* Called while dragging the taskbar with the mouse. Updates the position
* and slightly scales the taskbar for visual feedback.
* Called while dragging the taskbar with the mouse. Updates the position and slightly scales
* the taskbar for visual feedback.
*
* <p>TODO: It still needs to be fixed that the taskbar cannot disappear out
* of the window.
* <p>TODO: It still needs to be fixed that the taskbar cannot disappear out of the window.
*
* @param event Das Mausereignis
*/
@@ -67,8 +65,8 @@ public class TaskbarController {
}
/**
* Called when the mouse cursor is released over the taskbar. Resets the
* taskbar scaling to normal size.
* Called when the mouse cursor is released over the taskbar. Resets the taskbar scaling to
* normal size.
*
* @param event The mouse event
*/
@@ -91,8 +89,8 @@ public class TaskbarController {
}
/**
* Called when the submit button in the taskbar is pressed. Triggers the
* processing of the deployment.
* Called when the submit button in the taskbar is pressed. Triggers the processing of the
* deployment.
*/
@FXML
private void onInputSubmittedAction() {
@@ -117,9 +115,9 @@ public class TaskbarController {
}
/**
* Processes the stake entered in the text field. Only integer values between 5
* and 100,000 credits are accepted, in multiples of 5 (in increments of 5).
* The stake is currently only displayed on the console.
* Processes the stake entered in the text field. Only integer values between 5 and 100,000
* credits are accepted, in multiples of 5 (in increments of 5). The stake is currently only
* displayed on the console.
*/
private void processBet() {
String input = taskbarInput.getText();
@@ -141,8 +139,8 @@ public class TaskbarController {
/**
* Opens the integrated Casono web browser.
*
* <p> TODO: Replace the start URL with the official project website
* (e.g., Tips & Tricks page) once the content for strategies and support is available.
* <p>TODO: Replace the start URL with the official project website (e.g., Tips & Tricks page)
* once the content for strategies and support is available.
*/
@FXML
private void onBrowserButtonClick() {
@@ -51,8 +51,8 @@ public class Deck {
}
/**
* Sets the cards of the deck. This method replaces the internal list
* with a copy of the provided list.
* Sets the cards of the deck. This method replaces the internal list with a copy of the
* provided list.
*
* @param cards the new list of cards to set
*/