summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/Table.java
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-04-29 16:25:32 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-04-29 16:25:32 +0200
commit96cb7454884ed896c0e3305e86212a5c01240d5f (patch)
tree695e971405d3f9fda0d9f660222bbcf8d3f56e98 /src/jrummikub/view/Table.java
parent839e020f4bbd85a76a970cf7c56538a82e1075b6 (diff)
downloadJRummikub-96cb7454884ed896c0e3305e86212a5c01240d5f.tar
JRummikub-96cb7454884ed896c0e3305e86212a5c01240d5f.zip
Restructured view package
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@17 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/view/Table.java')
-rw-r--r--src/jrummikub/view/Table.java67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/jrummikub/view/Table.java b/src/jrummikub/view/Table.java
deleted file mode 100644
index f1197b7..0000000
--- a/src/jrummikub/view/Table.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package jrummikub.view;
-
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Graphics;
-
-import javax.swing.ImageIcon;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-
-@SuppressWarnings("serial")
-public class Table extends JPanel implements ITable {
- private final static ImageIcon background = new ImageIcon(Board.class.getResource("resource/felt.png"));
-
- private JLabel leftPlayerLabel, topPlayerLabel, rightPlayerLabel;
- private JPanel innerPanel;
-
-
- @Override
- public void setLeftPlayerName(String playerName) {
- leftPlayerLabel.setText(playerName);
- }
-
- @Override
- public void setTopPlayerName(String playerName) {
- topPlayerLabel.setText(playerName);
- }
-
- @Override
- public void setRightPlayerName(String playerName) {
- rightPlayerLabel.setText(playerName);
- }
-
- Table() {
- super(true); // set double buffered
- setLayout(new BorderLayout());
-
- leftPlayerLabel = new JLabel();
- leftPlayerLabel.setForeground(Color.WHITE);
- add(leftPlayerLabel, BorderLayout.WEST);
-
- topPlayerLabel = new JLabel();
- topPlayerLabel.setHorizontalAlignment(JLabel.CENTER);
- topPlayerLabel.setHorizontalTextPosition(JLabel.CENTER);
- topPlayerLabel.setForeground(Color.WHITE);
- add(topPlayerLabel, BorderLayout.NORTH);
-
- rightPlayerLabel = new JLabel();
- rightPlayerLabel.setForeground(Color.WHITE);
- add(rightPlayerLabel, BorderLayout.EAST);
-
- innerPanel = new JPanel();
- innerPanel.setOpaque(false);
- add(innerPanel, BorderLayout.CENTER);
- }
-
- @Override
- protected void paintComponent(Graphics g) {
- for(int x = 0; x < getWidth(); x += background.getIconWidth()) {
- for(int y = 0; y < getHeight(); y += background.getIconHeight()) {
- background.paintIcon(this, g, x, y);
- }
- }
-
- // TODO Rest of painting code
- }
-}