summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-05-03 17:40:08 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-05-03 17:40:08 +0200
commit2eaf873ec6dc8b7362896cdfe7fe1dc78230b18e (patch)
treeded81f80fa1b2a48d69cc2dd72d4e67c2265c435 /src/jrummikub/view
parent6161c4b1d4d9b5a47775d32dfa198003ddb5afb5 (diff)
downloadJRummikub-2eaf873ec6dc8b7362896cdfe7fe1dc78230b18e.tar
JRummikub-2eaf873ec6dc8b7362896cdfe7fe1dc78230b18e.zip
Change sort events to 'Sort by runs' and 'Sort by groups'
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@82 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view')
-rw-r--r--src/jrummikub/view/IPlayerPanel.java12
-rw-r--r--src/jrummikub/view/impl/PlayerPanel.java50
2 files changed, 31 insertions, 31 deletions
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));
}
}