diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-04 17:03:16 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-04 17:03:16 +0200 |
commit | a96f92148a72b3faaeab8c4c165f57ae97e9968d (patch) | |
tree | f34db44e5028842f0bd84efd023dee13e337cde3 /src/jrummikub/view/impl | |
parent | e3e0e301a38e134ebb71e9a7905f76ff65dc4110 (diff) | |
download | JRummikub-a96f92148a72b3faaeab8c4c165f57ae97e9968d.tar JRummikub-a96f92148a72b3faaeab8c4c165f57ae97e9968d.zip |
Add some documentation to view
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@108 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r-- | src/jrummikub/view/impl/PlayerPanel.java | 5 | ||||
-rw-r--r-- | src/jrummikub/view/impl/StartTurnPanel.java | 18 |
2 files changed, 23 insertions, 0 deletions
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;
}
|