Files
narya/src/java/com/threerings/media/sprite/AnimatedView.java
T
Michael Bayne c60c0a557b Added invalidateRect().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@784 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-15 04:20:26 +00:00

48 lines
1.5 KiB
Java

//
// $Id: AnimatedView.java,v 1.5 2001/12/15 04:20:26 mdb Exp $
package com.threerings.media.sprite;
import java.awt.Rectangle;
import javax.swing.JComponent;
/**
* A view that wishes to interact with the animation manager needs to
* implement this interface to give the animation manager a means by which
* to communicate the regions of the view that need to be repainted
* because of the process of animating on top of the view.
*/
public interface AnimatedView
{
/**
* Invalidate a list of rectangles in screen pixel coordinates in the
* scene view for later repainting.
*
* @param rects the list of {@link java.awt.Rectangle} objects.
*/
public void invalidateRects (DirtyRectList rects);
/**
* Invalidates a rectangle in screen pixel coordinates in the scene
* view for later repainting.
*
* @param rect the {@link java.awt.Rectangle} to dirty.
*/
public void invalidateRect (Rectangle rect);
/**
* Requests that the animated view paint itself immediately (that it
* complete the painting process before returning from this function).
* This will only be called on the AWT thread and when it is safe to
* paint.
*/
public void paintImmediately ();
/**
* Return the component associated with the view so that the
* animation manager can restrict its animation to when the
* component is actually visible.
*/
public JComponent getComponent ();
}