Datatips: changed z_component to display_components 30/18130/12
Caio SOUZA [Thu, 28 Apr 2016 16:05:32 +0000 (13:05 -0300)]
    Update the datatip property, now the user can choose
    which labels to show, using any combination of 'x', 'y' and 'z'

Change-Id: Ie9c41970c31d6c013a7422df3475a7f9657df86f

24 files changed:
scilab/CHANGES
scilab/modules/graphic_objects/includes/graphicObjectProperties.h
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/datatip/Datatip.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/graphicObject/GraphicObjectProperties.java
scilab/modules/graphic_objects/src/scripts/propertiesMap.properties
scilab/modules/graphics/help/en_US/datatips/datatip_properties.xml
scilab/modules/graphics/help/ja_JP/datatips/datatip_properties.xml
scilab/modules/graphics/help/pt_BR/datatips/CHAPTER [new file with mode: 0644]
scilab/modules/graphics/help/pt_BR/datatips/datatip_properties.xml [new file with mode: 0644]
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/macros/%h_save.sci
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/get_datatip_property.c
scilab/modules/graphics/src/c/getHandleProperty/setHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/set_datatip_property.c
scilab/modules/gui/src/java/org/scilab/modules/gui/datatip/DatatipCreate.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/GEDView.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/MessagesGED.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/datatip/DataProperties.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/properties/Datatip.java
scilab/modules/hdf5/src/cpp/handle_properties.hxx
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/datatip/DatatipTextDrawer.java

index 35fe140..a5331d4 100644 (file)
@@ -97,6 +97,11 @@ Other feature changes
 
     val = foo() //return error
 
+* The graphics entity "Datatip" has its property "z_component = 'on|off'"
+  changed to "display_components = 'xyz'", now it is possible to choose which
+  components to display and the order. Loading old *.scg files containing 
+  datatips with "z_component" property may not display the z component. 
+
 Other feature additions
 =======================
 
index 902a7b6..c53ad96 100755 (executable)
@@ -3,14 +3,10 @@
  *  Copyright (C) 2010-2012 - DIGITEO - Bruno JOFRET
  *  Copyright (C) 2012-2014 - Scilab-Enterprises - Bruno JOFRET
  *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  */
 
 #define __GO_DATATIP__ 331
 #define __GO_DATATIP_DATA__ 332
 #define __GO_DATATIP_ORIENTATION__ 333
-#define __GO_DATATIP_3COMPONENT__ 334
+#define __GO_DATATIP_DISPLAY_COMPONENTS__ 334
 #define __GO_DATATIP_AUTOORIENTATION__ 335
 #define __GO_DATATIP_INTERP_MODE__ 336
 #define __GO_DATATIP_DISPLAY_FNC__ 337
index 71d1a5e..c201267 100755 (executable)
@@ -16,7 +16,7 @@
 
 package org.scilab.modules.graphic_objects.datatip;
 
-import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_DATATIP_3COMPONENT__;
+import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_DATATIP_AUTOORIENTATION__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_DATATIP_BOX_MODE__;
 import static org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties.__GO_DATATIP_DATA__;
