コード例 #1
0
 private void boutton_LocaliserActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_boutton_LocaliserActionPerformed
   Ville depart = new Ville(), arrivee = new Ville();
   depart.setGouvernorat(cb_GouvernoratDepart.getSelectedItem().toString());
   depart.setDelegation(cb_DelegationDepart.getSelectedItem().toString());
   depart.setLatitude(villeDAO.localiserVille_nom(depart.getGouvernorat()).getLatitude());
   depart.setLongitude(villeDAO.localiserVille_nom(depart.getGouvernorat()).getLongitude());
   arrivee.setGouvernorat(cb_GouvernoratArrivee.getSelectedItem().toString());
   arrivee.setDelegation(cb_DelegationArrivee.getSelectedItem().toString());
   arrivee.setLatitude(villeDAO.localiserVille_nom(arrivee.getGouvernorat()).getLatitude());
   arrivee.setLongitude(villeDAO.localiserVille_nom(arrivee.getGouvernorat()).getLongitude());
   Navigateur.main(depart, arrivee);
 } // GEN-LAST:event_boutton_LocaliserActionPerformed
コード例 #2
0
 private void remplirGouvernoratDepart() {
   listGouvernoratsDepart = villeDAO.afficheGouvernorat();
   for (Ville ville : listGouvernoratsDepart) {
     cb_GouvernoratDepart.addItem(ville.getGouvernorat());
   }
 }
コード例 #3
0
 private void remplirGouvernoratArrivee() {
   listGouvernoratsArrivee = villeDAO.afficheGouvernorat();
   for (Ville ville : listGouvernoratsArrivee) {
     cb_GouvernoratArrivee.addItem(ville.getGouvernorat());
   }
 }