Static method for LogView (may be used by JIMS) 44/14244/2
Bruno JOFRET [Mon, 31 Mar 2014 10:46:28 +0000 (12:46 +0200)]
Change-Id: Id56b1994a6c6f4f29c2d9e3a5e8c71100a4396ab

scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicController/GraphicController.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicView/LogView.java

index 8cee541..f2f03fa 100644 (file)
@@ -71,9 +71,6 @@ public class GraphicController {
             register(GedTreeView.create());
             register(FlattenTreeView.create());
         }
-        if (infoEnable) {
-            register(LogView.createLogView());
-        }
     }
 
     /**
index 8ecb43c..c9cc0b7 100644 (file)
@@ -26,14 +26,20 @@ public class LogView implements GraphicView {
 
     private LogView() {}
 
-    public static LogView createLogView() {
+    public static void createLogView() {
         if (me == null) {
             me = new LogView();
+            GraphicController.getController().register(me);
         }
-
-        return me;
     }
     
+    public static void deleteLogView() {
+        if (me != null) {
+            GraphicController.getController().unregister(me);
+            me = null;
+        }
+    }
+
     public static HashMap<Integer, String> pierreDeRosette = new HashMap<Integer, String>();
     
     static {