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; + } + +}