From 24b2d86f648a3d2af7f0621912d1a659b93f2a28 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 6 Oct 2006 20:14:01 +0000 Subject: [PATCH] It turns out that we can just let our normal RepaintManager stuff repaint the applet. We don't need to do the same restore from back buffer stuff we do for a ManagedJFrame. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@43 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../com/threerings/media/ManagedJApplet.java | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/java/com/threerings/media/ManagedJApplet.java b/src/java/com/threerings/media/ManagedJApplet.java index 560f9b45..31404e11 100644 --- a/src/java/com/threerings/media/ManagedJApplet.java +++ b/src/java/com/threerings/media/ManagedJApplet.java @@ -28,6 +28,7 @@ import java.awt.Rectangle; import java.awt.Shape; import java.awt.Window; import javax.swing.JApplet; +import javax.swing.RepaintManager; import com.threerings.media.Log; @@ -62,35 +63,5 @@ public class ManagedJApplet extends JApplet return _fmgr; } - @Override // from Component - public void paint (Graphics g) - { - // we catch paint requests and forward them on to the repaint - // infrastructure - update(g); - } - - @Override // from Component - public void update (Graphics g) - { - Shape clip = g.getClip(); - Rectangle dirty; - if (clip != null) { - dirty = clip.getBounds(); - } else { - dirty = getRootPane().getBounds(); - // account for our frame insets - Insets insets = getInsets(); - dirty.x += insets.left; - dirty.y += insets.top; - } - - if (_fmgr != null) { - _fmgr.restoreFromBack(dirty); - } else { - Log.info("Dropping AWT dirty rect " + dirty + " (" + clip + ")."); - } - } - protected FrameManager _fmgr; }