diff options
-rw-r--r-- | src/jrummikub/view/impl/WinPanel.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/jrummikub/view/impl/WinPanel.java b/src/jrummikub/view/impl/WinPanel.java index cd63540..45cc878 100644 --- a/src/jrummikub/view/impl/WinPanel.java +++ b/src/jrummikub/view/impl/WinPanel.java @@ -14,6 +14,10 @@ import javax.swing.border.EmptyBorder; import jrummikub.util.Event; import jrummikub.util.IEvent; +/** + * A panel that is displayed when a player has won + */ +@SuppressWarnings("serial") public class WinPanel extends JPanel { private final static int PANEL_INSET = 15; private final static int PANEL_SEPARATOR = 10; @@ -28,6 +32,9 @@ public class WinPanel extends JPanel { private Event quitEvent = new Event(); private Event newGameEvent = new Event(); + /** + * Creates a new WinPanel + */ WinPanel() { setLayout(null); setBorder(new EmptyBorder(PANEL_INSET, PANEL_INSET, PANEL_INSET, @@ -66,10 +73,20 @@ public class WinPanel extends JPanel { }); } + /** + * The new game event is emitted when the player wants to start a new game + * + * @return the event + */ IEvent getNewGameEvent() { return newGameEvent; } + /** + * The quit event is emitted when the player wants to quit the program + * + * @return the event + */ IEvent getQuitEvent() { return quitEvent; } |