From bcc3f95847eafa1b61bb32dac047101c7adc0e64 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 3 May 2011 17:29:52 +0200 Subject: Make StonePanel emit Stone click events git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@80 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/IStonePanel.java | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/jrummikub/view/IStonePanel.java (limited to 'src/jrummikub/view/IStonePanel.java') diff --git a/src/jrummikub/view/IStonePanel.java b/src/jrummikub/view/IStonePanel.java new file mode 100644 index 0000000..6720902 --- /dev/null +++ b/src/jrummikub/view/IStonePanel.java @@ -0,0 +1,38 @@ +package jrummikub.view; + +import jrummikub.model.Stone; +import jrummikub.util.IEvent2; + +/** + * An interface for view elements that can emit click events for clicks on stones + */ +public interface IStonePanel { + /** + * the click event is emitted when the player clicks on the table/hand/etc. + * + * @return the event; the first parameter is the position of the click in grid + * coordinates, the second is true when the player wants to add stones + * to his selection instead of replacing them + */ + public IEvent2 getStoneClickEvent(); + + /** + * the range click event is emitted when the player clicks on the table/hand/ + * etc. and wants to select a range instead of a single stone + * + * @return the event; the first parameter is the position of the click in grid + * coordinates, the second is true when the player wants to add stones + * to his selection instead of replacing them + */ + public IEvent2 getRangeClickEvent(); + + /** + * the set click event is emitted when the player clicks on the table/hand/ + * etc. and wants to select a whole set instead of a single stone + * + * @return the event; the first parameter is the position of the click in grid + * coordinates, the second is true when the player wants to add stones + * to his selection instead of replacing them + */ + public IEvent2 getSetClickEvent(); +} -- cgit v1.2.3