From 81974416584d45fe5e6e305c002205dbdacc1cd7 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 22 May 2003 16:10:54 +0000 Subject: [PATCH] Restructure our block visible warning so that derived classes can augment it as well as inhibit it. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2601 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../miso/client/MisoScenePanel.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/java/com/threerings/miso/client/MisoScenePanel.java b/src/java/com/threerings/miso/client/MisoScenePanel.java index 12eb843e1..ae6eb2a4a 100644 --- a/src/java/com/threerings/miso/client/MisoScenePanel.java +++ b/src/java/com/threerings/miso/client/MisoScenePanel.java @@ -1,5 +1,5 @@ // -// $Id: MisoScenePanel.java,v 1.36 2003/05/21 17:10:05 mdb Exp $ +// $Id: MisoScenePanel.java,v 1.37 2003/05/22 16:10:54 mdb Exp $ package com.threerings.miso.client; @@ -788,11 +788,7 @@ public class MisoScenePanel extends VirtualMediaPanel Rectangle sbounds = block.getScreenBounds(); if (!_delayRepaint && sbounds != null && sbounds.intersects(_vbounds)) { - if (warnVisible()) { - Log.warning("Block visible during resolution " + block + - " sbounds:" + StringUtil.toString(sbounds) + - " vbounds:" + StringUtil.toString(_vbounds) + "."); - } + warnVisible(block, sbounds); // if we have yet further blocks to resolve, queue up a // repaint now so that we get this data onscreen as quickly as // possible @@ -817,12 +813,15 @@ public class MisoScenePanel extends VirtualMediaPanel } /** - * Whether or not we should issue a warning when a block becomes - * visible prior to completing resolution. + * Issues a warning to the error log that the specified block became + * visible prior to being resolved. Derived classes may wish to + * augment or inhibit this warning. */ - protected boolean warnVisible () + protected void warnVisible (SceneBlock block, Rectangle sbounds) { - return true; + Log.warning("Block visible during resolution " + block + + " sbounds:" + StringUtil.toString(sbounds) + + " vbounds:" + StringUtil.toString(_vbounds) + "."); } /**