From b2a98f49e657a1c5ed36ea87706f64c3b012019d Mon Sep 17 00:00:00 2001 From: fros4943 Date: Fri, 3 Apr 2009 17:03:42 +0000 Subject: [PATCH] + constructor option for not automatically throwing "requires visualization" exception --- tools/cooja/java/se/sics/cooja/VisPlugin.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/VisPlugin.java b/tools/cooja/java/se/sics/cooja/VisPlugin.java index c93dfc35b..167ba9ef2 100644 --- a/tools/cooja/java/se/sics/cooja/VisPlugin.java +++ b/tools/cooja/java/se/sics/cooja/VisPlugin.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: VisPlugin.java,v 1.8 2008/12/17 11:02:05 fros4943 Exp $ + * $Id: VisPlugin.java,v 1.9 2009/04/03 17:03:42 fros4943 Exp $ */ package se.sics.cooja; @@ -55,9 +55,13 @@ public abstract class VisPlugin extends JInternalFrame implements Plugin { private Object tag = null; public VisPlugin(String title, final GUI gui) { + this(title, gui, true); + } + + public VisPlugin(String title, final GUI gui, boolean requiresVis) { super(title, true, true, true, true); - if (!GUI.isVisualized()) { + if (requiresVis && !GUI.isVisualized()) { throw new PluginRequiresVisualizationException(); }