Move getHandPanel from IPlayerPanel to IView
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@245 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
604ef91282
commit
a4f5beb005
8 changed files with 81 additions and 72 deletions
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue