summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl/GameListPanel.java
diff options
context:
space:
mode:
authorIda Massow <massow@informatik.uni-luebeck.de>2011-06-17 20:00:43 +0200
committerIda Massow <massow@informatik.uni-luebeck.de>2011-06-17 20:00:43 +0200
commit4f71c5cb4700b39d816c6a4ae123ad94fef456df (patch)
tree3ed53d9d84956179e86b5483c8d07bd767d4b0f8 /src/jrummikub/view/impl/GameListPanel.java
parent2c9f1d5d202ca1cea69846aea42a4962e7482a6b (diff)
downloadJRummikub-4f71c5cb4700b39d816c6a4ae123ad94fef456df.tar
JRummikub-4f71c5cb4700b39d816c6a4ae123ad94fef456df.zip
Kommentare und 2 Methoden, die jetzt kurz genug sind
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@446 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/impl/GameListPanel.java')
-rw-r--r--src/jrummikub/view/impl/GameListPanel.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/jrummikub/view/impl/GameListPanel.java b/src/jrummikub/view/impl/GameListPanel.java
index b7b170b..e1e1c9d 100644
--- a/src/jrummikub/view/impl/GameListPanel.java
+++ b/src/jrummikub/view/impl/GameListPanel.java
@@ -31,6 +31,8 @@ import jrummikub.util.IEvent1;
import jrummikub.view.IGameListPanel;
class GameListPanel extends JPanel implements IGameListPanel {
+ private static final long serialVersionUID = 1L;
+
private JLabel title;
private JList gameList;
private JButton joinButton;
@@ -67,6 +69,13 @@ class GameListPanel extends JPanel implements IGameListPanel {
c.weighty = 0;
add(Box.createVerticalStrut(3), c);
+ addButtons(c);
+
+ setBorder(new CompoundBorder(new LineBorder(Color.BLACK),
+ new EmptyBorder(10, 10, 10, 10)));
+ }
+
+ private void addButtons(GridBagConstraints c) {
joinButton = new JButton("Beitreten");
c.gridwidth = 1;
add(joinButton, c);
@@ -109,9 +118,6 @@ class GameListPanel extends JPanel implements IGameListPanel {
cancelEvent.emit();
}
});
-
- setBorder(new CompoundBorder(new LineBorder(Color.BLACK), new EmptyBorder(
- 10, 10, 10, 10)));
}
void reset() {
@@ -157,6 +163,7 @@ class GameListPanel extends JPanel implements IGameListPanel {
private static class GameDataCellRenderer extends JPanel implements
ListCellRenderer {
+ private static final long serialVersionUID = -892701906163443927L;
JLabel hostLabel, playerCountLabel;
GameDataCellRenderer() {
@@ -193,7 +200,8 @@ class GameListPanel extends JPanel implements IGameListPanel {
int total = gameData.getGameSettings().getPlayerList().size();
int occupied = total;
- for (PlayerSettings player : gameData.getGameSettings().getPlayerList()) {
+ for (PlayerSettings player : gameData.getGameSettings()
+ .getPlayerList()) {
if (player.getType() == Type.VACANT) {
occupied--;
}