/*
 * Copyright (c) 1995-1997 Sun Microsystems, Inc. All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for NON-COMMERCIAL purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies. Please refer to the file "copyright.html"
 * for further important copyright and licensing information.
 *
 * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
 * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
 * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
 * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
 */
package bingo.player;

import bingo.shared.*;

import java.rmi.*;
import java.awt.*;
import java.awt.event.*;

class PlayerQueue extends EventQueue {

    private Player player;

    public PlayerQueue(Player player) {
	super();
	this.player = player;
    }

    /**
     * As of 1.2, this method gets called from the event-handling thread
     * that's dedicated to this PlayerQueue.  (In 1.1, this method doesn't
     * exist in EventQueue, and the thread calls event.src.dispatchEvent
     * instead.)
     */
    protected void dispatchEvent(AWTEvent event) {
	//XXX Duplicate 1.1 behavior (to avoid duplicating code).
	//XXX If this app is 1.2 only, then call player.handleIWonEvent
	//XXX here.
	//XXX (Or maybe we should perform a 1.2 vs. 1.1 test instead?)
	player.dispatchEvent(event); //duplicate 1.1 behavior (to avoid
				     //duplicating code)
    }
}
