GED: Label Properties 22/12722/3
Marcos CARDINOT [Fri, 27 Sep 2013 20:56:09 +0000 (21:56 +0100)]
Change-Id: I80b6da23d0ca8d97e8fd8fa77d1cc084443abc19

scilab/modules/gui/src/java/org/scilab/modules/gui/ged/MessagesGED.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/SwapObject.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/actions/ShowHide.java
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/BaseProperties.java [new file with mode: 0644]
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Font.java [new file with mode: 0644]
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Label.java [new file with mode: 0644]
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Position.java [new file with mode: 0644]
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Style.java [new file with mode: 0644]
scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/properties/Label.java [new file with mode: 0644]

index 24e79bf..031db82 100644 (file)
@@ -44,6 +44,8 @@ public class MessagesGED {
     public static final String matplot = Messages.gettext("Matplot");
 
     //Base Properties - Labels
+    public static final String auto_rotation = Messages.gettext("Auto Rotation");
+    public static final String auto_position = Messages.gettext("Auto Position");
     public static final String auto_ticks = Messages.gettext("Auto Ticks");
     public static final String tick = Messages.gettext("Tick");
     public static final String lines = Messages.gettext("Lines");
@@ -223,6 +225,7 @@ public class MessagesGED {
 
     //Font - Labels
     public static final String font = Messages.gettext("Font");
+    public static final String font_angle = Messages.gettext("Font Angle");
     public static final String font_color = Messages.gettext("Font Color");
     public static final String font_size = Messages.gettext("Font Size");
     public static final String font_style = Messages.gettext("Font Style");
index 21bf5c7..f6991bc 100644 (file)
@@ -19,6 +19,7 @@ import org.scilab.modules.gui.ged.graphic_objects.datatip.Datatip;
 import org.scilab.modules.gui.ged.graphic_objects.fec.Fec;
 import org.scilab.modules.gui.ged.graphic_objects.figure.Figure;
 import org.scilab.modules.gui.ged.graphic_objects.imageplot.Imageplot;
+import org.scilab.modules.gui.ged.graphic_objects.label.Label;
 import org.scilab.modules.gui.ged.graphic_objects.legend.Legend;
 import org.scilab.modules.gui.ged.graphic_objects.polyline.Polyline;
 import org.scilab.modules.gui.ged.graphic_objects.rectangle.Rectangle;
@@ -31,12 +32,15 @@ import org.scilab.modules.gui.ged.graphic_objects.surface.Surface;
 * @author Marcos CARDINOT <mcardinot@gmail.com>
 */
 public class SwapObject {
+    private static int lastType;
+
     /**
     * Manager which property window will open.
     * @param objectID Enters the identification of object.
     */
     public SwapObject(String objectID) {
         Integer type = (Integer) GraphicController.getController().getProperty(objectID, GraphicObjectProperties.__GO_TYPE__);
+        lastType = type;
         switch (type) {
             case GraphicObjectProperties.__GO_POLYLINE__:
                 Polyline polyline = new Polyline(objectID);
@@ -62,6 +66,10 @@ public class SwapObject {
                 Legend legend = new Legend(objectID);
                 SwingInspector.setPanel(legend, MessagesGED.legend);
                 break;
+            case GraphicObjectProperties.__GO_LABEL__:
+                Label label = new Label(objectID);
+                SwingInspector.setPanel(label, MessagesGED.label);
+                break;
             case GraphicObjectProperties.__GO_ARC__:
                 break;
             case GraphicObjectProperties.__GO_CHAMP__:
@@ -89,9 +97,19 @@ public class SwapObject {
                 SwingInspector.setPanel(axes, MessagesGED.axes);
                 break;
             default:
-                Figure figure = new Figure(objectID);
-                SwingInspector.setPanel(figure, MessagesGED.figure);
+                try {
+                    Figure figure = new Figure(objectID);
+                    SwingInspector.setPanel(figure, MessagesGED.figure);
+                } catch (NullPointerException e) { }
                 break;
         }
     }
+
+    /**
+    * Get the last type of object.
+    * @return type
+    */
+    public static int getLastType() {
+        return lastType;
+    }
 }
\ No newline at end of file
index 65ae450..d2a88e3 100644 (file)
@@ -106,12 +106,14 @@ public class ShowHide extends CommonCallBack {
      * @param hide Boolean.
      */
     public static void action(boolean hide) {
+        arc(hide);
         axes(hide);
         champ(hide);
         datatip(hide);
         fec(hide);
         figure(hide);
         imageplot(hide);
+        label(hide);
         legend(hide);
         polyline(hide);
         rectangle(hide);
@@ -119,6 +121,19 @@ public class ShowHide extends CommonCallBack {
         surface(hide);
     }
 
+    public static void arc(boolean hide) {
+        try {
+            org.scilab.modules.gui.ged.graphic_objects.axes.BaseProperties.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Box.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Camera.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Tick.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Label.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Position.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.axes.Style.getInstance().setVisibility(!hide);
+        } catch (NullPointerException e1) {
+        } catch (NoSuchMethodError e2) { }
+    }
+
     public static void axes(boolean hide) {
         try {
             org.scilab.modules.gui.ged.graphic_objects.axes.BaseProperties.getInstance().setVisibility(!hide);
@@ -176,6 +191,16 @@ public class ShowHide extends CommonCallBack {
         } catch (NoSuchMethodError e2) { }
     }
 
+    public static void label(boolean hide) {
+        try {
+            org.scilab.modules.gui.ged.graphic_objects.label.BaseProperties.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.label.Font.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.label.Position.getInstance().setVisibility(!hide);
+            org.scilab.modules.gui.ged.graphic_objects.label.Style.getInstance().setVisibility(!hide);
+        } catch (NullPointerException e1) {
+        } catch (NoSuchMethodError e2) { }
+    }
+
     public static void legend(boolean hide) {
         try {
             org.scilab.modules.gui.ged.graphic_objects.legend.BaseProperties.getInstance().setVisibility(!hide);
@@ -283,6 +308,15 @@ public class ShowHide extends CommonCallBack {
                     setStatus(false);
                 else if (!BP && !DP)
                     setStatus(true);
+            } else if("label".equals(type)) {
+                boolean BP = org.scilab.modules.gui.ged.graphic_objects.label.BaseProperties.getInstance().getStatus();
+                boolean FT = org.scilab.modules.gui.ged.graphic_objects.label.Font.getInstance().getStatus();
+                boolean PO = org.scilab.modules.gui.ged.graphic_objects.label.Position.getInstance().getStatus();
+                boolean ST = org.scilab.modules.gui.ged.graphic_objects.label.Style.getInstance().getStatus();
+                if (BP && FT && PO && ST)
+                    setStatus(false);
+                else if (!BP && !FT && !PO && !ST)
+                    setStatus(true);
             } else if("legend".equals(type)) {
                 boolean BP = org.scilab.modules.gui.ged.graphic_objects.legend.BaseProperties.getInstance().getStatus();
                 boolean DP = org.scilab.modules.gui.ged.graphic_objects.legend.DataProperties.getInstance().getStatus();
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/BaseProperties.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/BaseProperties.java
new file mode 100644 (file)
index 0000000..f9c5a48
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2012 2013 - Marcos CARDINOT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.label;
+
+import javax.swing.JPanel;
+import org.scilab.modules.gui.ged.MessagesGED;
+import org.scilab.modules.gui.ged.graphic_objects.SimpleSection;
+import org.scilab.modules.gui.ged.graphic_objects.properties.GraphicObject;
+import org.scilab.modules.gui.ged.graphic_objects.properties.Label;
+
+/**
+* Construction and startup of all components of the section: Base Properties.
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class BaseProperties extends SimpleSection {
+    private JPanel sectionPanel;
+    private static BaseProperties instance;
+    private GraphicObject graphicObject = new GraphicObject();
+    private Label label = new Label();
+
+    /**
+    * Initializes the properties and the icons of the buttons.
+    * @param objectID Enters the identification of object.
+    */
+    public BaseProperties(String objectID) {
+        super(MessagesGED.base_properties, "label");
+        instance = this;
+        sectionPanel = getSectionPanel();
+        initComponents(objectID);
+    }
+
+    /**
+     * Get instance
+     * @return instance
+     */
+    public static BaseProperties getInstance() {
+        return instance;
+    }
+
+    /**
+    * Add all the properties in this section.
+    * @param objectID uid
+    */
+    @Override
+    public final void initComponents(String objectID) {
+        String[] messageOffOn = new String[] {MessagesGED.off , MessagesGED.on};
+        int row = 0;
+        final int leftmargin = 16; //to inner components
+        int column = 0; //first column
+
+        //Components of the property: Tag.
+        graphicObject.tag(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Text
+        label.text(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Visible.
+        graphicObject.visible(sectionPanel, row++, column, leftmargin, objectID);
+    }
+}
\ No newline at end of file
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Font.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Font.java
new file mode 100644 (file)
index 0000000..ed4b475
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2013 - Marcos CARDINOT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.label;
+
+import javax.swing.JPanel;
+import org.scilab.modules.gui.ged.MessagesGED;
+import org.scilab.modules.gui.ged.graphic_objects.SimpleSection;
+import org.scilab.modules.gui.ged.graphic_objects.properties.Label;
+import org.scilab.modules.gui.ged.graphic_objects.properties.TextObject;
+
+/**
+* Construction and startup of all components of the section: Font.
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class Font extends SimpleSection {
+    private JPanel sectionPanel;
+    private static Font instance;
+    private Label label = new Label();
+    private TextObject textObject = new TextObject();
+
+    /**
+    * Receives and passes the objectID to the parent class.
+    * @param objectID Enters the identification of object.
+    */
+    public Font(String objectID) {
+        super(MessagesGED.font, "label");
+        instance = this;
+        sectionPanel = getSectionPanel();
+        initComponents(objectID);
+    }
+
+    /**
+     * Get instance
+     * @return instance
+     */
+    public static Font getInstance() {
+        return instance;
+    }
+
+    /**
+    * Add all the properties in this section.
+    * @param objectID uid
+    */
+    @Override
+    public final void initComponents(String objectID) {
+        int row = 0;
+        final int leftmargin = 16; //to inner components
+        int column = 0; //first column
+
+        //Components of the property: Font Angle
+        label.fontAngle(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Font Color.
+        textObject.fontColor(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Font Size.
+        textObject.fontSize(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Font Style.
+        textObject.fontStyle(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Fractional Font.
+        textObject.fractionalFont(sectionPanel, row++, column, leftmargin, objectID);
+    }
+}
\ No newline at end of file
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Label.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Label.java
new file mode 100644 (file)
index 0000000..6fcac03
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2013 - Marcos Cardinot
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.label;
+
+import org.scilab.modules.gui.ged.graphic_objects.SimpleObject;
+
+/**
+* Properties of the label.
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class Label extends SimpleObject {
+    private BaseProperties base;
+    private Font font;
+    private Position position;
+    private Style style;
+
+    /**
+    * Initializes all sections (JPanel's) and Add in Main JPanel of Object.
+    * @param objectID Enters the identification of object.
+    */
+    public Label(String objectID) {
+        super(objectID);
+        base = new BaseProperties(objectID);
+        font = new Font(objectID);
+        position = new Position(objectID);
+        style = new Style(objectID);
+        addSectionPanel(this, base, getPosition(base.getName()));
+        addSectionPanel(this, font, getPosition(font.getName()));
+        addSectionPanel(this, position, getPosition(position.getName()));
+        addSectionPanel(this, style, getPosition(style.getName()));
+        this.fillerV(getSectionsName());
+    }
+
+    /**
+    * Get the name of all sections.
+    * @return sections name
+    */
+    @Override
+    public final String[] getSectionsName() {
+        return new String[] {
+                    base.getName(),
+                    font.getName(),
+                    position.getName(),
+                    style.getName()};
+    }
+}
\ No newline at end of file
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Position.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Position.java
new file mode 100644 (file)
index 0000000..edbc968
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2013 - Marcos CARDINOT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.label;
+
+import javax.swing.JPanel;
+import org.scilab.modules.gui.ged.MessagesGED;
+import org.scilab.modules.gui.ged.graphic_objects.SimpleSection;
+import org.scilab.modules.gui.ged.graphic_objects.properties.Label;
+
+/**
+* Construction and startup of all components of the section: Position.
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class Position extends SimpleSection {
+    private JPanel sectionPanel;
+    private static Position instance;
+    private Label label = new Label();
+
+    /**
+    * Initializes the properties and the icons of the buttons.
+    * @param objectID Enters the identification of object.
+    */
+    public Position(String objectID) {
+        super(MessagesGED.position, "label");
+        instance = this;
+        sectionPanel = getSectionPanel();
+        initComponents(objectID);
+    }
+
+    /**
+     * Get instance
+     * @return instance
+     */
+    public static Position getInstance() {
+        return instance;
+    }
+
+    /**
+    * Add all the properties in this section.
+    * @param objectID uid
+    */
+    @Override
+    public final void initComponents(String objectID) {
+        int row = 0;
+        final int leftmargin = 0; //to inner components
+        int column = 1; //first column
+
+        //Components of the property: Auto Rotation.
+        label.autoRotation(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Auto Position.
+        label.autoPosition(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Position.
+        label.position(sectionPanel, row++, column, leftmargin, objectID);
+    }
+}
\ No newline at end of file
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Style.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/label/Style.java
new file mode 100644 (file)
index 0000000..04c94a6
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2013 - Marcos CARDINOT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.label;
+
+import javax.swing.JPanel;
+import org.scilab.modules.graphic_objects.graphicController.GraphicController;
+import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
+import org.scilab.modules.gui.ged.MessagesGED;
+import org.scilab.modules.gui.ged.graphic_objects.SimpleSection;
+import org.scilab.modules.gui.ged.graphic_objects.properties.ContouredObject;
+import org.scilab.modules.gui.ged.graphic_objects.properties.Legend;
+
+/**
+* Construction and startup of all components of the section: Style/Appeareance.
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class Style extends SimpleSection {
+    private JPanel sectionPanel;
+    private static Style instance;
+    private ContouredObject contouredObject = new ContouredObject();
+    private Legend legend = new Legend();
+
+    /**
+    * Receives and passes the objectID to the parent class.
+    * @param objectID Enters the identification of object.
+    */
+    public Style(String objectID) {
+        super(MessagesGED.style_appearance, "label");
+        instance = this;
+        sectionPanel = getSectionPanel();
+        initComponents(objectID);
+    }
+
+    /**
+     * Get instance
+     * @return instance
+     */
+    public static Style getInstance() {
+        return instance;
+    }
+
+    /**
+    * Initialize the Components.
+    */
+    @Override
+    public final void initComponents(String objectID) {
+        int row = 0;
+        final int leftmargin = 16; //to inner components
+        int column = 0; //first column
+        String parentFigure = (String) GraphicController.getController()
+                .getProperty(objectID, GraphicObjectProperties.__GO_PARENT_FIGURE__);
+
+        //Components of the property: Line Mode.
+        contouredObject.lineMode(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Foreground Color.
+        contouredObject.lineColor(sectionPanel, row++, column, leftmargin,
+                                  objectID, parentFigure, "label.Style", this);
+
+        //Components of the property: Fill Mode.
+        contouredObject.fillMode(sectionPanel, row++, column, leftmargin, objectID);
+
+        //Components of the property: Background Color.
+        contouredObject.backgroundColor(sectionPanel, row++, column, leftmargin, objectID, parentFigure);
+    }
+
+    /**
+    * Change the color of the object.
+    * @param scilabColor index of the color map.
+    * @param UID objectID.
+    */
+    public void setForegroundColor(int scilabColor, String UID) {
+        GraphicController.getController().setProperty(
+                UID, GraphicObjectProperties.__GO_LINE_COLOR__, scilabColor);
+    }
+}
\ No newline at end of file
diff --git a/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/properties/Label.java b/scilab/modules/gui/src/java/org/scilab/modules/gui/ged/graphic_objects/properties/Label.java
new file mode 100644 (file)
index 0000000..8711e5b
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2013 - Marcos CARDINOT
+ *
+ * This file must be used under the terms of the CeCILL.
+ * 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-en.txt
+ *
+ */
+package org.scilab.modules.gui.ged.graphic_objects.properties;
+
+import java.awt.Color;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusAdapter;
+import java.awt.event.FocusEvent;
+
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JColorChooser;
+import javax.swing.JComboBox;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.JToggleButton;
+
+import org.scilab.modules.graphic_objects.graphicController.GraphicController;
+import org.scilab.modules.graphic_objects.graphicObject.GraphicObjectProperties;
+import org.scilab.modules.gui.ged.ColorMapHandler;
+import org.scilab.modules.gui.ged.ContentLayout;
+import org.scilab.modules.gui.ged.MessagesGED;
+
+/**
+* Label properties: FONTANGLE, AUTOPOSITION, POSITION, AUTOROTATION
+*
+* @author Marcos CARDINOT <mcardinot@gmail.com>
+*/
+public class Label extends ContentLayout {
+    private JTextField cCoordinates;
+    private JTextField cX;
+    private JTextField cY;
+
+    /**
+     * Components of the property: Auto Position
+     * @param panel
+     * @param ROW
+     * @param COLUMN
+     * @param LEFTMARGIN
+     * @param UID
+     */
+    public void autoPosition(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final String UID) {
+        JLabel lAutoPosition = new JLabel();
+        final JComboBox cAutoPosition = new JComboBox();
+        addLabelComboBox(panel, lAutoPosition, MessagesGED.auto_position,
+                                cAutoPosition, new String[] {MessagesGED.off , MessagesGED.on},
+                                LEFTMARGIN, COLUMN, ROW++);
+        cAutoPosition.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                GraphicController.getController().setProperty(
+                        UID, GraphicObjectProperties.__GO_AUTO_POSITION__,
+                        cAutoPosition.getSelectedIndex() == 0 ? false : true);
+            }
+        });
+
+        // Get the current status of the property: Auto Position
+        boolean enable = (Boolean) GraphicController.getController()
+                                .getProperty(UID, GraphicObjectProperties.__GO_AUTO_POSITION__);
+        cAutoPosition.setSelectedIndex(enable?1:0);
+    }
+
+    /**
+     * Components of the property: Auto Rotation
+     * @param panel
+     * @param ROW
+     * @param COLUMN
+     * @param LEFTMARGIN
+     * @param UID
+     */
+    public void autoRotation(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final String UID) {
+        JLabel lAutoRotation = new JLabel();
+        final JComboBox cAutoRotation = new JComboBox();
+        addLabelComboBox(panel, lAutoRotation, MessagesGED.auto_rotation,
+                                cAutoRotation, new String[] {MessagesGED.off , MessagesGED.on},
+                                LEFTMARGIN, COLUMN, ROW++);
+        cAutoRotation.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                GraphicController.getController().setProperty(
+                        UID, GraphicObjectProperties.__GO_AUTO_ROTATION__,
+                        cAutoRotation.getSelectedIndex() == 0 ? false : true);
+            }
+        });
+
+        // Get the current status of the property: Auto Rotation
+        boolean enable = (Boolean) GraphicController.getController()
+                                .getProperty(UID, GraphicObjectProperties.__GO_AUTO_ROTATION__);
+        cAutoRotation.setSelectedIndex(enable?1:0);
+    }
+
+    /**
+     * Components of the property: Font Anlge
+     * @param panel
+     * @param ROW
+     * @param COLUMN
+     * @param LEFTMARGIN
+     * @param UID
+     */
+    public void fontAngle(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final String UID) {
+        JLabel lFontAngle = new JLabel();
+        final JTextField cFontAngle = new JTextField();
+        addLabelTextField(panel, lFontAngle, MessagesGED.font_angle,
+                          cFontAngle, true, LEFTMARGIN, COLUMN, ROW++);
+        cFontAngle.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                setFontAngle(cFontAngle, UID);
+            }
+        });
+        cFontAngle.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(FocusEvent evt) {
+                setFontAngle(cFontAngle, UID);
+            }
+        });
+
+        //Get the current status of the property: Font Angle.
+        cFontAngle.setText(Double.toString((Double) GraphicController.getController()
+                    .getProperty(UID, GraphicObjectProperties.__GO_FONT_ANGLE__)));
+    }
+
+    /**
+    * Set Font Angle.
+    * @param cFontAngle JTextField.
+    * @param UID id.
+    */
+    private void setFontAngle(JTextField cFontAngle, String UID) {
+        try {
+            GraphicController.getController().setProperty(
+                    UID,
+                    GraphicObjectProperties.__GO_FONT_ANGLE__,
+                    Double.parseDouble(cFontAngle.getText()));
+        } catch (NumberFormatException e) {
+            cFontAngle.setText(Double.toString((Double) GraphicController.getController()
+                    .getProperty(UID, GraphicObjectProperties.__GO_FONT_ANGLE__)));
+        }
+    }
+
+    /**
+     * Components of the property: Position (coordinates)
+     * @param panel
+     * @param ROW
+     * @param COLUMN
+     * @param LEFTMARGIN
+     * @param UID 
+     */
+    public void position(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final String UID) {
+        int LEFTMARGINIP = 0; //left margin - inner panel
+        int COLUMNIP = 0; //left column - inner panel
+
+        JLabel lCoordinates = new JLabel();
+        cCoordinates = new JTextField();
+        final JPanel pCoordinates = new JPanel();
+        final JToggleButton bCoordinates = new JToggleButton();
+        JLabel lX = new JLabel();
+        cX = new JTextField();
+        JLabel lY = new JLabel();
+        cY = new JTextField();
+
+        addInnerPanel(panel, pCoordinates, bCoordinates, lCoordinates, cCoordinates, MessagesGED.coordinates, ROW);
+        bCoordinates.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                pCoordinates.setVisible(!bCoordinates.isSelected());
+            }
+        });
+        //Position X
+        addLabelTextField(pCoordinates, lX, MessagesGED.x_coordinate,
+                                 cX, true, LEFTMARGINIP, COLUMNIP, 0);
+        cX.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                updateCoordinates(UID);
+            }
+        });
+        cX.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(FocusEvent evt) {
+                updateCoordinates(UID);
+            }
+        });
+        //Position Y
+        addLabelTextField(pCoordinates, lY, MessagesGED.y_coordinate,
+                                 cY, true, LEFTMARGINIP, COLUMNIP, 1);
+        cY.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                updateCoordinates(UID);
+            }
+        });
+        cY.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(FocusEvent evt) {
+                updateCoordinates(UID);
+            }
+        });
+        //Get the current status of the property: Position
+        getCoordinates(UID);
+    }
+
+    /**
+    * Inserts the current state of property: Position.
+    */
+    public final void titleCoordinates() {
+        cCoordinates.setText(" [" + cX.getText() + " , " + cY.getText() + "]");
+    }
+
+    /**
+    * Get status of the property: Position (coordinates).
+    */
+    private void getCoordinates(String UID) {
+        Double[] coordinates = (Double []) GraphicController.getController()
+                    .getProperty(UID, GraphicObjectProperties.__GO_POSITION__);
+        cX.setText(coordinates[0].toString());
+        cY.setText(coordinates[1].toString());
+        titleCoordinates();
+    }
+
+    /**
+    * Updates the property: Position.
+    */
+    private void updateCoordinates(String UID) {
+        try {
+            Double[] value = new Double[3];
+            value[0] = Double.parseDouble(cX.getText());
+            value[1] = Double.parseDouble(cY.getText());
+            value[2] = 0.0;
+            GraphicController.getController()
+                    .setProperty(UID, GraphicObjectProperties.__GO_POSITION__, value);
+            titleCoordinates();
+        } catch (NumberFormatException e) {
+            getCoordinates(UID);
+        }
+    }
+
+    /**
+     * Components of the property: Text Strings
+     * @param panel
+     * @param ROW
+     * @param COLUMN
+     * @param LEFTMARGIN
+     * @param UID 
+     */
+    public void text(JPanel panel, int ROW, int COLUMN, int LEFTMARGIN, final String UID) {
+        JLabel lText = new JLabel();
+        final JTextField cText = new JTextField();
+        addLabelTextField(panel, lText, MessagesGED.text,
+                         cText, true, LEFTMARGIN, COLUMN, ROW++);
+        cText.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent evt) {
+                String[] text = new String[] {cText.getText()};
+                GraphicController.getController().setProperty(UID, GraphicObjectProperties.__GO_TEXT_STRINGS__, text);
+            }
+        });
+        cText.addFocusListener(new FocusAdapter() {
+            @Override
+            public void focusLost(FocusEvent evt) {
+                String[] text = new String[] {cText.getText()};
+                GraphicController.getController().setProperty(UID, GraphicObjectProperties.__GO_TEXT_STRINGS__, text);
+            }
+        });
+        // Get the current status of the property: Text
+        String[] text = (String[]) GraphicController.getController()
+                    .getProperty(UID, GraphicObjectProperties.__GO_TEXT_STRINGS__);
+        cText.setText(text[0]);
+    }
+}
\ No newline at end of file