summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/View.java8
-rw-r--r--src/jrummikub/view/impl/WinPanel.java42
2 files changed, 25 insertions, 25 deletions
diff --git a/src/jrummikub/view/impl/View.java b/src/jrummikub/view/impl/View.java
index 9290b60..74c6d54 100644
--- a/src/jrummikub/view/impl/View.java
+++ b/src/jrummikub/view/impl/View.java
@@ -136,13 +136,13 @@ public class View extends JFrame implements IView {
}
@Override
- public IEvent getNewGameEvent() {
- return winPanel.getNewGameEvent();
+ public IEvent getNewRoundEvent() {
+ return winPanel.getNewRoundEvent();
}
@Override
- public IEvent getQuitEvent() {
- return winPanel.getQuitEvent();
+ public IEvent getFinalScoreEvent() {
+ return winPanel.getFinalScoreEvent();
}
}
diff --git a/src/jrummikub/view/impl/WinPanel.java b/src/jrummikub/view/impl/WinPanel.java
index 07c3535..13a7eb4 100644
--- a/src/jrummikub/view/impl/WinPanel.java
+++ b/src/jrummikub/view/impl/WinPanel.java
@@ -26,11 +26,11 @@ class WinPanel extends JPanel {
private final static float MAX_BUTTON_FONT_SIZE = 12;
private JLabel winLabel;
- private JButton newGameButton;
- private JButton quitButton;
+ private JButton newRoundButton;
+ private JButton finalScoreButton;
- private Event quitEvent = new Event();
- private Event newGameEvent = new Event();
+ private Event finalScoreEvent = new Event();
+ private Event newRoundEvent = new Event();
/**
* Creates a new WinPanel
@@ -47,23 +47,23 @@ class WinPanel extends JPanel {
winLabel.setVerticalTextPosition(JLabel.CENTER);
add(winLabel);
- newGameButton = new JButton("Neues Spiel");
- newGameButton.addActionListener(new ActionListener() {
+ newRoundButton = new JButton("Neue Runde");
+ newRoundButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- newGameEvent.emit();
+ newRoundEvent.emit();
}
});
- add(newGameButton);
+ add(newRoundButton);
- quitButton = new JButton("Beenden");
- quitButton.addActionListener(new ActionListener() {
+ finalScoreButton = new JButton("Endauswertung");
+ finalScoreButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- quitEvent.emit();
+ finalScoreEvent.emit();
}
});
- add(quitButton);
+ add(finalScoreButton);
addComponentListener(new ComponentAdapter() {
@Override
@@ -84,12 +84,12 @@ class WinPanel extends JPanel {
}
/**
- * The new game event is emitted when the player wants to start a new game
+ * The new round event is emitted when the player wants to start a new round
*
* @return the event
*/
- IEvent getNewGameEvent() {
- return newGameEvent;
+ IEvent getNewRoundEvent() {
+ return newRoundEvent;
}
/**
@@ -97,8 +97,8 @@ class WinPanel extends JPanel {
*
* @return the event
*/
- IEvent getQuitEvent() {
- return quitEvent;
+ IEvent getFinalScoreEvent() {
+ return finalScoreEvent;
}
private void rescale() {
@@ -119,12 +119,12 @@ class WinPanel extends JPanel {
fontSize = MAX_BUTTON_FONT_SIZE;
winLabel.setBounds(x, y, width, firstLineHeight);
- newGameButton.setBounds(x, y + firstLineHeight + PANEL_SEPARATOR,
+ newRoundButton.setBounds(x, y + firstLineHeight + PANEL_SEPARATOR,
buttonWidth, buttonHeight);
- newGameButton.setFont(newGameButton.getFont().deriveFont(fontSize));
+ newRoundButton.setFont(newRoundButton.getFont().deriveFont(fontSize));
- quitButton.setBounds(x + buttonWidth + PANEL_SEPARATOR, y + firstLineHeight
+ finalScoreButton.setBounds(x + buttonWidth + PANEL_SEPARATOR, y + firstLineHeight
+ PANEL_SEPARATOR, buttonWidth, buttonHeight);
- quitButton.setFont(quitButton.getFont().deriveFont(fontSize));
+ finalScoreButton.setFont(finalScoreButton.getFont().deriveFont(fontSize));
}
}