1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/visidor/src/main/java/cz/xelfi/quoridor/visidor/BoardEvent.java Sun Sep 05 22:34:43 2010 +0200
1.3 @@ -0,0 +1,30 @@
1.4 +/*
1.5 + * To change this template, choose Tools | Templates
1.6 + * and open the template in the editor.
1.7 + */
1.8 +
1.9 +package cz.xelfi.quoridor.visidor;
1.10 +
1.11 +import cz.xelfi.quoridor.Move;
1.12 +import java.util.EventObject;
1.13 +
1.14 +/** Event describing what happens in {@link BoardPane}.
1.15 + *
1.16 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.17 + */
1.18 +public final class BoardEvent extends EventObject {
1.19 + private final Move move;
1.20 +
1.21 + BoardEvent(BoardPane p, Move m) {
1.22 + super(p);
1.23 + this.move = m;
1.24 + }
1.25 +
1.26 + /** The move that describes recent user gesture on the {@link BoardPane}.
1.27 + *
1.28 + * @return the move or null, if this event does not describe a move
1.29 + */
1.30 + public Move getMove() {
1.31 + return move;
1.32 + }
1.33 +}