Package model

Examples of model.Station


   *
   * @param controller le controlleur principal du logiciel
   */
  public InsertStations(Controller controller) {
    super();
    this.temp = new Station();
    this.controller = controller;
  }
View Full Code Here


    Choice period = new Choice();
    period.addItem("Semaine");
    period.addItem("Week-end");
   
    Line tempLine = new Line();
    Station tempStation = new Station();
    Period tempPeriod = new Period();
   
    //Crée un message contenant des chaînes de caractères et les listes déroulantes
    Object[] message = new Object[] { "Ligne : ", line,
        "Station : ", station, "Période : " , period};
   
    //Crée la pop-up contenant le message
    int r = JOptionPane.showConfirmDialog(null, message,
        "Modifier des horaires", JOptionPane.OK_CANCEL_OPTION);
   
    //Si l'utilisateur a cliqué sur le bouton "OK"
    if (r == JOptionPane.OK_OPTION) {
      tempLine.setName(line.getSelectedItem().toString());
      tempStation.setName(station.getSelectedItem().toString());
     
      if(period.getSelectedItem()=="Semaine")
        numberPeriod=0;
      else
        numberPeriod=1;
View Full Code Here

   *
   * @param controller le controlleur principal du logiciel
   */
  public DeleteStation(Controller controller) {
    super();
    this.temp = new Station();
    this.controller = controller;
  }
View Full Code Here

   *
   * @param controller le controlleur principal du logiciel
   */
  public AlterStations(Controller controller) {
    super();
    this.temp = new Station();
    this.temp2 = new Station();
    this.controller = controller;
  }
View Full Code Here

   *
   * @param station la station concernée par le clic droit
   */
  public void setStation(Station station)
  {
    this.temp = new Station();
    temp.setName(station.getName());
    temp2.setName(station.getName());
  }
View Full Code Here

    if(temp==null)
    {
      errorPopup("noStation");
      return;
    }
    temp=new Station(temp);
   
    //Récupère la position de la station dans la liste de stations
    positionInList=controller.positionInListStation(temp);
   
    //Champ de texte modifiable contenant le nom de la station
View Full Code Here

    //Si l'utilisateur a cliqué sur le bouton "Valider et continuer" ou "Finaliser"
    if (r == JOptionPane.YES_OPTION || r == JOptionPane.NO_OPTION)
    {
      if(r == JOptionPane.YES_OPTION)
      {
        Station tempStation = new Station();
       
        //Vérifie qu'il y a bien une station de sélectionnée
        if(stationToAdd.getSelectedItem()==null)
        {
          errorPopup("noStationToAdd");
          return;
        }
       
        tempStation.setName(stationToAdd.getSelectedItem().toString());
       
        tempStation=controller.copyStation(tempStation);
       
        //Vérifie que la station existe
        if(tempStation==null)
View Full Code Here

   * @return une matrice de double
   */
  public double[][] getMaxMinCoordinate(){
    double toReturn[][] = new double[2][2];
   
    Station allStations[] = this.getStations();
   
    int size = allStations.length;
    double minLon, minLat, maxLon, maxLat;
   
    //S'il y a des stations
View Full Code Here

   
    JComboBox terminus2 = new JComboBox();
    AutoCompleteSupport support2 = AutoCompleteSupport.install(
            terminus2, GlazedLists.eventListOf(stations));

    Station station1 = new Station();
    Station station2 = new Station();
   
    //Message contenant deux chaînes de caractères et les deux listes déroulantes
    Object[] message = new Object[] { "Station de départ : ", terminus1,
        "Station d'arrivée : ", terminus2 };
   
    //Lance la pop-up de modification contenant le message
    int r = JOptionPane.showConfirmDialog(null, message,
        "Ajouter des terminus", JOptionPane.OK_CANCEL_OPTION);
   
    //Si l'utilisateur a cliqué sur le bouton "OK"
    if (r == JOptionPane.OK_OPTION) {
      station1.setName(terminus1.getSelectedItem().toString());
      station2.setName(terminus2.getSelectedItem().toString());
      station1=controller.copyStation(station1);
      station2=controller.copyStation(station2);
      if(station1!=null && station2!=null)
      {
      temp.getStations().add(station1);
View Full Code Here

    Choice period = new Choice();
    period.addItem("Semaine");
    period.addItem("Week-end");
   
    Line tempLine = new Line();
    Station tempStation = new Station();
   
    //Crée un message contenant des chaînes de caractères et les listes déroulantes
    Object[] message = new Object[] { "Ligne : ", line,
        "Station : ", station, "Période : " , period};
   
    //Crée la pop-up contenant le message
    int r = JOptionPane.showConfirmDialog(null, message,
        "Ajouter des horaires", JOptionPane.OK_CANCEL_OPTION);
   
    //Si l'utilisateur a cliqué sur le bouton "OK"
    if (r == JOptionPane.OK_OPTION) {
      tempLine.setName(line.getSelectedItem().toString());
      tempStation.setName(station.getSelectedItem().toString());
     
      if(period.getSelectedItem()=="Semaine")
        numberPeriod=0;
      else
        numberPeriod=1;
View Full Code Here

TOP

Related Classes of model.Station

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.