summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/view/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/view/impl')
-rw-r--r--src/jrummikub/view/impl/View.java45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/jrummikub/view/impl/View.java b/src/jrummikub/view/impl/View.java
index 75b2fc6..45f825a 100644
--- a/src/jrummikub/view/impl/View.java
+++ b/src/jrummikub/view/impl/View.java
@@ -160,19 +160,15 @@ public class View extends JFrame implements IView {
playerPanel.getHandPanel().setSelectedStones(stones);
}
- @Override
- public void enableStartTurnPanel(boolean enable) {
- playerPanel.setVisible(!enable);
- startTurnPanel.setVisible(enable);
- winPanel.setVisible(false);
- }
-
- @Override
- public void enableWinPanel(boolean enable) {
- playerPanel.setVisible(!enable);
- startTurnPanel.setVisible(false);
- winPanel.setVisible(enable);
- }
+ /*
+ * @Override public void enableStartTurnPanel(boolean enable) {
+ * playerPanel.setVisible(!enable); startTurnPanel.setVisible(enable);
+ * winPanel.setVisible(false); }
+ *
+ * @Override public void enableWinPanel(boolean enable) {
+ * playerPanel.setVisible(!enable); startTurnPanel.setVisible(false);
+ * winPanel.setVisible(enable); }
+ */
@Override
public void showSettingsPanel(boolean show) {
@@ -196,7 +192,7 @@ public class View extends JFrame implements IView {
}
@Override
- public void setHasLaidOut(boolean hasLaidOut) {
+ public void setCurrentPlayerHasLaidOut(boolean hasLaidOut) {
playerPanel.setHasLaidOut(hasLaidOut);
}
@@ -260,19 +256,18 @@ public class View extends JFrame implements IView {
}
@Override
- public void showInterface(boolean enable) {
- if (enable) {
- playerPanel.showButtons(true);
- } else {
- List<Pair<StoneSet, Position>> emptyTable = Collections.emptyList();
- table.setStoneSets(emptyTable);
+ public void setBottomPanel(BottomPanelType type) {
+ startTurnPanel.setVisible(type == BottomPanelType.START_TURN_PANEL);
+ winPanel.setVisible(type == BottomPanelType.WIN_PANEL);
+ playerPanel.setVisible(type != BottomPanelType.START_TURN_PANEL
+ && type != BottomPanelType.WIN_PANEL);
+
+ if (type == BottomPanelType.START_GAME_PANEL) {
+ table.setStoneSets(Collections.<Pair<StoneSet, Position>> emptyList());
playerPanel.getHandPanel().setStones(createDecorationStones());
- playerPanel.showButtons(false);
}
- }
- @Override
- public void enableThinkPanel(boolean enable) {
- playerPanel.enableButtons(!enable);
+ playerPanel.showButtons(type != BottomPanelType.START_GAME_PANEL);
+ playerPanel.enableButtons(type != BottomPanelType.COMPUTER_HAND_PANEL);
}
}