/* 
 * XSleepElement.java --
 *
 *      animation stuff.
 *
 * Copyright 1995 Regents of the University of California
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that this copyright
 * notice appears in all copies.  The University of California
 * makes no representations about the suitability of this
 * software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 *
 * rcsid = "$Header: /disks/barad-dur/now/rywang/src/java/classes/ryw/XSleepElement.java,v 1.1 1995/11/09 12:19:37 rywang Exp $ xFS (Berkeley)"
 */

package ryw;

import java.awt.*;
import java.awt.image.*;
import java.util.Vector;
import java.util.Enumeration;


/**
 * One action item to be placed on queue.
 * Some thread object will dequeue such an element and perform the
 * actual animation.
 * @see ryw.XMoverItem
 * @see ryw.XMover
 * @see ryw.XMoveElement
 */
public class XSleepElement extends XMoverItem {
    int ms;
    
    public XSleepElement (int ms) {
	this.ms = ms;
    }

    public void doMove () {
	if (ms > 0) {
	    try {
		Thread.sleep (ms);
	    } catch (InterruptedException e) {
		return;
	    }
	}
    }
}

