Renamed WinPanel to RoundEndPanel
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@578 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
77e119e77d
commit
86eeace673
2 changed files with 12 additions and 12 deletions
|
@ -19,7 +19,7 @@ import jrummikub.view.IView.BottomPanelType;
|
|||
* A panel that is displayed when a player has won
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
class WinPanel extends JPanel {
|
||||
class RoundEndPanel extends JPanel {
|
||||
private final static int PANEL_INSET = 15;
|
||||
private final static int PANEL_SEPARATOR = 10;
|
||||
@SuppressWarnings("unused")
|
||||
|
@ -42,7 +42,7 @@ class WinPanel extends JPanel {
|
|||
/**
|
||||
* Creates a new WinPanel
|
||||
*/
|
||||
WinPanel() {
|
||||
RoundEndPanel() {
|
||||
setLayout(null);
|
||||
setBorder(new EmptyBorder(PANEL_INSET, PANEL_INSET, PANEL_INSET,
|
||||
PANEL_INSET));
|
|
@ -66,7 +66,7 @@ public class View extends JFrame implements IView {
|
|||
private PlayerPanel playerPanel;
|
||||
private StartTurnPanel startTurnPanel;
|
||||
private PausePanel pausePanel;
|
||||
private WinPanel winPanel;
|
||||
private RoundEndPanel roundEndPanel;
|
||||
private SettingsPanel settingsPanel;
|
||||
private LoginPanel loginPanel;
|
||||
private ScorePanel scorePanel;
|
||||
|
@ -408,9 +408,9 @@ public class View extends JFrame implements IView {
|
|||
pausePanel.setVisible(false);
|
||||
mainLayer.add(pausePanel);
|
||||
|
||||
winPanel = new WinPanel();
|
||||
winPanel.setVisible(false);
|
||||
mainLayer.add(winPanel);
|
||||
roundEndPanel = new RoundEndPanel();
|
||||
roundEndPanel.setVisible(false);
|
||||
mainLayer.add(roundEndPanel);
|
||||
|
||||
sidePanel = new SidePanel();
|
||||
sidePanel.setVisible(false);
|
||||
|
@ -460,7 +460,7 @@ public class View extends JFrame implements IView {
|
|||
}
|
||||
startTurnPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||
pausePanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||
winPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||
roundEndPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||
|
||||
rescaleSubpanel(settingsPanel, 1 / 2.0, 1 / 2.0, 475, 300);
|
||||
rescaleSubpanel(scorePanel, 3 / 4.0, 1 / 2.0, 450, 300);
|
||||
|
@ -606,17 +606,17 @@ public class View extends JFrame implements IView {
|
|||
|
||||
@Override
|
||||
public IEvent getNewRoundEvent() {
|
||||
return winPanel.getNewRoundEvent();
|
||||
return roundEndPanel.getNewRoundEvent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent getNewGameEvent() {
|
||||
return winPanel.getNewGameEvent();
|
||||
return roundEndPanel.getNewGameEvent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent getEndProgramEvent() {
|
||||
return winPanel.getEndProgramEvent();
|
||||
return roundEndPanel.getEndProgramEvent();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -673,8 +673,8 @@ public class View extends JFrame implements IView {
|
|||
|
||||
boolean showWinPanel = (type == BottomPanelType.WIN_PANEL
|
||||
|| type == BottomPanelType.NETWORK_WIN_PANEL || type == BottomPanelType.NETWORK_CONNECTION_LOST_PANEL);
|
||||
winPanel.setType(type);
|
||||
winPanel.setVisible(showWinPanel);
|
||||
roundEndPanel.setType(type);
|
||||
roundEndPanel.setVisible(showWinPanel);
|
||||
|
||||
playerPanel.setVisible((!showStartTurnPanel) && (!showWinPanel)
|
||||
&& type != null);
|
||||
|
|
Reference in a new issue