Implémentation de la classe Selectpoint

This commit is contained in:
2020-11-22 15:54:28 +01:00
parent 9f089b3ef0
commit 0ecf1a02b7

View File

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