[gui] move classes to pick objects into [renderer] 20/20620/2
Clément DAVID [Thu, 15 Nov 2018 10:33:09 +0000 (11:33 +0100)]
Change-Id: I148c64d7343267fbf840c802e5e8c2eeb97d0a7c

24 files changed:
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipCreate.java
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipDelete.java
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipDrag.java
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipManagerMode.java
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipMove.java
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipOrientation.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/DataEditor.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/Editor.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/EditorEventListener.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/GEDPicker.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/LabelHandler.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/ScilabClipboard.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/action/ActionLegend.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/action/ActionMove.java
scilab/modules/gui/src/java/org/scilab/modules/gui/editor/action/ActionPasteStyle.java
scilab/modules/gui/src/java/org/scilab/modules/gui/plotbrowser/ListCreator.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/interaction/DragZoomRotateInteraction.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/AxesHandler.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/AxesHandler.java with 98% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/CommonHandler.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/CommonHandler.java with 99% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/DatatipCommon.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipCommon.java with 96% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/EntityPicker.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/EntityPicker.java with 98% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/LegendHandler.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/LegendHandler.java with 98% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/ObjectSearcher.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/ObjectSearcher.java with 99% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/PolylineHandler.java [moved from scilab/modules/gui/src/java/org/scilab/modules/gui/editor/PolylineHandler.java with 96% similarity]

index cf5ed56..460281a 100755 (executable)
@@ -26,8 +26,8 @@ import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObject;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
 import org.scilab.modules.graphic_objects.datatip.Datatip;
