visidor/src/main/java/cz/xelfi/quoridor/visidor/BoardEvent.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sun, 05 Sep 2010 22:34:43 +0200
changeset 255 9ecd02d694cd
child 266 15fcdfc4cd4a
permissions -rw-r--r--
Official API for BoardPane with listener to react to user gestures.
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 
     6 package cz.xelfi.quoridor.visidor;
     7 
     8 import cz.xelfi.quoridor.Move;
     9 import java.util.EventObject;
    10 
    11 /** Event describing what happens in {@link BoardPane}.
    12  *
    13  * @author Jaroslav Tulach <jtulach@netbeans.org>
    14  */
    15 public final class BoardEvent extends EventObject {
    16     private final Move move;
    17     
    18     BoardEvent(BoardPane p, Move m) {
    19         super(p);
    20         this.move = m;
    21     }
    22     
    23     /** The move that describes recent user gesture on the {@link BoardPane}.
    24      * 
    25      * @return the move or null, if this event does not describe a move
    26      */
    27     public Move getMove() {
    28         return move;
    29     }
    30 }