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
|
* A panel that is displayed when a player has won
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
class WinPanel extends JPanel {
|
class RoundEndPanel extends JPanel {
|
||||||
private final static int PANEL_INSET = 15;
|
private final static int PANEL_INSET = 15;
|
||||||
private final static int PANEL_SEPARATOR = 10;
|
private final static int PANEL_SEPARATOR = 10;
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
@ -42,7 +42,7 @@ class WinPanel extends JPanel {
|
||||||
/**
|
/**
|
||||||
* Creates a new WinPanel
|
* Creates a new WinPanel
|
||||||
*/
|
*/
|
||||||
WinPanel() {
|
RoundEndPanel() {
|
||||||
setLayout(null);
|
setLayout(null);
|
||||||
setBorder(new EmptyBorder(PANEL_INSET, PANEL_INSET, PANEL_INSET,
|
setBorder(new EmptyBorder(PANEL_INSET, PANEL_INSET, PANEL_INSET,
|
||||||
PANEL_INSET));
|
PANEL_INSET));
|
|
@ -66,7 +66,7 @@ public class View extends JFrame implements IView {
|
||||||
private PlayerPanel playerPanel;
|
private PlayerPanel playerPanel;
|
||||||
private StartTurnPanel startTurnPanel;
|
private StartTurnPanel startTurnPanel;
|
||||||
private PausePanel pausePanel;
|
private PausePanel pausePanel;
|
||||||
private WinPanel winPanel;
|
private RoundEndPanel roundEndPanel;
|
||||||
private SettingsPanel settingsPanel;
|
private SettingsPanel settingsPanel;
|
||||||
private LoginPanel loginPanel;
|
private LoginPanel loginPanel;
|
||||||
private ScorePanel scorePanel;
|
private ScorePanel scorePanel;
|
||||||
|
@ -408,9 +408,9 @@ public class View extends JFrame implements IView {
|
||||||
pausePanel.setVisible(false);
|
pausePanel.setVisible(false);
|
||||||
mainLayer.add(pausePanel);
|
mainLayer.add(pausePanel);
|
||||||
|
|
||||||
winPanel = new WinPanel();
|
roundEndPanel = new RoundEndPanel();
|
||||||
winPanel.setVisible(false);
|
roundEndPanel.setVisible(false);
|
||||||
mainLayer.add(winPanel);
|
mainLayer.add(roundEndPanel);
|
||||||
|
|
||||||
sidePanel = new SidePanel();
|
sidePanel = new SidePanel();
|
||||||
sidePanel.setVisible(false);
|
sidePanel.setVisible(false);
|
||||||
|
@ -460,7 +460,7 @@ public class View extends JFrame implements IView {
|
||||||
}
|
}
|
||||||
startTurnPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
startTurnPanel.setBounds(0, tableHeight, width, playerPanelHeight);
|
||||||
pausePanel.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(settingsPanel, 1 / 2.0, 1 / 2.0, 475, 300);
|
||||||
rescaleSubpanel(scorePanel, 3 / 4.0, 1 / 2.0, 450, 300);
|
rescaleSubpanel(scorePanel, 3 / 4.0, 1 / 2.0, 450, 300);
|
||||||
|
@ -606,17 +606,17 @@ public class View extends JFrame implements IView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getNewRoundEvent() {
|
public IEvent getNewRoundEvent() {
|
||||||
return winPanel.getNewRoundEvent();
|
return roundEndPanel.getNewRoundEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getNewGameEvent() {
|
public IEvent getNewGameEvent() {
|
||||||
return winPanel.getNewGameEvent();
|
return roundEndPanel.getNewGameEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEvent getEndProgramEvent() {
|
public IEvent getEndProgramEvent() {
|
||||||
return winPanel.getEndProgramEvent();
|
return roundEndPanel.getEndProgramEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -673,8 +673,8 @@ public class View extends JFrame implements IView {
|
||||||
|
|
||||||
boolean showWinPanel = (type == BottomPanelType.WIN_PANEL
|
boolean showWinPanel = (type == BottomPanelType.WIN_PANEL
|
||||||
|| type == BottomPanelType.NETWORK_WIN_PANEL || type == BottomPanelType.NETWORK_CONNECTION_LOST_PANEL);
|
|| type == BottomPanelType.NETWORK_WIN_PANEL || type == BottomPanelType.NETWORK_CONNECTION_LOST_PANEL);
|
||||||
winPanel.setType(type);
|
roundEndPanel.setType(type);
|
||||||
winPanel.setVisible(showWinPanel);
|
roundEndPanel.setVisible(showWinPanel);
|
||||||
|
|
||||||
playerPanel.setVisible((!showStartTurnPanel) && (!showWinPanel)
|
playerPanel.setVisible((!showStartTurnPanel) && (!showWinPanel)
|
||||||
&& type != null);
|
&& type != null);
|
||||||
|
|
Reference in a new issue