From a5e3a343240c3a694e5fc7a2a6982b91bd2c78a8 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 16 Dec 2008 15:05:27 +0000 Subject: [PATCH] implemented default method for fetching plugin visualizer --- tools/cooja/java/se/sics/cooja/VisPlugin.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/VisPlugin.java b/tools/cooja/java/se/sics/cooja/VisPlugin.java index 0a4d035b8..794a1c237 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.6 2007/09/21 16:11:44 fros4943 Exp $ + * $Id: VisPlugin.java,v 1.7 2008/12/16 15:05:27 fros4943 Exp $ */ package se.sics.cooja; @@ -58,14 +58,13 @@ public abstract class VisPlugin extends JInternalFrame implements Plugin { */ public VisPlugin(String title, final GUI gui) { super(title, true, true, true, true); - final VisPlugin thisPlugin = this; // Close via gui setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); // Detect frame events addInternalFrameListener(new InternalFrameListener() { public void internalFrameClosing(InternalFrameEvent e) { - gui.removePlugin(thisPlugin, true); + gui.removePlugin(VisPlugin.this, true); } public void internalFrameClosed(InternalFrameEvent e) { // NOP @@ -92,6 +91,10 @@ public abstract class VisPlugin extends JInternalFrame implements Plugin { ); } + public JInternalFrame getGUI() { + return this; + } + public Collection getConfigXML() { return null; }