From a4f5beb00598f577598a0e39e4e1099d9ea6e1e6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 16 May 2011 22:09:56 +0200 Subject: Move getHandPanel from IPlayerPanel to IView git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@245 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/IPlayerPanel.java | 5 ----- src/jrummikub/view/IView.java | 5 +++++ src/jrummikub/view/impl/PlayerPanel.java | 3 +-- src/jrummikub/view/impl/View.java | 6 ++++++ 4 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/jrummikub/view') diff --git a/src/jrummikub/view/IPlayerPanel.java b/src/jrummikub/view/IPlayerPanel.java index 86c1440..3fb8709 100644 --- a/src/jrummikub/view/IPlayerPanel.java +++ b/src/jrummikub/view/IPlayerPanel.java @@ -6,11 +6,6 @@ import jrummikub.util.IEvent; * The player panel that contains a player's board and other user interfaces */ public interface IPlayerPanel { - /** - * @return the board where the players hand stones are displayed - */ - public IHandPanel getHandPanel(); - /** * Sets the time the player has left for his turn * diff --git a/src/jrummikub/view/IView.java b/src/jrummikub/view/IView.java index d69d942..5828edd 100644 --- a/src/jrummikub/view/IView.java +++ b/src/jrummikub/view/IView.java @@ -16,6 +16,11 @@ public interface IView { */ public ITablePanel getTablePanel(); + /** + * @return the board where the players hand stones are displayed + */ + public IHandPanel getHandPanel(); + /** * Returns the player panel * diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index 20fb05a..8d0719a 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -49,8 +49,7 @@ class PlayerPanel extends JPanel implements IPlayerPanel { private Event sortByRunsEvent = new Event(); private Event endTurnEvent = new Event(); - @Override - public HandPanel getHandPanel() { + HandPanel getHandPanel() { return hand; } diff --git a/src/jrummikub/view/impl/View.java b/src/jrummikub/view/impl/View.java index 869f4cd..9290b60 100644 --- a/src/jrummikub/view/impl/View.java +++ b/src/jrummikub/view/impl/View.java @@ -11,6 +11,7 @@ import javax.swing.border.MatteBorder; import jrummikub.model.Stone; import jrummikub.util.IEvent; +import jrummikub.view.IHandPanel; import jrummikub.view.IPlayerPanel; import jrummikub.view.ITablePanel; import jrummikub.view.IView; @@ -38,6 +39,11 @@ public class View extends JFrame implements IView { return table; } + @Override + public IHandPanel getHandPanel() { + return playerPanel.getHandPanel(); + } + @Override public IPlayerPanel getPlayerPanel() { return playerPanel; -- cgit v1.2.3