@@ -45,8 +45,8 @@ public class Datatip extends Text {
     Boolean tipBoxMode;
     /** false = datatip label is hidden*/
     Boolean tipLabelMode;
-    /** false = display only (X, Y), true = display (X, Y, Z)*/
-    Boolean use3component;
+    /** selects which coordinates componet to diplay*/
+    String displayComponents;
     /** false = no interpolation between point segments*/
     Boolean interpMode;
     /** Displayed number format*/
@@ -61,7 +61,7 @@ public class Datatip extends Text {
     Double ratio;
 
 
-    enum DatatipObjectProperty { TIP_DATA, TIP_BOX_MODE, TIP_LABEL_MODE, TIP_ORIENTATION, TIP_AUTOORIENTATION, TIP_3COMPONENT, TIP_INTERP_MODE, TIP_DISPLAY_FNC, TIP_INDEXES};
+    enum DatatipObjectProperty { TIP_DATA, TIP_BOX_MODE, TIP_LABEL_MODE, TIP_ORIENTATION, TIP_AUTOORIENTATION, TIP_DISPLAY_COMPONENTS, TIP_INTERP_MODE, TIP_DISPLAY_FNC, TIP_INDEXES};
     enum TipOrientation { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, LEFT, RIGHT, TOP, BOTTOM;
 
                           /**
@@ -99,7 +99,7 @@ public class Datatip extends Text {
      */
     public Datatip() {
         super();
-        use3component = false;
+        displayComponents = "xy";
         autoOrientation = true;
         setOrientationAsEnum(TipOrientation.TOP_RIGHT);
         DecimalFormat fb = new DecimalFormat("#.####E00");
@@ -148,8 +148,8 @@ public class Datatip extends Text {
                 return DatatipObjectProperty.TIP_LABEL_MODE;
             case __GO_DATATIP_ORIENTATION__:
                 return DatatipObjectProperty.TIP_ORIENTATION;
-            case __GO_DATATIP_3COMPONENT__:
-                return DatatipObjectProperty.TIP_3COMPONENT;
+            case __GO_DATATIP_DISPLAY_COMPONENTS__:
+                return DatatipObjectProperty.TIP_DISPLAY_COMPONENTS;
             case __GO_DATATIP_AUTOORIENTATION__:
                 return DatatipObjectProperty.TIP_AUTOORIENTATION;
             case __GO_DATATIP_INTERP_MODE__:
@@ -177,8 +177,8 @@ public class Datatip extends Text {
                     return getTipLabelMode();
                 case TIP_ORIENTATION:
                     return getOrientation();
-                case TIP_3COMPONENT:
-                    return isUsing3Component();
+                case TIP_DISPLAY_COMPONENTS:
+                    return getDisplayComponents();
                 case TIP_AUTOORIENTATION:
                     return isAutoOrientationEnabled();
                 case TIP_INTERP_MODE:
@@ -207,8 +207,8 @@ public class Datatip extends Text {
                     return setTipLabelMode((Boolean) value);
                 case TIP_ORIENTATION:
                     return setOrientation((Integer) value);
-                case TIP_3COMPONENT:
-                    return setUse3Component((Boolean) value);
+                case TIP_DISPLAY_COMPONENTS:
+                    return setDisplayComponents((String) value);
                 case TIP_AUTOORIENTATION:
                     return setAutoOrientation((Boolean) value);
                 case TIP_INTERP_MODE:
@@ -224,51 +224,59 @@ public class Datatip extends Text {
     }
 
     /**
-     * Get the current tip data
+     * Calculate the current tip data based on the given array
+     * @param data the data array
      * @return the tip data
      */
-    public Double[] getTipData() {
-        final double[] dataX = (double[]) PolylineData.getDataX(getParent());
-        final double[] dataY = (double[]) PolylineData.getDataY(getParent());
+    private double calcTipData(final double[] data) {
+        if (data.length < dataIndex + 2) {
+            if (data.length >= 1) {
+                return data[data.length - 1];
+            } else {
+                return 0.0;
+            }
+        }
 
-        if (use3component) {
-            final double[] dataZ = (double[]) PolylineData.getDataZ(getParent());
+        //get pt0 and pt1 from polyline data
+        final double pt0 = data[dataIndex];
+        final double pt1 = data[dataIndex + 1];
 
-            if (dataX.length < dataIndex + 2 || dataY.length < dataIndex + 2 || dataZ.length < dataIndex + 2) {
-                if (dataX.length >= 1 && dataY.length >= 1 && dataZ.length >= 1) {
-                    return new Double[] {dataX[dataX.length - 1], dataY[dataY.length - 1], dataZ[dataZ.length - 1]};
-                } else {
-                    return new Double[] {0., 0., 0.};
-                }
-            }
+        return pt0 + (pt1 - pt0) * ratio;
+    }
 
-            //get pt0 and pt1 from polyline data
-            final double[] pt0 = new double[] {dataX[dataIndex], dataY[dataIndex], dataZ[dataIndex]};
-            final double[] pt1 = new double[] {dataX[dataIndex + 1], dataY[dataIndex + 1], dataZ[dataIndex + 1]};
-
-            final double x = pt0[0] + (pt1[0] - pt0[0]) * ratio;
-            final double y = pt0[1] + (pt1[1] - pt0[1]) * ratio;
-            final double z = pt0[2] + (pt1[2] - pt0[2]) * ratio;
-
-            return new Double[] {x, y, z};
-        } else {
-            if (dataX.length < dataIndex + 2 || dataY.length < dataIndex + 2) {
-                if (dataX.length >= 1 && dataY.length >= 1) {
-                    return new Double[] {dataX[dataX.length - 1], dataY[dataY.length - 1], 0.};
-                } else {
-                    return new Double[] {0., 0., 0.};
-                }
-            }
+    /**
+     * Get the current tip data X
+     * @return the tip data X
+     */
+    public double getTipDataX() {
+        final double[] dataX = (double[]) PolylineData.getDataX(getParent());
+        return calcTipData(dataX);
+    }
 
-            //get pt0 and pt1 from polyline data
-            final double[] pt0 = new double[] {dataX[dataIndex], dataY[dataIndex]};
-            final double[] pt1 = new double[] {dataX[dataIndex + 1], dataY[dataIndex + 1]};
+    /**
+     * Get the current tip data Y
+     * @return the tip data Y
+     */
+    public double getTipDataY() {
+        final double[] dataY = (double[]) PolylineData.getDataY(getParent());
+        return calcTipData(dataY);
+    }
 
-            final double x = pt0[0] + (pt1[0] - pt0[0]) * ratio;
-            final double y = pt0[1] + (pt1[1] - pt0[1]) * ratio;
+    /**
+     * Get the current tip data Z
+     * @return the tip data Z
+     */
+    public double getTipDataZ() {
+        final double[] dataZ = (double[]) PolylineData.getDataZ(getParent());
+        return calcTipData(dataZ);
+    }
 
-            return new Double[] {x, y, 0.};
-        }
+    /**
+     * Get the current tip data
+     * @return the tip data
+     */
+    public Double[] getTipData() {
+        return new Double[] {getTipDataX(), getTipDataY(), getTipDataZ()};
     }
 
     /**
@@ -306,18 +314,56 @@ public class Datatip extends Text {
     }
 
     /**
-     * @return true if the datatip is displaying the Z component, false otherwise.
+     * Get which components should be displayed.
+     * @return the string containing the coordinates to display.
+     */
+    public String getDisplayComponents() {
+        return displayComponents;
+    }
+
+    /**
+     * Checks if a given string is valid for the display components
+     * @return true if it is valid, false otherwise.
      */
-    public Boolean isUsing3Component() {
-        return use3component;
+    private boolean isValidComponent(String value) {
+        if (value.length() < 1 || value.length() > 3) {
+            return false;
+        }
+
+        boolean isXSet = false;
+        boolean isYSet = false;
+        boolean isZSet = false;
+        for (int i = 0; i < value.length(); ++i) {
+            if (value.charAt(i) == 'x' && !isXSet) {
+                isXSet = true;
+                continue;
+            }
+            if (value.charAt(i) == 'y' && !isYSet) {
+                isYSet = true;
+                continue;
+            }
+            if (value.charAt(i) == 'z' && !isZSet) {
+                isZSet = true;
+                continue;
+            }
+            return false;
+        }
+        return true;
     }
 
     /**
-     * If true set the Z component to be displayed.
-     * @param useZ True to enable display the Z component, false to disable.
+     * Set which components to display if @disp is valid.
+     * @param disp The string containing which components to display
      */
-    public UpdateStatus setUse3Component(Boolean useZ) {
-        use3component = useZ;
+    public UpdateStatus setDisplayComponents(String disp) {
+        if (disp == null) {
+            return UpdateStatus.Fail;
+        }
+        disp = disp.toLowerCase();
+        if (!isValidComponent(disp)) {
+            return UpdateStatus.Fail;
+        }
+        displayComponents = disp;
         updateText();
         return UpdateStatus.Success;
     }
@@ -333,6 +379,24 @@ public class Datatip extends Text {
     }
 
     /**
+     * Get tip formated text for the given index
+     * @param index the component index
+     * @return the formated string
+     */
+    private String getComponentFormatedText(int index) {
+        switch (displayComponents.charAt(index)) {
+            case 'x':
+                return "X:" + tipTextFormat.format(getTipDataX());
+            case 'y':
+                return "Y:" + tipTextFormat.format(getTipDataY());
+            case 'z':
+                return "Z:" + tipTextFormat.format(getTipDataZ());
+            default:
+                return "";
+        }
+    }
+
+    /**
      * Update the text from the datatip base on current tipData value.
      */
     public void updateText() {
@@ -344,14 +408,13 @@ public class Datatip extends Text {
             //look in parent
             fnc = (String) GraphicController.getController().getProperty(getParent(), GraphicObjectProperties.__GO_DATATIP_DISPLAY_FNC__);
             if (fnc == null || fnc.equals("")) {
-                String[] textArray = new String[] {"X:", "Y:", "Z:"};
-                Double[] tipData = getTipData();
-                textArray[0] += tipTextFormat.format(tipData[0]);
-                textArray[1] += tipTextFormat.format(tipData[1]);
-                textArray[2] += tipTextFormat.format(tipData[2]);
-
+                int numCoords = displayComponents.length();
+                String[] textArray = new String[numCoords];
+                for (int i = 0; i < numCoords; ++i) {
+                    textArray[i] = getComponentFormatedText(i);
+                }
                 Integer[] dim = new Integer[2];
-                dim[0] = use3component ? 3 : 2;
+                dim[0] = numCoords;
                 dim[1] = 1;
                 setTextArrayDimensions(dim);
                 setTextStrings(textArray);
index 1129cab..ac7f80d 100755 (executable)
@@ -3,14 +3,10 @@
  *  Copyright (C) 2010-2012 - DIGITEO - Bruno JOFRET
  *  Copyright (C) 2012-2014 - Scilab-Enterprises - Bruno JOFRET
  *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
+ *  This source file is licensed as described in the file COPYING, which
+ *  you should have received as part of this distribution.  The terms
+ *  are also available at
+ *  http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  *
  */
 
@@ -358,7 +354,7 @@ public class GraphicObjectProperties {
     public static final int __GO_DATATIP__ = 331;
     public static final int __GO_DATATIP_DATA__ = 332;
     public static final int __GO_DATATIP_ORIENTATION__ = 333;
-    public static final int __GO_DATATIP_3COMPONENT__ = 334;
+    public static final int __GO_DATATIP_DISPLAY_COMPONENTS__ = 334;
     public static final int __GO_DATATIP_AUTOORIENTATION__ = 335;
     public static final int __GO_DATATIP_INTERP_MODE__ = 336;
     public static final int __GO_DATATIP_DISPLAY_FNC__ = 337;
index e9b1bc8..ab5bf32 100755 (executable)
@@ -372,7 +372,7 @@ __GO_UI_MESSAGE_SIZE__
 __GO_DATATIP__
 __GO_DATATIP_DATA__
 __GO_DATATIP_ORIENTATION__
-__GO_DATATIP_3COMPONENT__
+__GO_DATATIP_DISPLAY_COMPONENTS__
 __GO_DATATIP_AUTOORIENTATION__
 __GO_DATATIP_INTERP_MODE__
 __GO_DATATIP_DISPLAY_FNC__
index 4672575..1f6955a 100644 (file)
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>z_component: </term>
+                <term>display_components: </term>
                 <listitem>
                     <para>
-                        This field adds z position in the box. Its value should be <literal>"on" </literal>
-                        (z position written) or <literal>"off"</literal> (no z position written).
+                        This field controls which components are displayed. Its default value
+                        is <literal>"xy"</literal>for 2D views and <literal>"xyz"</literal> for 3D views.
+                        Possible values for this field are any combination of <literal>"x"</literal>, <literal>"y"</literal> and <literal>"z"</literal>.
+                        Some examples for this field are <literal>"zy"</literal>, <literal>"xzy"</literal>, <literal>"xz"</literal>, <literal>"y"</literal> and so on.
+                        PS: The components are drawn in the same order they are found in the string.
                     </para>
                 </listitem>
             </varlistentry>
index a388866..07d8fba 100644 (file)
             
             <varlistentry>
                 
-                <term>z_component: </term>
+                <term>display_components: </term>
                 
                 <listitem>
                     
                     <para>
                         
-                        このフィールドは箱の中にz位置を追加します.
+                        このフィールドに指定できる値
                         
-                        この値は,<literal>"on" </literal>(z位置を書く)または
-                        
-                        <literal>"off"</literal> (z位置を書かない)とします.
+                        <literal>"xyz"</literal>.
                         
                     </para>
                     
diff --git a/scilab/modules/graphics/help/pt_BR/datatips/CHAPTER b/scilab/modules/graphics/help/pt_BR/datatips/CHAPTER
new file mode 100644 (file)
index 0000000..5bff66f
--- /dev/null
@@ -0,0 +1 @@
+title = Datatips
diff --git a/scilab/modules/graphics/help/pt_BR/datatips/datatip_properties.xml b/scilab/modules/graphics/help/pt_BR/datatips/datatip_properties.xml
new file mode 100644 (file)
index 0000000..7032536
--- /dev/null
@@ -0,0 +1,283 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" xml:id="datatip_properties">
+    <refnamediv>
+        <refname>propriedades das datatips</refname>
+        <refpurpose>Descição das propriedades para a entidade Datatip.
+        </refpurpose>
+    </refnamediv>
+    <refsection>
+        <title>Descrição</title>
+        <para>
+            A entidade Datatip é uma das folhas na hierarquia de entidades gráficas. Esta
+            entidade define os parametros para as Datatips.
+        </para>
+        <variablelist>
+            <varlistentry>
+                <term>parent: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>children: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>visible: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>data: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>box_mode: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm o valor padrão para a propriedade <literal>box_mode</literal>
+                        das datatips. Quando este valor é <literal>"on"</literal> a caixa envoltória é desenhada, 
+                        quando o valor é <literal>"off"</literal> nenhuma caixa é desenhada.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>label_mode: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm o valor padrão para a propriedade <literal>label_mode</literal>
+                        das datatips. Quando este valor é <literal>"on"</literal> os rótulos são desenhados, 
+                        quando o valor é <literal>"off"</literal> nenhuma  rótulo é desenhado.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>orientation: </term>
+                <listitem>
+                    <para>
+                        Este campo controla a posição da caixa de texto em respeito ao ponto de âncora na polyline.
+                        Os possíveis valores são 0 (esquerdo superior), 1 (direito superior), 2 (esquerdo inferior), 3 (direito inferior),
+                        4 (esquerda), 5 (direita), 6 (superior) ou 7 (inferior).
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>display_components: </term>
+                <listitem>
+                    <para>
+                        Esse campo controla quais componentes são desenhadas. Quando em 2D, seu valor padrão é 
+                        <literal>"xy"</literal>, para 3D seu valor padrão é <literal>"xyz"</literal>.
+                        Possíveis valores para este campo incluem qualquer combinação de <literal>"x"</literal>, 
+                        <literal>"y"</literal> e <literal>"z"</literal>.
+                        Alguns exemplos para este campo são <literal>"zy"</literal>, <literal>"xzy"</literal>, <literal>"xz"</literal>, <literal>"y"</literal> e assim por diante.
+                        Nota: As componentes sao desenhadas na mesma ordem em que são encontradas na string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>auto_orientation: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm o valor padrão para a propriedade <literal>auto_orientation</literal>
+                        das datatips.  Quando este valor é <literal>"on"</literal> a orientação é automatica, 
+                        quando o valor é <literal>"off"</literal> a orientação é dada pelo campo <literal>orientation</literal>.
+                        Veja a propriedade <literal>orientation</literal>.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>interp_mode: </term>
+                <listitem>
+                    <para>
+                        Esse campo controla a interpolação utilizada para posicionar a datatip. Quando este valor é 
+                        <literal>"on"</literal> é aplicada uma interpolação linear entre a malha de pontos no posicionamento
+                        das datatips, quando seu valor é <literal>"off"</literal> as datatips so podem ser posicionadas sobre 
+                        os pontos contidos na malha.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>display_function: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>font_foreground: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm o valor padrão para a propriedade <literal>font_foreground</literal>.
+                        Seu valor deve ser o índice de uma cor relativo ao mapa de cores atual.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>foreground: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm o valor padrão para a propriedade <literal>foreground</literal>
+                        usado para desenhar a caixa envoltória. Seu valor deve ser o índice de
+                        uma cor relativo ao mapa de cores atual.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>background: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_mode: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_style: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_size_unit: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_size: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_foreground: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>mark_background: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>user_data: </term>
+                <listitem>
+                    <para>Veja
+                        <literal>
+                            <link linkend="polyline_properties">polyline_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>tag: </term>
+                <listitem>
+                    <para>
+                        Esse campo contêm uma string normalmente utilizada para identificar o controle.
+                        Veja <literal>
+                            <link linkend="figure_properties">figure_properties</link>
+                        </literal>
+                        nas páginas de ajuda.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="polyline_properties">polyline_properties</link>
+            </member>
+            <member>
+                <link linkend="figure_properties">figure_properties</link>
+            </member>
+            <member>
+                <link linkend="graphics_entities">graphics_entities</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>5.5.2</revnumber>
+                <revremark>
+                    <para>
+                        Novo "orientation" valores disponíveis: "left", "right", "upper", "lower".
+                    </para>
+                </revremark>
+            </revision>
+        </revhistory>
+    </refsection>
+</refentry>
index 8e6cfc8..2f5d8da 100755 (executable)
@@ -606,7 +606,7 @@ function %h_p(h)
             "box_mode = "+sci2exp(h.box_mode)
             "label_mode = "+sci2exp(h.label_mode)
             "orientation = "+sci2exp(h.orientation)
-            "z_component = "+sci2exp(h.z_component)
+            "display_components = "+sci2exp(h.display_components)
             "auto_orientation = "+sci2exp(h.auto_orientation)
             "interp_mode = "+sci2exp(h.interp_mode)
             "display_function = "+sci2exp(h.display_function)
index abfa0cb..c331cb2 100644 (file)
@@ -313,7 +313,8 @@ function save_graphichandle(h,fd)
         mput(length(h.label_mode),characterFormat,fd); // label_mode
         mput(ascii(h.label_mode),characterFormat,fd);
         mput(h.orientation,characterFormat,fd) // orientation
-        mput(bool2s(h.z_component=="on"),characterFormat,fd) // z_component
+        mput(length(h.display_components),characterFormat,fd);
+        mput(h.display_components,characterFormat,fd) // display_components
         mput(bool2s(h.auto_orientation=="on"),characterFormat,fd) // auto_orientation
         mput(bool2s(h.interp_mode=="on"),characterFormat,fd) // interp_mode
         mput(length(ascii(h.display_function)),stringFormat,fd); // display_function
index 7b0bbfc..838ac4a 100755 (executable)
@@ -219,7 +219,8 @@ static getHashTableCouple propertyGetTable[] =
     {"tooltipstring", GetUicontrolTooltipString},
     {"closerequestfcn", get_figure_closerequestfcn_property},
     {"orientation", get_tip_orientation_property},
-    {"z_component", get_tip_3component_property},
+    {"z_component", get_tip_z_component_property},
+    {"display_components", get_tip_display_components_property},
     {"auto_orientation", get_tip_auto_orientation_property},
     {"interp_mode", get_tip_interp_mode_property},
     {"box_mode", get_tip_box_mode_property},
index 8145c8d..50a9376 100755 (executable)
@@ -218,7 +218,8 @@ static setHashTableCouple propertySetTable[] =
     {"tooltipstring", SetUicontrolTooltipString},
     {"closerequestfcn", set_figure_closerequestfcn_property},
     {"orientation", set_tip_orientation_property},
-    {"z_component", set_tip_3component_property},
+    {"z_component", set_tip_z_component_property},
+    {"display_components", set_tip_display_components_property},
     {"auto_orientation", set_tip_auto_orientation_property},
     {"interp_mode", set_tip_interp_mode_property},
     {"box_mode", set_tip_box_mode_property},
index 5cc13aa..d132a92 100755 (executable)
@@ -164,7 +164,8 @@ GRAPHICS_IMPEXP void* get_anti_aliasing_property(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_tag_property(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_UID(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_tip_orientation_property(void* _pvCtx, int iObjUID);
-GRAPHICS_IMPEXP void* get_tip_3component_property(void* _pvCtx, int iObjUID);
+GRAPHICS_IMPEXP void* get_tip_z_component_property(void* _pvCtx, int iObjUID);
+GRAPHICS_IMPEXP void* get_tip_display_components_property(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_tip_auto_orientation_property(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_tip_interp_mode_property(void* _pvCtx, int iObjUID);
 GRAPHICS_IMPEXP void* get_tip_box_mode_property(void* _pvCtx, int iObjUID);
index de990c7..8a15277 100755 (executable)
@@ -44,29 +44,42 @@ void* get_tip_orientation_property(void* _pvCtx, int iObjUID)
 }
 
 /**
- * Get the status if the Z component is displayed.
+ * Old z_componet property, warns the user
  */
-void* get_tip_3component_property(void* _pvCtx, int iObjUID)
+void* get_tip_z_component_property(void* _pvCtx, int iObjUID)
 {
-    int tip_3component;
-    int *piTip_3component = &tip_3component;
+    char * tip_display_components;
+    getGraphicObjectProperty(iObjUID, __GO_DATATIP_DISPLAY_COMPONENTS__, jni_string, (void **)&tip_display_components);
 
-    getGraphicObjectProperty(iObjUID, __GO_DATATIP_3COMPONENT__, jni_bool, (void **)&piTip_3component);
-
-    if (piTip_3component == NULL)
+    //Only warns if the property exists for the object.
+    if (tip_display_components == NULL)
     {
         Scierror(999, _("'%s' property does not exist for this handle.\n"), "z_component");
-        return NULL;
     }
-
-    if (tip_3component)
+    else
     {
-        return sciReturnString("on");
+        Scierror(999, _("'%s' property is obsolete and will be removed, use '%s' instead.\n"), "z_component", "display_components");
     }
-    else
+
+    return NULL;
+}
+
+
+/**
+ * Get the datatip components that should be displayed
+ */
+void* get_tip_display_components_property(void* _pvCtx, int iObjUID)
+{
+    char * tip_display_components;
+    getGraphicObjectProperty(iObjUID, __GO_DATATIP_DISPLAY_COMPONENTS__, jni_string, (void **)&tip_display_components);
+
+    if (tip_display_components == NULL)
     {
-        return sciReturnString("off");
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "display_components");
+        return NULL;
     }
+
+    return sciReturnString(tip_display_components);
 }
 
 /**
index 7be1d9d..548dc61 100755 (executable)
@@ -166,7 +166,8 @@ int set_grid_position_property(void* _pvCtx, int iObj, void* _pvData, int valueT
 int set_anti_aliasing_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_tag_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_tip_orientation_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
-int set_tip_3component_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
+int set_tip_z_component_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
+int set_tip_display_components_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_tip_auto_orientation_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_tip_interp_mode_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_tip_box_mode_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol);
index 9282ac4..a5a9150 100755 (executable)
@@ -56,25 +56,109 @@ int set_tip_orientation_property(void* _pvCtx, int iObj, void* _pvData, int valu
 }
 
 /**
- * Enable/disable the datatip Z component to be displayed.
+ * Old z_componet property, warns the user
  */
-int set_tip_3component_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol)
+int set_tip_z_component_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol)
 {
-    BOOL status = FALSE;
-    int use_z = tryGetBooleanValueFromStack(_pvData, valueType, nbRow, nbCol, "z_component");
-    if (use_z == NOT_A_BOOLEAN_VALUE)
+    char * tip_display_components;
+    getGraphicObjectProperty(iObj, __GO_DATATIP_DISPLAY_COMPONENTS__, jni_string, (void **)&tip_display_components);
+
+    //Only warns if the property exists for the object.
+    if (tip_display_components == NULL)
+    {
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "z_component");
+    }
+    else
+    {
+        Scierror(999, _("'%s' property is obsolete and will be removed, use '%s' instead.\n"), "z_component", "display_components");
+    }
+
+    return NULL;
+}
+
+/**
+ * Set which coordinate components should be displayed
+ */
+int set_tip_display_components_property(void* _pvCtx, int iObj, void* _pvData, int valueType, int nbRow, int nbCol)
+{
+    if (valueType != sci_strings)
     {
+        Scierror(999, _("Wrong type for '%s' property: String expected.\n"), "display_components");
         return SET_PROPERTY_ERROR;
     }
-    status = setGraphicObjectProperty(iObj, __GO_DATATIP_3COMPONENT__, &use_z, jni_bool, 1);
+    const char * value = (const char*)_pvData;
 
+    int isXSet = 0;
+    int isYSet = 0;
+    int isZSet = 0;
+    //check if the value is valid and throws properly error msg
+    int i;
+    for (i = 0; i < 4; ++i)
+    {
+        if (value[i] == '\0')
+        {
+            if (i == 0)
+            {
+                Scierror(999, _("Wrong value for '%s' property: Non-empty string expected.\n"), "display_components");
+                return SET_PROPERTY_ERROR;
+            }
+            else
+            {
+                break;
+            }
+        }
+        else
+        {
+            if (i == 3)
+            {
+                Scierror(999, _("Wrong value for '%s' property: String with length 3 or less expected.\n"), "display_components");
+                return SET_PROPERTY_ERROR;
+            }
+            switch (value[i])
+            {
+                case 'x':
+                case 'X':
+                    if (isXSet)
+                    {
+                        Scierror(999, _("Wrong value for '%s' property: String contains 'x' component more than once.\n"), "display_components");
+                        return SET_PROPERTY_ERROR;
+                    }
+                    isXSet++;
+                    break;
+                case 'y':
+                case 'Y':
+                    if (isYSet)
+                    {
+                        Scierror(999, _("Wrong value for '%s' property: String contains 'y' component more than once.\n"), "display_components");
+                        return SET_PROPERTY_ERROR;
+                    }
+                    isYSet++;
+                    break;
+                case 'z':
+                case 'Z':
+                    if (isZSet)
+                    {
+                        Scierror(999, _("Wrong value for '%s' property: String contains 'z' component more than once.\n"), "display_components");
+                        return SET_PROPERTY_ERROR;
+                    }
+                    isZSet++;
+                    break;
+                default:
+                    Scierror(999, _("Wrong value for '%s' property: String with 'x|y|z' expected.\n"), "display_components");
+                    return SET_PROPERTY_ERROR;
+            }
+        }
+    }
+    BOOL status = FALSE;
+
+    status = setGraphicObjectProperty(iObj, __GO_DATATIP_DISPLAY_COMPONENTS__, value, jni_string, 1);
     if (status == TRUE)
     {
         return SET_PROPERTY_SUCCEED;
     }
     else
     {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "z_component");
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "display_components");
         return SET_PROPERTY_ERROR;
     }
 }
index 60a1910..cf5ed56 100755 (executable)
@@ -169,7 +169,7 @@ public class DatatipCreate {
         controller.setProperty(polyline, GraphicObjectProperties.__GO_DATATIPS__, var);
 
         if (viewInfo == 1 && PolylineData.isZCoordSet(polyline) == 1) {
-            controller.setProperty(newDatatip, GraphicObjectProperties.__GO_DATATIP_3COMPONENT__, true);
+            controller.setProperty(newDatatip, GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__, "xyz");
             controller.setProperty(newDatatip, GraphicObjectProperties.__GO_CLIP_STATE__, 0);
         }
 
index b9cf0da..a1b8686 100644 (file)
@@ -40,7 +40,7 @@ public class GEDView implements GraphicView {
     private static boolean surfaceMode = true;
     private static boolean colored = true;
     private static Integer datatipOrientation = 0;
-    private static boolean datatip3Component = false;
+    private static String datatipDisplayComponents = "";
     private static boolean datatipAutoOrientation = true;
     private static boolean datatipBoxMode = true;
     private static boolean datatipLabelMode = true;
@@ -164,11 +164,11 @@ public class GEDView implements GraphicView {
                         datatipOrientation = c_datatipOrientation;
                     }
                     break;
-                case GraphicObjectProperties.__GO_DATATIP_3COMPONENT__:
-                    boolean c_datatip3Component = (Boolean) GraphicController.getController().getProperty(id, GraphicObjectProperties.__GO_DATATIP_3COMPONENT__);
-                    if (datatip3Component != c_datatip3Component) {
+                case GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__:
+                    String c_datatipDisplayComponents = (String) GraphicController.getController().getProperty(id, GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__);
+                    if (datatipDisplayComponents != c_datatipDisplayComponents) {
                         isValid = true;
-                        datatip3Component = c_datatip3Component;
+                        datatipDisplayComponents = c_datatipDisplayComponents;
                     }
                     break;
                 case GraphicObjectProperties.__GO_DATATIP_AUTOORIENTATION__:
index d07fb24..ad58558 100644 (file)
@@ -151,7 +151,7 @@ public class MessagesGED {
     public static final String mark_style = Messages.gettext("Mark Style");
 
     //Data - Labels
-    public static final String _3_Components = Messages.gettext("3 Components");
+    public static final String display_components = Messages.gettext("Components display");
     public static final String data_properties = Messages.gettext("Data Properties");
     public static final String data_mapping = Messages.gettext("Data Mapping");
     public static final String direct = Messages.gettext("Direct");
index 95249c3..39247ac 100644 (file)
@@ -60,7 +60,7 @@ public class DataProperties extends SimpleSection {
         final int leftmargin = 0; //to inner components
         int column = 1; //first column
 
-        datatip.tip3Component(sectionPanel, row++, column, leftmargin, objectID);
+        datatip.tipDisplayComponents(sectionPanel, row++, column, leftmargin, objectID);
 
         datatip.tipData(sectionPanel, row++, column, leftmargin, objectID);
 
@@ -68,4 +68,4 @@ public class DataProperties extends SimpleSection {
 
         graphicObject.userData(sectionPanel, row++, column, leftmargin);
     }
-}
\ No newline at end of file
+}
index fdb0a45..ae5157f 100644 (file)
@@ -32,7 +32,7 @@ import org.scilab.modules.gui.ged.MessagesGED;
 /**
 * Datatip properties:
 * TIP_AUTOORIENTATION, TIP_DATA, TIP_BOX_MODE, TIP_LABEL_MODE,
-* TIP_ORIENTATION, TIP_3COMPONENT, TIP_INTERP_MODE, TIP_DISPLAY_FNC
+* TIP_ORIENTATION, TIP_DISPLAY_COMPONENTS, TIP_INTERP_MODE, TIP_DISPLAY_FNC
 *
 * @author Marcos CARDINOT <mcardinot@gmail.com>
 */
@@ -43,32 +43,36 @@ public class Datatip extends ContentLayout {
     private JTextField cTipDataZ = new JTextField();
 
     /**
-     * Components of the property: Tip 3Component
+     * Components of the property: Tip display components
      * @param panel
      * @param ROW
      * @param COLUMN
      * @param LEFTMARGIN
      * @param UID
      */
-    public void tip3Component(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final Integer UID) {
-        String[] messageOffOn = new String[] {MessagesGED.off , MessagesGED.on};
-        JLabel lTip3Comp = new JLabel();
-        final JComboBox cTip3Comp = new JComboBox();
-        addLabelComboBox(panel, lTip3Comp, MessagesGED._3_Components,
-                         cTip3Comp, messageOffOn, LEFTMARGIN, COLUMN, ROW);
-        cTip3Comp.addActionListener(new ActionListener() {
+    public void tipDisplayComponents(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final Integer UID) {
+
+        JLabel lTipDisplayComp = new JLabel();
+        final JTextField cTipDisplayComp = new JTextField();
+
+        addLabelTextField(panel, lTipDisplayComp, MessagesGED.display_components,
+                          cTipDisplayComp, true, LEFTMARGIN, COLUMN, ROW);
+        cTipDisplayComp.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent evt) {
-                GraphicController.getController().setProperty(
-                    UID, GraphicObjectProperties.__GO_DATATIP_3COMPONENT__,
-                    cTip3Comp.getSelectedIndex() == 0 ? false : true);
+                if (!GraphicController.getController().setProperty(
+                            UID, GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__,
+                            cTipDisplayComp.getText())) {
+                    cTipDisplayComp.setText((String) GraphicController.getController()
+                                            .getProperty(UID, GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__));
+                }
                 getTipData(UID);
             }
         });
-        // Get the current status of the property: Tip 3Components
-        boolean enable = (Boolean) GraphicController.getController()
-                         .getProperty(UID, GraphicObjectProperties.__GO_DATATIP_3COMPONENT__);
-        cTip3Comp.setSelectedIndex(enable ? 1 : 0);
+        // Get the current status of the property: Tip display components
+        String comp = (String) GraphicController.getController()
+                      .getProperty(UID, GraphicObjectProperties.__GO_DATATIP_DISPLAY_COMPONENTS__);
+        cTipDisplayComp.setText(comp);
     }
 
     /**
@@ -298,4 +302,4 @@ public class Datatip extends ContentLayout {
         cTipOrientation.setSelectedIndex((Integer) GraphicController.getController()
                                          .getProperty(UID, GraphicObjectProperties.__GO_DATATIP_ORIENTATION__));
     }
-}
\ No newline at end of file
+}
index 759ac1c..d860211 100644 (file)
@@ -73,7 +73,7 @@ struct Links
     static std::list<int> legends()
     {
         std::list<int> legs;
-        for (auto& i : paths)
+        for (auto & i : paths)
         {
             legs.push_back(i.first);
         }
@@ -406,7 +406,7 @@ struct DatatipHandle
         m.emplace_back("box_mode", std::vector<int>({SAVE_LOAD, __GO_DATATIP_BOX_MODE__, jni_bool}));
         m.emplace_back("label_mode", std::vector<int>({SAVE_LOAD, __GO_DATATIP_LABEL_MODE__, jni_bool}));
         m.emplace_back("orientation", std::vector<int>({SAVE_LOAD, __GO_DATATIP_ORIENTATION__, jni_int}));
-        m.emplace_back("z_component", std::vector<int>({SAVE_LOAD, __GO_DATATIP_3COMPONENT__, jni_bool}));
+        m.emplace_back("display_components", std::vector<int>({SAVE_LOAD, __GO_DATATIP_DISPLAY_COMPONENTS__, jni_string}));
         m.emplace_back("auto_orientation", std::vector<int>({SAVE_LOAD, __GO_DATATIP_AUTOORIENTATION__, jni_bool}));
         m.emplace_back("interp_mode", std::vector<int>({SAVE_LOAD, __GO_DATATIP_INTERP_MODE__, jni_bool}));
         m.emplace_back("display_function", std::vector<int>({SAVE_LOAD, __GO_DATATIP_DISPLAY_FNC__, jni_string}));
index 741687a..4619186 100644 (file)
@@ -296,7 +296,7 @@ public class DatatipTextDrawer extends TextManager {
         final double[] first, second, third;
         Integer axes = datatip.getParentAxes();
 
-        if (datatip.isUsing3Component()) {
+        if (PolylineData.isZCoordSet(datatip.getParent()) != 0) {
             final double[] dataZ = (double[]) PolylineData.getDataZ(datatip.getParent());
             first = CallRenderer.getPixelFrom3dCoordinates(axes, new double[] {dataX[index - 1], dataY[index - 1], dataZ[index - 1]});
             second = CallRenderer.getPixelFrom3dCoordinates(axes, new double[] {dataX[index], dataY[index], dataZ[index]});