summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/JRummikub.java8
-rw-r--r--src/jrummikub/view/IPlayerPanel.java12
-rw-r--r--src/jrummikub/view/impl/PlayerPanel.java50
3 files changed, 35 insertions, 35 deletions
diff --git a/src/jrummikub/JRummikub.java b/src/jrummikub/JRummikub.java
index 571e679..e02008e 100644
--- a/src/jrummikub/JRummikub.java
+++ b/src/jrummikub/JRummikub.java
@@ -38,16 +38,16 @@ public class JRummikub {
view.getTablePanel().setTopPlayerName("Player 3");
view.getTablePanel().setRightPlayerName("Player 4");
- view.getPlayerPanel().getSortByNumberEvent().add(new IListener() {
+ view.getPlayerPanel().getSortByGroupsEvent().add(new IListener() {
@Override
public void handle() {
- System.out.println("'Sort by number' fired");
+ System.out.println("'Sort by groups' fired");
}
});
- view.getPlayerPanel().getSortByColorEvent().add(new IListener() {
+ view.getPlayerPanel().getSortByRunsEvent().add(new IListener() {
@Override
public void handle() {
- System.out.println("'Sort by color' fired");
+ System.out.println("'Sort by runs' fired");
}
});
view.getPlayerPanel().getEndTurnEvent().add(new IListener() {
diff --git a/src/jrummikub/view/IPlayerPanel.java b/src/jrummikub/view/IPlayerPanel.java
index f07ced4..dd24e33 100644
--- a/src/jrummikub/view/IPlayerPanel.java
+++ b/src/jrummikub/view/IPlayerPanel.java
@@ -28,20 +28,20 @@ public interface IPlayerPanel {
public void setTimeLeft(int time);
/**
- * The sort by number event is emitted when the player wants to sort his
- * stones by number
+ * The sort by groups event is emitted when the player wants to sort his
+ * stones by groups
*
* @return the event
*/
- public IEvent getSortByNumberEvent();
+ public IEvent getSortByGroupsEvent();
/**
- * The sort by number event is emitted when the player wants to sort his
- * stones by number
+ * The sort by runs event is emitted when the player wants to sort his stones
+ * by runs
*
* @return the event
*/
- public IEvent getSortByColorEvent();
+ public IEvent getSortByRunsEvent();
/**
* The end turn event is emitted when the player wants to end his turn
diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java
index 385356b..10bd111 100644
--- a/src/jrummikub/view/impl/PlayerPanel.java
+++ b/src/jrummikub/view/impl/PlayerPanel.java
@@ -36,13 +36,13 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
private JPanel leftPanel, rightPanel;
private JLabel currentPlayerNameLabel;
- private JButton sortByNumberButton;
- private JButton sortByColorButton;
+ private JButton sortByGroupsButton;
+ private JButton sortByRunsButton;
private JProgressBar timeBar;
private JButton endTurnButton;
- private Event sortByNumberEvent = new Event();
- private Event sortByColorEvent = new Event();
+ private Event sortByGroupsEvent = new Event();
+ private Event sortByRunsEvent = new Event();
private Event endTurnEvent = new Event();
@Override
@@ -63,13 +63,13 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
}
@Override
- public IEvent getSortByNumberEvent() {
- return sortByNumberEvent;
+ public IEvent getSortByGroupsEvent() {
+ return sortByGroupsEvent;
}
@Override
- public IEvent getSortByColorEvent() {
- return sortByColorEvent;
+ public IEvent getSortByRunsEvent() {
+ return sortByRunsEvent;
}
@Override
@@ -90,27 +90,27 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
currentPlayerNameLabel.setVerticalTextPosition(JLabel.CENTER);
leftPanel.add(currentPlayerNameLabel);
- sortByNumberButton = new JButton("<html><center>Sort by number");
- sortByNumberButton.setFont(sortByNumberButton.getFont().deriveFont(0));
- sortByNumberButton.setMargin(new Insets(0, 0, 0, 0));
- sortByNumberButton.addActionListener(new ActionListener() {
+ sortByGroupsButton = new JButton("<html><center>Nach Gruppen sortieren");
+ sortByGroupsButton.setFont(sortByGroupsButton.getFont().deriveFont(0));
+ sortByGroupsButton.setMargin(new Insets(0, 0, 0, 0));
+ sortByGroupsButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- sortByNumberEvent.emit();
+ sortByGroupsEvent.emit();
}
});
- leftPanel.add(sortByNumberButton);
+ leftPanel.add(sortByGroupsButton);
- sortByColorButton = new JButton("<html><center>Sort by color");
- sortByColorButton.setFont(sortByColorButton.getFont().deriveFont(0));
- sortByNumberButton.setMargin(new Insets(0, 0, 0, 0));
- sortByColorButton.addActionListener(new ActionListener() {
+ sortByRunsButton = new JButton("<html><center>Nach Reihen sortieren");
+ sortByRunsButton.setFont(sortByRunsButton.getFont().deriveFont(0));
+ sortByRunsButton.setMargin(new Insets(0, 0, 0, 0));
+ sortByRunsButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
- sortByColorEvent.emit();
+ sortByRunsEvent.emit();
}
});
- leftPanel.add(sortByColorButton);
+ leftPanel.add(sortByRunsButton);
leftPanel.addComponentListener(new LeftPanelResizeListener());
}
@@ -125,7 +125,7 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
timeBar.setStringPainted(true);
rightPanel.add(timeBar);
- endTurnButton = new JButton("End turn");
+ endTurnButton = new JButton("Zug beenden");
endTurnButton.setFont(endTurnButton.getFont().deriveFont(0));
endTurnButton.setMargin(new Insets(0, 0, 0, 0));
endTurnButton.addActionListener(new ActionListener() {
@@ -202,14 +202,14 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
fontSize = MAX_BUTTON_FONT_SIZE;
currentPlayerNameLabel.setBounds(x, y, width, firstLineHeight);
- sortByNumberButton.setBounds(x, y + firstLineHeight
+ sortByGroupsButton.setBounds(x, y + firstLineHeight
+ SIDE_PANEL_SEPARATOR, buttonWidth, buttonHeight);
- sortByColorButton.setBounds(x + buttonWidth + SIDE_PANEL_SEPARATOR, y
+ sortByRunsButton.setBounds(x + buttonWidth + SIDE_PANEL_SEPARATOR, y
+ firstLineHeight + SIDE_PANEL_SEPARATOR, buttonWidth, buttonHeight);
- sortByNumberButton.setFont(sortByNumberButton.getFont().deriveFont(
+ sortByGroupsButton.setFont(sortByGroupsButton.getFont().deriveFont(
fontSize));
- sortByColorButton.setFont(sortByColorButton.getFont()
+ sortByRunsButton.setFont(sortByRunsButton.getFont()
.deriveFont(fontSize));
}
}