From ce32a5b0b02002b4111266859e2218e7405e5275 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 24 Mar 2009 15:46:46 +0000 Subject: [PATCH] register radio medium skin --- .../java/se/sics/cooja/radiomediums/UDGM.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java index de4037bfa..3b4461752 100644 --- a/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java +++ b/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: UDGM.java,v 1.22 2009/02/24 15:05:54 fros4943 Exp $ + * $Id: UDGM.java,v 1.23 2009/03/24 15:46:46 fros4943 Exp $ */ package se.sics.cooja.radiomediums; @@ -37,7 +37,8 @@ import org.apache.log4j.Logger; import se.sics.cooja.*; import se.sics.cooja.interfaces.*; -import se.sics.cooja.plugins.VisUDGM; +import se.sics.cooja.plugins.Visualizer; +import se.sics.cooja.plugins.skins.UDGMVisualizerSkin; /** * The Unit Disk Graph medium has two different range parameters; one for @@ -45,9 +46,6 @@ import se.sics.cooja.plugins.VisUDGM; * * The radio medium supports both byte and packet radios. * - * The radio medium registers a visualizer plugin. Via this plugin the current - * radio states and range parameters can be viewed and changed. - * * The registered radios' signal strengths are updated whenever the radio medium * changes. There are three fixed levels: no surrounding traffic heard, noise * heard and data heard. @@ -59,7 +57,7 @@ import se.sics.cooja.plugins.VisUDGM; * @see #SS_WEAK * @see #SS_NOTHING * - * @see VisUDGM + * @see UDGMVisualizerSkin * @author Fredrik Osterlind */ @ClassDescription("Unit Disk Graph Medium (UDGM)") @@ -84,8 +82,9 @@ public class UDGM extends AbstractRadioMedium { public UDGM(Simulation simulation) { super(simulation); - /* Register visualizer plugin */ - simulation.getGUI().registerTemporaryPlugin(VisUDGM.class); + /* Register visualizer skin */ + /* TODO Should be unregistered when radio medium is removed */ + Visualizer.registerVisualizerSkin(UDGMVisualizerSkin.class); mySimulation = simulation; random = mySimulation.getRandomGenerator();