From 38f4a5bb30d13d2d371af0d1c9d609921ac6311d Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Mon, 9 May 2011 18:36:02 +0200 Subject: Deselecting whole collection git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@187 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/control/TurnControl.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/jrummikub/control') diff --git a/src/jrummikub/control/TurnControl.java b/src/jrummikub/control/TurnControl.java index f39ec39..768f4f9 100644 --- a/src/jrummikub/control/TurnControl.java +++ b/src/jrummikub/control/TurnControl.java @@ -72,6 +72,14 @@ public class TurnControl { collectionStoneClick(stone, collect); } })); + connections.add(view.getTablePanel().getStoneCollectionPanel() + .getSetClickEvent().add(new IListener2() { + + @Override + public void handle(Stone stone, Boolean collect) { + collectionSetClick(stone, collect); + } + })); connections.add(view.getTablePanel().getStoneClickEvent() .add(new IListener2() { @@ -140,6 +148,11 @@ public class TurnControl { view.setSelectedStones(selectedStones); } + private void collectionSetClick(Stone stone, Boolean collect) { + selectedStones.clear(); + view.setSelectedStones(selectedStones); + } + private void pickUpSelectedStones() { for (Stone stone : selectedStones) { hand.pickUp(stone); -- cgit v1.2.3