From 0ecf1a02b797ad1b10096fb31783a0aa39cfe714 Mon Sep 17 00:00:00 2001 From: Valentin Boulanger Date: Sun, 22 Nov 2020 15:54:28 +0100 Subject: [PATCH] =?UTF-8?q?Impl=C3=A9mentation=20de=20la=20classe=20Select?= =?UTF-8?q?point?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppThinker/src/Selectpoint.java | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 AppThinker/src/Selectpoint.java diff --git a/AppThinker/src/Selectpoint.java b/AppThinker/src/Selectpoint.java new file mode 100644 index 0000000..68d4ea0 --- /dev/null +++ b/AppThinker/src/Selectpoint.java @@ -0,0 +1,54 @@ +/** + * Gère un point de sélection d'un élément. + * @author V.BOULANGER + */ +public class Selectpoint { + + public static int _selectpointsId = 0; + public static final int TOP_LEFT = 0; + public static final int TOP = 1; + public static final int TOP_RIGHT = 2; + public static final int LEFT = 3; + public static final int RIGHT = 4; + public static final int BOTTOM_LEFT = 5; + public static final int BOTTOM = 6; + public static final int BOTTOM_RIGHT = 7; + + private int _id; + private int _location; + + /** + * Constructeur - Crée un point de sélection pour un élément. + * @param location L'endroit où doit apparaître le point de sélection sur l'élément. + */ + public Selectpoint(int location){ + _selectpointsId++; + _id = _selectpointsId; + _location = location; + } + + /** + * Récupère le numéro du point de sélection. + * @return Le numéro du point de sélection. + */ + public int getId(){ + return this._id; + } + + /** + * Récupère l'endroit où est affiché le point de sélection. + * @return L'endroit où est affiché le point de sélection. + */ + public int getLocation(){ + return this._location; + } + + /** + * Paramètre l'endroit où doit être afficher le point de sélection. + * @param location L'endroit où doit être affiché le point de sélection. + */ + public void setLocation(int location){ + this._location = location; + } + +}