-import org.scilab.modules.gui.editor.CommonHandler;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
 import org.scilab.modules.renderer.CallRenderer;
 
 /**
index 5ae14c0..d0afbf3 100644 (file)
@@ -18,7 +18,7 @@ package org.scilab.modules.gui.datatip;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.gui.editor.ObjectSearcher;
+import org.scilab.modules.renderer.utils.ObjectSearcher;
 
 /**
  * Delete a datatip
index 1054b6a..2fcf259 100644 (file)
@@ -18,13 +18,13 @@ package org.scilab.modules.gui.datatip;
 
 import org.scilab.modules.graphic_objects.PolylineData;
 
-import org.scilab.modules.gui.datatip.DatatipCommon;
+import org.scilab.modules.renderer.utils.DatatipCommon;
 import org.scilab.modules.gui.datatip.DatatipOrientation;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.*;
-import org.scilab.modules.gui.editor.CommonHandler;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
 
 /**
  * Drag a datatip along a polyline
index 45aad5b..a5e36b1 100644 (file)
@@ -40,9 +40,9 @@ import javax.swing.SwingUtilities;
 
 import org.scilab.modules.commons.gui.FindIconHelper;
 import org.scilab.modules.localization.Messages;
-import org.scilab.modules.gui.editor.AxesHandler;
-import org.scilab.modules.gui.editor.ObjectSearcher;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.AxesHandler;
+import org.scilab.modules.renderer.utils.ObjectSearcher;
+import org.scilab.modules.renderer.utils.EntityPicker;
 import org.scilab.modules.gui.utils.ScilabSwingUtilities;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
index 499bbe6..532ae2e 100644 (file)
 package org.scilab.modules.gui.datatip;
 
 import org.scilab.modules.graphic_objects.PolylineData;
-import org.scilab.modules.gui.datatip.DatatipCommon;
+import org.scilab.modules.renderer.utils.DatatipCommon;
 import org.scilab.modules.gui.datatip.DatatipOrientation;
 import org.scilab.modules.renderer.CallRenderer;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.*;
-import org.scilab.modules.gui.editor.CommonHandler;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
 
 /**
  * Move a datatip along the curve
index 1c55718..1ccdfea 100644 (file)
 
 package org.scilab.modules.gui.datatip;
 
-import org.scilab.modules.gui.datatip.DatatipCommon;
+import org.scilab.modules.renderer.utils.DatatipCommon;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.*;
-import org.scilab.modules.gui.editor.AxesHandler;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.AxesHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
 import org.scilab.modules.renderer.CallRenderer;
 
 import org.scilab.modules.action_binding.InterpreterManagement;
@@ -141,19 +141,19 @@ public class DatatipOrientation {
      */
     private static Integer flipOrientation(Integer orientation) {
         switch (orientation) {
-                /* top left*/
+            /* top left*/
             case 0:
                 return 3;
-                /* top right*/
+            /* top right*/
             case 1:
                 return 2;
-                /* bottom left*/
+            /* bottom left*/
             case 2:
                 return 1;
-                /* bottom right*/
+            /* bottom right*/
             case 3:
                 return 0;
-                /* do nothing*/
+            /* do nothing*/
             default:
                 return orientation;
         }
index 10c6394..bd313ec 100644 (file)
 
 package org.scilab.modules.gui.editor;
 
+import org.scilab.modules.renderer.utils.PolylineHandler;
+import org.scilab.modules.renderer.utils.ObjectSearcher;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
+import org.scilab.modules.renderer.utils.AxesHandler;
 import java.awt.event.MouseEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ActionEvent;
@@ -265,7 +270,7 @@ public class DataEditor {
                 Vector3d pointNew = dir.times(u);
                 pointNew = pointNew.plus(v0);
 
-                PolylineData.translatePoint(curPolyline, picked.point, pointNew.getX() - planePoint.getX(), pointNew.getY() - planePoint.getY(), 0.0 , 0, 0, 0);
+                PolylineData.translatePoint(curPolyline, picked.point, pointNew.getX() - planePoint.getX(), pointNew.getY() - planePoint.getY(), 0.0, 0, 0, 0);
 
             } else {
                 PolylineHandler.getInstance().dragPolyline(curPolyline, lastClick, newClick);
index 2063d52..4afc200 100644 (file)
@@ -17,6 +17,9 @@
 package org.scilab.modules.gui.editor;
 
 
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.EntityPicker;
+import org.scilab.modules.renderer.utils.AxesHandler;
 import java.awt.event.ActionListener;
 import java.awt.event.ActionEvent;
 import java.awt.event.MouseEvent;
@@ -30,10 +33,10 @@ import javax.swing.JPopupMenu;
 import org.scilab.modules.gui.datatip.DatatipManager;
 import org.scilab.modules.gui.editor.ScilabClipboard;
 import org.scilab.modules.gui.editor.SystemClipboard;
-import org.scilab.modules.gui.editor.PolylineHandler;
+import org.scilab.modules.renderer.utils.PolylineHandler;
 import org.scilab.modules.gui.editor.GEDPicker;
 import org.scilab.modules.gui.editor.LabelHandler;
-import org.scilab.modules.gui.editor.LegendHandler;
+import org.scilab.modules.renderer.utils.LegendHandler;
 import org.scilab.modules.gui.editor.action.EditorHistory;
 import org.scilab.modules.gui.editor.action.ActionDelete;
 import org.scilab.modules.gui.editor.action.ActionLegend;
index 0603401..7f3b1b8 100644 (file)
@@ -32,7 +32,7 @@ import org.scilab.modules.gui.datatip.DatatipManager;
 
 import org.scilab.modules.gui.editor.Editor;
 import org.scilab.modules.gui.editor.EditorManager;
-import org.scilab.modules.gui.editor.EntityPicker;
+import org.scilab.modules.renderer.utils.EntityPicker;
 import org.scilab.modules.gui.events.GlobalEventWatcher;
 
 import org.scilab.modules.gui.ged.Inspector;
index e693422..db639d6 100644 (file)
@@ -31,8 +31,8 @@ import org.scilab.forge.scirenderer.tranformations.Vector3d;
 import org.scilab.modules.graphic_objects.PolylineData;
 import org.scilab.modules.graphic_objects.SurfaceData;
 import org.scilab.modules.graphic_objects.ObjectData;
-import org.scilab.modules.gui.editor.CommonHandler;
-import org.scilab.modules.gui.editor.AxesHandler;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.AxesHandler;
 
 import java.lang.Math;
 import java.util.List;
@@ -384,7 +384,7 @@ public class GEDPicker {
         double xr = data[1] / 2.;
         double yr = data[0] / 2.;
 
-        Vector3d center =  new Vector3d(upperLeft[0] + xr , upperLeft[1] - yr , upperLeft[2]);
+        Vector3d center =  new Vector3d(upperLeft[0] + xr, upperLeft[1] - yr, upperLeft[2]);
 
         //checks if the point lies within the ellipse
         double x = point.getX() - center.getX();
index 5a778fb..a7bc022 100644 (file)
 
 package org.scilab.modules.gui.editor;
 
+import org.scilab.modules.renderer.utils.EntityPicker;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.gui.editor.AxesHandler;
-import org.scilab.modules.gui.editor.CommonHandler;
+import org.scilab.modules.renderer.utils.AxesHandler;
+import org.scilab.modules.renderer.utils.CommonHandler;
 
 import org.scilab.modules.renderer.CallRenderer;
 import org.scilab.modules.graphic_objects.axes.Axes;
index 5371d1e..be74291 100644 (file)
 
 package org.scilab.modules.gui.editor;
 
+import org.scilab.modules.renderer.utils.ObjectSearcher;
+import org.scilab.modules.renderer.utils.CommonHandler;
+import org.scilab.modules.renderer.utils.AxesHandler;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.gui.editor.PolylineHandler;
+import org.scilab.modules.renderer.utils.PolylineHandler;
 
 /**
 * Implements clipboard between figures for polylines.
index 7d8c09b..84b167e 100644 (file)
@@ -18,7 +18,7 @@ import org.scilab.modules.gui.editor.action.BaseAction;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObject;
-import org.scilab.modules.gui.editor.LegendHandler;
+import org.scilab.modules.renderer.utils.LegendHandler;
 
 /**
 * Implements the object to store legend related actions
index f15eaf5..93f8bb8 100644 (file)
@@ -18,8 +18,8 @@ package org.scilab.modules.gui.editor.action;
 import org.scilab.modules.gui.editor.action.BaseAction;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.gui.editor.PolylineHandler;
-import org.scilab.modules.gui.editor.LegendHandler;
+import org.scilab.modules.renderer.utils.PolylineHandler;
+import org.scilab.modules.renderer.utils.LegendHandler;
 
 /**
 * Implements the object to store Move related actions
index 56f026f..db83211 100644 (file)
@@ -18,7 +18,7 @@ package org.scilab.modules.gui.editor.action;
 import org.scilab.modules.gui.editor.action.BaseAction;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.gui.editor.AxesHandler;
+import org.scilab.modules.renderer.utils.AxesHandler;
 
 /**
 * Implements the object to store PasteStyle related actions
index c55fb06..9a239d8 100644 (file)
@@ -24,7 +24,7 @@ import javax.swing.JCheckBox;
 import javax.swing.JList;
 import javax.swing.JScrollPane;
 import javax.swing.ListSelectionModel;
-import org.scilab.modules.gui.editor.ObjectSearcher;
+import org.scilab.modules.renderer.utils.ObjectSearcher;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
index 341c045..101c69f 100644 (file)
@@ -31,6 +31,7 @@ import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
 import org.scilab.modules.renderer.JoGLView.DrawerVisitor;
 import org.scilab.modules.renderer.JoGLView.util.ScaleUtils;
 
+
 /**
  * This class manage figure interaction.
  *
  *
  */
 
-package org.scilab.modules.gui.editor;
+package org.scilab.modules.renderer.utils;
 
 import java.lang.Math;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
-import org.scilab.modules.graphic_objects.graphicModel.GraphicModel;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
 import org.scilab.modules.graphic_objects.axes.Axes;
 import org.scilab.modules.graphic_objects.axes.AxesContainer;
 import org.scilab.modules.graphic_objects.ScilabNativeView;
 
-import org.scilab.modules.gui.editor.ObjectSearcher;
-import org.scilab.modules.gui.editor.PolylineHandler;
+import org.scilab.modules.renderer.utils.ObjectSearcher;
+import org.scilab.modules.renderer.utils.PolylineHandler;
 
 /**
 * Implements all axes manipulation functions for the editor.
  *
  */
 
-package org.scilab.modules.gui.datatip;
+package org.scilab.modules.renderer.utils;
 
 import org.scilab.modules.graphic_objects.PolylineData;
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.*;
 import org.scilab.modules.renderer.CallRenderer;
-import org.scilab.modules.gui.editor.AxesHandler;
-import org.scilab.modules.gui.editor.CommonHandler;
 
 /** Common datatip functions*/
 public class DatatipCommon {
  *
  */
 
-package org.scilab.modules.gui.editor;
+package org.scilab.modules.renderer.utils;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.graphic_objects.CallGraphicController;
 import org.scilab.modules.renderer.CallRenderer;
 
 import org.scilab.modules.graphic_objects.axes.Axes;
 import org.scilab.modules.graphic_objects.axes.AxesContainer;
 import org.scilab.modules.renderer.JoGLView.axes.AxesDrawer;
-import org.scilab.modules.renderer.JoGLView.DrawerVisitor;
 import org.scilab.forge.scirenderer.tranformations.Vector3d;
 
 import org.scilab.modules.graphic_objects.PolylineData;
 import org.scilab.modules.graphic_objects.SurfaceData;
-import org.scilab.modules.gui.datatip.DatatipCommon;
-import org.scilab.modules.gui.editor.CommonHandler;
-import org.scilab.modules.gui.editor.ObjectSearcher;
+import org.scilab.modules.renderer.JoGLView.DrawerVisitor;
 
 /**
  * Given a (x, y) window coord checks
@@ -602,7 +598,7 @@ public class EntityPicker {
      * @param pos Mouse position (x, y).
      * @return The nearest surface intersected or null otherwise.
      */
-    Integer pickSurface(Integer figure, Integer[] pos) {
+    public Integer pickSurface(Integer figure, Integer[] pos) {
         Integer uid = AxesHandler.clickedAxes(figure, pos);
         Axes curAxes = (Axes)GraphicController.getController().getObjectFromId(uid);
         if (curAxes == null) {
  *
  */
 
-package org.scilab.modules.gui.editor;
+package org.scilab.modules.renderer.utils;
 
+import org.scilab.modules.renderer.utils.ObjectSearcher;
+import org.scilab.modules.renderer.utils.CommonHandler;
 import java.util.ArrayList;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
@@ -14,7 +14,7 @@
  *
  */
 
-package org.scilab.modules.gui.editor;
+package org.scilab.modules.renderer.utils;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
  *
  */
 
-package org.scilab.modules.gui.editor;
+package org.scilab.modules.renderer.utils;
 
 import org.scilab.modules.graphic_objects.graphicController.GraphicController;
-import org.scilab.modules.graphic_objects.graphicObject.GraphicObject;
 import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
-import org.scilab.modules.renderer.CallRenderer;
 
-import org.scilab.modules.gui.editor.ObjectSearcher;
 import org.scilab.modules.graphic_objects.PolylineData;
 import org.scilab.forge.scirenderer.tranformations.Vector3d;
 import org.scilab.modules.renderer.JoGLView.axes.AxesDrawer;