From a96f92148a72b3faaeab8c4c165f57ae97e9968d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 4 May 2011 17:03:16 +0200 Subject: Add some documentation to view git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@108 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/PlayerPanel.java | 5 +++++ src/jrummikub/view/impl/StartTurnPanel.java | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index 111ec1a..b7bdb32 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -50,6 +50,11 @@ class PlayerPanel extends JPanel implements IPlayerPanel { return hand; } + /** + * Sets the current player name + * + * @param playerName the player name + */ void setCurrentPlayerName(String playerName) { currentPlayerNameLabel.setText(playerName); } diff --git a/src/jrummikub/view/impl/StartTurnPanel.java b/src/jrummikub/view/impl/StartTurnPanel.java index d52ce22..ee94347 100644 --- a/src/jrummikub/view/impl/StartTurnPanel.java +++ b/src/jrummikub/view/impl/StartTurnPanel.java @@ -14,6 +14,9 @@ import javax.swing.border.EmptyBorder; import jrummikub.util.Event; import jrummikub.util.IEvent; +/** + * A panel that is displayed before a player's turn + */ @SuppressWarnings("serial") class StartTurnPanel extends JPanel { private final static int PANEL_INSET = 15; @@ -27,6 +30,9 @@ class StartTurnPanel extends JPanel { private Event startTurnEvent = new Event(); + /** + * Creates a new StartTurnPanel + */ StartTurnPanel() { setLayout(null); setBorder(new EmptyBorder(PANEL_INSET, PANEL_INSET, PANEL_INSET, @@ -56,10 +62,22 @@ class StartTurnPanel extends JPanel { }); } + /** + * Sets the current player name + * + * @param playerName + * the player name + */ void setCurrentPlayerName(String playerName) { startTurnLabel.setText("'" + playerName + "' ist jetzt an der Reihe."); } + /** + * The start turn event is emitted when the current player has clicked the + * start turn button + * + * @return the event + */ IEvent getStartTurnEvent() { return startTurnEvent; } -- cgit v1.2.3