added documentation for BuildingPropertyCard

This commit is contained in:
Yvonne Schmidt 2024-12-02 08:05:00 +01:00
parent 9e50c1afe2
commit 6f15f12b49

View File

@ -19,10 +19,20 @@ import pp.monopoly.notification.Sound;
* BuildingPropertyCard creates the popup for field information * BuildingPropertyCard creates the popup for field information
*/ */
public class BuildingPropertyCard extends Dialog { public class BuildingPropertyCard extends Dialog {
/** Reference to the Monopoly application instance. */
private final MonopolyApp app; private final MonopolyApp app;
/** Main container for the building property information. */
private final Container buildingPropertyContainer; private final Container buildingPropertyContainer;
/** Background container providing a border for the property card. */
private final Container backgroundContainer; private final Container backgroundContainer;
/**
* Constructs a property card popup displaying details about the building property.
*
* @param app the Monopoly application instance
*/
public BuildingPropertyCard(MonopolyApp app) { public BuildingPropertyCard(MonopolyApp app) {
super(app.getDialogManager()); super(app.getDialogManager());
this.app = app; this.app = app;
@ -99,7 +109,7 @@ public class BuildingPropertyCard extends Dialog {
} }
/** /**
* Schließt das Menü und entfernt die GUI-Elemente. * Closes the popup and removes the associated GUI elements.
*/ */
@Override @Override
public void close() { public void close() {
@ -108,6 +118,9 @@ public class BuildingPropertyCard extends Dialog {
super.close(); super.close();
} }
/**
* Opens the settings menu when the escape key is pressed.
*/
@Override @Override
public void escape() { public void escape() {
new SettingsMenu(app).open(); new SettingsMenu(app).open();