Add bling
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@344 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
98f3e09d98
commit
66b4094d17
3 changed files with 42 additions and 17 deletions
|
@ -379,7 +379,9 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
|
|||
timeBar.setVisible(show);
|
||||
|
||||
if (!show) {
|
||||
handRowDownButton.setForeground(Color.GRAY);
|
||||
handRowDownButton.setEnabled(false);
|
||||
handRowUpButton.setForeground(Color.GRAY);
|
||||
handRowUpButton.setEnabled(false);
|
||||
endTurnButton.setVisible(false);
|
||||
redealButton.setVisible(false);
|
||||
|
@ -394,8 +396,10 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
|
|||
setEndTurnMode(false, false);
|
||||
endTurnButton.setText("<html><center>Computer denkt nach");
|
||||
hand.setStones(Collections.<Pair<Stone,Position>>emptyList());
|
||||
handRowDownButton.setForeground(Color.GRAY);
|
||||
handRowDownButton.setEnabled(false);
|
||||
handRowDownButton.setEnabled(false);
|
||||
handRowUpButton.setForeground(Color.GRAY);
|
||||
handRowUpButton.setEnabled(false);
|
||||
}
|
||||
endTurnButton.setEnabled(enable);
|
||||
redealButton.setEnabled(enable);
|
||||
|
|
|
@ -311,7 +311,7 @@ class StonePainter {
|
|||
|
||||
g.setFont(new Font("SansSerif", Font.BOLD, r.height / 4));
|
||||
FontMetrics fm = g.getFontMetrics();
|
||||
String value = Integer.toString(v);
|
||||
String value = (v > 0) ? Integer.toString(v) : Character.toString((char)(-v));
|
||||
Rectangle2D stringRect = fm.getStringBounds(value, g);
|
||||
|
||||
if (scale > 1) {
|
||||
|
|
|
@ -97,8 +97,8 @@ public class View extends JFrame implements IView {
|
|||
mainLayer.add(table);
|
||||
|
||||
playerPanel = new PlayerPanel();
|
||||
playerPanel.setBorder(new MatteBorder(PLAYER_PANEL_BORDER_WIDTH, 0, 0,
|
||||
0, Color.BLACK));
|
||||
playerPanel.setBorder(new MatteBorder(PLAYER_PANEL_BORDER_WIDTH, 0, 0, 0,
|
||||
Color.BLACK));
|
||||
mainLayer.add(playerPanel);
|
||||
|
||||
startTurnPanel = new StartTurnPanel();
|
||||
|
@ -222,20 +222,41 @@ public class View extends JFrame implements IView {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<Pair<Stone, Position>> createDecorationStones() {
|
||||
Pair<Stone, Position> stone1 = new Pair<Stone, Position>(new Stone(
|
||||
StoneColor.RED), new Position(3.5f, 0));
|
||||
Pair<Stone, Position> stone2 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.BLACK), new Position(5, 0));
|
||||
Pair<Stone, Position> stone3 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.ORANGE), new Position(6, 0));
|
||||
Pair<Stone, Position> stone4 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.BLUE), new Position(7, 0));
|
||||
Pair<Stone, Position> stone5 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.RED), new Position(8, 0));
|
||||
Pair<Stone, Position> stone6 = new Pair<Stone, Position>(new Stone(
|
||||
StoneColor.BLACK), new Position(9.5f, 0));
|
||||
Pair<Stone, Position> stoneJ = new Pair<Stone, Position>(new Stone(-'J',
|
||||
StoneColor.BLACK), new Position(2.5f, 0));
|
||||
Pair<Stone, Position> stoneR = new Pair<Stone, Position>(new Stone(-'R',
|
||||
StoneColor.ORANGE), new Position(3.5f, 0));
|
||||
Pair<Stone, Position> stoneu1 = new Pair<Stone, Position>(new Stone(-'u',
|
||||
StoneColor.BLUE), new Position(4.5f, 0));
|
||||
Pair<Stone, Position> stonem1 = new Pair<Stone, Position>(new Stone(-'m',
|
||||
StoneColor.RED), new Position(5.5f, 0));
|
||||
Pair<Stone, Position> stonem2 = new Pair<Stone, Position>(new Stone(-'m',
|
||||
StoneColor.GREEN), new Position(6.5f, 0));
|
||||
Pair<Stone, Position> stonei = new Pair<Stone, Position>(new Stone(-'i',
|
||||
StoneColor.VIOLET), new Position(7.5f, 0));
|
||||
Pair<Stone, Position> stonek = new Pair<Stone, Position>(new Stone(-'k',
|
||||
StoneColor.AQUA), new Position(8.5f, 0));
|
||||
Pair<Stone, Position> stoneu2 = new Pair<Stone, Position>(new Stone(-'u',
|
||||
StoneColor.GRAY), new Position(9.5f, 0));
|
||||
Pair<Stone, Position> stoneb = new Pair<Stone, Position>(new Stone(-'b',
|
||||
StoneColor.BLACK), new Position(10.5f, 0));
|
||||
|
||||
return Arrays.asList(stone1, stone2, stone3, stone4, stone5, stone6);
|
||||
Pair<Stone, Position> stone1 = new Pair<Stone, Position>(new Stone(
|
||||
StoneColor.RED), new Position(2, 1));
|
||||
Pair<Stone, Position> stone2 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.BLACK), new Position(5, 1));
|
||||
Pair<Stone, Position> stone3 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.ORANGE), new Position(6, 1));
|
||||
Pair<Stone, Position> stone4 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.BLUE), new Position(7, 1));
|
||||
Pair<Stone, Position> stone5 = new Pair<Stone, Position>(new Stone(13,
|
||||
StoneColor.RED), new Position(8, 1));
|
||||
Pair<Stone, Position> stone6 = new Pair<Stone, Position>(new Stone(
|
||||
StoneColor.BLACK), new Position(11, 1));
|
||||
|
||||
return Arrays
|
||||
.asList(stoneJ, stoneR, stoneu1, stonem1, stonem2, stonei, stonek,
|
||||
stoneu2, stoneb, stone1, stone2, stone3, stone4, stone5, stone6);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Reference in a new issue