/* * XAddElement.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/XAddElement.java,v 1.2 1995/10/21 15:40:01 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.XAdder */ public class XAddElement extends XMoverItem { public XPanel0 parent; public Component comp; public Point pos; public Dimension dim; public XAddElement (XPanel0 parent, Component comp, Point pos, Dimension dim) { this.parent = parent; this.comp = comp; this.pos = pos; this.dim = dim; } public void doMove () { parent.add (comp, pos, dim); // System.out.println ("XAddElement: doMove: " + pos.x + pos.y); } }