1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757
|
package ...;
//=== AWT
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Dimension;
import java.awt.Insets;
import java.awt.Font;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
//=== SWING
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import javax.swing.border.LineBorder;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;
public class F3_ChoixDomaine extends JFrame implements ActionListener{
/**
*
*/
private static final long serialVersionUID = 7153360834979267461L;
private JPanel contentPaneF3 = new JPanel();
private JTextField F3_txtPassword = new JTextField();
private JPasswordField F3_passwordField = new JPasswordField();
private JTextField F3_txtValidezDomaine = new JTextField();
private JButton btAbsences = new JButton("ABSENCES");
private JButton btBudget = new JButton("BUDGET");
private JButton btDomaine = new JButton("DOMAINE");
private JButton btManifestations = new JButton("MANIFESTATIONS");
private JButton btPressing = new JButton("PRESSING");
private JButton btRecrutement = new JButton("RECRUTEMENT");
private JButton btOuvertures = new JButton("OUVERTURES");
private JButton btQuitter = new JButton("QUITTER");
//COULEURS
//private Color c_rouge = new Color(255,0,0);
//private Color c_vert = new Color(0,255,0);
//private Color c_bleu = new Color(0,0,255);
/**
* Crée le formulaire.
*/
public F3_ChoixDomaine() {
super();
build();//Cconstruction du 'Frame'
}
private void build()
{
//============================ TITRE DE LA FENETRE ====================
this.setTitle("F3 : Connection domaines");
//====== TAILLE DE LA FENETRE ==========
//setMinimumSize(new Dimension(200, 400));
this.setSize(320, 400);
this.setResizable(false); //On interdit le redimensionnement de la fenetre
setBackground(new Color(255, 182, 193));
//========================== FERMETURE DU FRAME =======================
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//========== POSITION DU FRAME AU CENTRE DE L'ECRAN =================
this.setLocationRelativeTo(null);
//=============== APPELLE LA METHODE POUR CREER LE PANEL ==============
this.setContentPane(buildContentPane());
contentPaneF3.setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{F3_txtPassword, F3_passwordField, F3_txtValidezDomaine, btAbsences, btBudget, btDomaine, btManifestations, btPressing, btRecrutement, btOuvertures, btQuitter}));
//===================== AFFICHE LE FRAME ==============================
this.setVisible(true);
}
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//======================== METHODE POUR CONSTRUIRE LE PANEL ===============
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
private JPanel buildContentPane(){
//Marge verticale entre les éléments
int vBoutonsInset = 10;
//========================== AJOUT DU PANEL ===============================
contentPaneF3.setSize(new Dimension(200, 300));
contentPaneF3.setBackground(new Color(255, 165, 0));
contentPaneF3.setForeground(new Color(255, 255, 255));
contentPaneF3.setBorder(new LineBorder(new Color(0, 0, 0)));
//Layout de 'contentPane'
GridBagLayout gbl_contentPane = new GridBagLayout();
gbl_contentPane.columnWidths = new int[]{250};
contentPaneF3.setLayout(gbl_contentPane);
//Zone de texte
//F3_txtPassword = new JTextField();
F3_txtPassword.setFont(new Font("Serif", Font.BOLD, 11));
F3_txtPassword.setBackground(new Color(255, 215, 0));
F3_txtPassword.setEditable(false);
//F3_txtPassword.setSize(new Dimension(320,20));
//F3_txtPassword.setPreferredSize(new Dimension(305,20));
F3_txtPassword.setHorizontalAlignment(SwingConstants.CENTER);
F3_txtPassword.setText("Entrez votre mot de passe en minuscules,");
GridBagConstraints gbc_F3_txtPassword = new GridBagConstraints();
gbc_F3_txtPassword.fill = GridBagConstraints.BOTH;
gbc_F3_txtPassword.insets = new Insets(0, 0, 5, 0);
gbc_F3_txtPassword.gridx = 0;
gbc_F3_txtPassword.gridy = 0;
contentPaneF3.add(F3_txtPassword, gbc_F3_txtPassword);
//Zone du mot de passe
//F3_passwordField = new JPasswordField();
F3_passwordField.setFont(new Font("Serif", Font.BOLD, 12));
F3_passwordField.setHorizontalAlignment(SwingConstants.CENTER);
F3_passwordField.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_F3_passwordField = new GridBagConstraints();
gbc_F3_passwordField.insets = new Insets(0, 0, 5, 0);
gbc_F3_passwordField.gridx = 0;
gbc_F3_passwordField.gridy = 1;
contentPaneF3.add(F3_passwordField, gbc_F3_passwordField);
//Zone de texte
//F3_txtValidezDomaine = new JTextField();
F3_txtValidezDomaine.setFont(new Font("Serif", Font.BOLD, 11));
F3_txtValidezDomaine.setText("puis validez en cliquant sur le domaine choisi");
//F3_txtValidezDomaine.setPreferredSize(new Dimension(305,20));
F3_txtValidezDomaine.setHorizontalAlignment(SwingConstants.CENTER);
F3_txtValidezDomaine.setEditable(false);
F3_txtValidezDomaine.setColumns(10);
F3_txtValidezDomaine.setBackground(new Color(255, 215, 0));
GridBagConstraints gbc_F3_txtValidezDomaine = new GridBagConstraints();
gbc_F3_txtValidezDomaine.fill = GridBagConstraints.BOTH;
gbc_F3_txtValidezDomaine.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_F3_txtValidezDomaine.gridx = 0;
gbc_F3_txtValidezDomaine.gridy = 2;
contentPaneF3.add(F3_txtValidezDomaine, gbc_F3_txtValidezDomaine);
//======================= BOUTONS DE VALIDATION =========================
//ABSENCES
//btAbsences = new JButton("ABSENCES");
btAbsences.setFont(new Font("Serif", Font.BOLD, 12));
btAbsences.setBackground(new Color(240, 230, 140));
btAbsences.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btAbsences = new GridBagConstraints();
gbc_btAbsences.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_btAbsences.gridx = 0;
gbc_btAbsences.gridy = 3;
btAbsences.addActionListener(this);
contentPaneF3.add(btAbsences, gbc_btAbsences);
//BUDGET
//btBudget = new JButton("BUDGET");
btBudget.setFont(new Font("Serif", Font.BOLD, 12));
btBudget.setBackground(new Color(255, 255, 0));
btBudget.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btBudget = new GridBagConstraints();
gbc_btBudget.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_btBudget.gridx = 0;
gbc_btBudget.gridy = 4;
btBudget.addActionListener(this);
contentPaneF3.add(btBudget, gbc_btBudget);
//DOMAINE
//btDomaine = new JButton("DOMAINE");
btDomaine.setFont(new Font("Serif", Font.BOLD, 12));
btDomaine.setBackground(new Color(127, 255, 0));
btDomaine.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btDomaine = new GridBagConstraints();
gbc_btDomaine.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_btDomaine.gridx = 0;
gbc_btDomaine.gridy = 5;
btDomaine.addActionListener(this);
contentPaneF3.add(btDomaine, gbc_btDomaine);
//MANIFESTATIONS
//btManifestations = new JButton("MANIFESTATIONS");
btManifestations.setFont(new Font("Serif", Font.BOLD, 12));
btManifestations.setBackground(new Color(233, 150, 122));
btManifestations.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btManifestations = new GridBagConstraints();
gbc_btManifestations.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_btManifestations.gridx = 0;
gbc_btManifestations.gridy = 6;
btManifestations.addActionListener(this);
contentPaneF3.add(btManifestations, gbc_btManifestations);
//PRESSING
//btPressing = new JButton("PRESSING");
btPressing.setFont(new Font("Serif", Font.BOLD, 12));
btPressing.setBackground(new Color(176, 196, 222));
btPressing.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btPressing = new GridBagConstraints();
gbc_btPressing.insets = new Insets(0, 0,vBoutonsInset, 0);
gbc_btPressing.gridx = 0;
gbc_btPressing.gridy = 7;
btPressing.addActionListener(this);
contentPaneF3.add(btPressing, gbc_btPressing);
//RECRUTEMENT
//btRecrutement = new JButton("RECRUTEMENT");
btRecrutement.setFont(new Font("Serif", Font.BOLD, 12));
btRecrutement.setBackground(new Color(210, 105, 30));
btRecrutement.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btRecrutement = new GridBagConstraints();
gbc_btRecrutement.insets = new Insets(0, 0, vBoutonsInset, 0);
gbc_btRecrutement.gridx = 0;
gbc_btRecrutement.gridy = 8;
btRecrutement.addActionListener(this);
contentPaneF3.add(btRecrutement, gbc_btRecrutement);
//OUVERTURES
//btOuvertures = new JButton("OUVERTURES");
btOuvertures.setFont(new Font("Serif", Font.BOLD, 12));
btOuvertures.setBackground(new Color(123, 104, 238));
btOuvertures.setPreferredSize(new Dimension(180,20));
GridBagConstraints gbc_btOuvertures = new GridBagConstraints();
gbc_btOuvertures.insets = new Insets(0, 0, 30, 0); //L'inset est + grand pour éloigner le bouton 'Quitter'
gbc_btOuvertures.gridx = 0;
gbc_btOuvertures.gridy = 9;
btOuvertures.addActionListener(this);
contentPaneF3.add(btOuvertures, gbc_btOuvertures);
//QUITTER
//btQuitter = new JButton("QUITTER");
btQuitter.setForeground(new Color(0, 0, 205));
btQuitter.setFont(new Font("Serif", Font.BOLD, 12));
btQuitter.setPreferredSize(new Dimension(180, 20));
btQuitter.setBackground(new Color(211, 211, 211));
GridBagConstraints gbc_btQuitter = new GridBagConstraints();
gbc_btQuitter.insets = new Insets(0, 0, 5, 0);
gbc_btQuitter.gridx = 0;
gbc_btQuitter.gridy = 10;
btQuitter.addActionListener(this);
contentPaneF3.add(btQuitter, gbc_btQuitter);
return contentPaneF3; //Les 2 formes marchent.
//return (contentPaneF3);
}
/**
* actionPerformed(ActionEvent e) / Ecoute les boutons
*/
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
//======================== METHODE POUR 'ECOUTER' LES BOUTONS =======================
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
public void actionPerformed(ActionEvent e) {
//Récupérer l'objet sur leque s'est produit l'event.
Object source = e.getSource();
//Vérification de 'event'. Avec toString() on obtient la description du bouton, pas son nom.
//ClassMessagesCreer maVerificationEvent = new ClassMessagesCreer("ActionPerformed", e.getSource().toString(), "");
//RECUPERER ET CONVERTIR LES VALEURS DES JPassword
char[] motdepasse = F3_passwordField.getPassword();
char[] dassArray = {};
//Convertir en String les valeurs des JPassword
String pwd=String.copyValueOf(motdepasse);
//Vérification du mot de passe
//ClassMessagesCreer maVerificationPass = new ClassMessagesCreer("Mot de passe", pwd, "");
//==================================
// Absences,Budget,Domaine,Manifs,Pressing,Recrute,TO
//TRI EXCEL SUR LE NOM PUIS SUR LE PRENOM
String userPwd1 = "_______";
char[] dassArray1 = {'_','_','_','g','_','_','u'};
//================================
String userPwd2 = "_______";
char[] dassArray2 = {'_','_','_','u','_','u','u'};
//==================================
String userPwd3 = "_______";
char[] dassArray3 = {'_','_','_','u','_','_','u'};
//==================================
String userPwd4 = "_______";
char[] dassArray4 = {'_','_','_','u','_','g','_'};
//==================================
String userPwd5 = "_______";
char[] dassArray5 = {'u','u','u','u','u','g','u'};
//==================================
String userPwd6 = "_______";
char[] dassArray6 = {'_','_','u','_','_','_','u'};
//==================================
String userPwd7 = "_______";
char[] dassArray7 = {'_','_','_','_','_','u','u'};
//==================================
String userPwd8 = "_______";
char[] dassArray8 = {'g','g','_','_','_','_','u'};
//==================================
String userPwd9 = "_______";
char[] dassArray9 = {'a','a','a','a','a','a','a'};
//==================================
String userPwd10 = "_______";
char[] dassArray10 = {'u','_','_','u','u','_','u'};
//==================================
String userPwd11 = "_______";
char[] dassArray11 = {'_','_','_','_','_','g','u'};
//==================================
String userPwd12 = "_______";
char[] dassArray12 = {'u','_','_','u','_','_','u'};
//==================================
String userPwd13 = "_______";
char[] dassArray13 = {'_','_','g','u','_','_','u'};
//==================================
String userPwd14 = "_______";
char[] dassArray14 = {'_','_','g','_','_','_','u'};
//==================================
String userPwd15 = "_______";
char[] dassArray15 = {'_','_','_','u','u','_','u'};
//==================================
String userPwd16 = "_______";
char[] dassArray16 = {'_','_','_','g','_','_','u'};
//==================================
String userPwd17 = "_______";
char[] dassArray17 = {'_','_','g','_','_','_','u'};
//==================================
String userPwd18 = "_______";
char[] dassArray18 = {'_','g','_','_','_','g','u'};
//==================================
String userPwd19 = "_______";
char[] dassArray19 = {'_','_','g','u','_','_','u'};
//==================================
String userPwd20 = "_______";
char[] dassArray20 = {'u','u','u','u','u','u','u'};
//==================================
if (pwd.equals(userPwd1)){
dassArray = dassArray1;
}
else if (pwd.equals(userPwd2)){
dassArray = dassArray2;
}
else if (pwd.equals(userPwd3)){
dassArray = dassArray3;
}
else if (pwd.equals(userPwd4)){
dassArray = dassArray4;
}
else if (pwd.equals(userPwd5)){
dassArray = dassArray5;
}
else if (pwd.equals(userPwd6)){
dassArray = dassArray6;
}
else if (pwd.equals(userPwd7)){
dassArray = dassArray7;
}
else if (pwd.equals(userPwd8)){
dassArray = dassArray8;
}
else if (pwd.equals(userPwd9)){
dassArray = dassArray9;
}
else if (pwd.equals(userPwd10)){
dassArray = dassArray10;
}
else if (pwd.equals(userPwd11)){
dassArray = dassArray11;
}
else if (pwd.equals(userPwd12)){
dassArray = dassArray12;
}
else if (pwd.equals(userPwd13)){
dassArray = dassArray13;
}
else if (pwd.equals(userPwd14)){
dassArray = dassArray14;
}
else if (pwd.equals(userPwd15)){
dassArray = dassArray15;
}
else if (pwd.equals(userPwd16)){
dassArray = dassArray16;
}
else if (pwd.equals(userPwd17)){
dassArray = dassArray17;
}
else if (pwd.equals(userPwd18)){
dassArray = dassArray18;
}
else if (pwd.equals(userPwd19)){
dassArray = dassArray19;
}
else if (pwd.equals(userPwd20)){
dassArray = dassArray20;
}
else{
ClassMessagesCreer monMessageSimple = new ClassMessagesCreer("Mot de passe inconnu");
return;
}
//============================================================================================
//======================================== 1 / ABSENCES ======================================
//============================================================================================
if(source == btAbsences){ //Absences
//if(e.getSource() == btAbsences){ //Absences
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[0] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAbsAdmin = new F4_AdmGeneral();
}
else if (dassArray[0] == 'g'){
@SuppressWarnings("unused")
Manifs_AgentsVisu newAbsGest = new Manifs_AgentsVisu();
}
else if (dassArray[0] == 'u'){
@SuppressWarnings("unused")
Manifs_AgentsVisu newAbsUser = new Manifs_AgentsVisu();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Absences Click",ex.getMessage());
//REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Absences
//============================================================================================
//======================================= 2 / BUDGET =========================================
//============================================================================================
if(source == btBudget){ //Budget
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[1] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[1] == 'g'){
//FrameAbsGest newAbsGest = new FrameAbsGest();
}
else if (dassArray[1] == 'u'){
//FrameAbsUser newAbsUser = new FrameAbsUser();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
@SuppressWarnings("unused")
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Budget Click",ex.getMessage());
//REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Budget
//============================================================================================
//====================================== 3 / DOMAINE =========================================
//============================================================================================
if(source == btDomaine){ //Domaine
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[2] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[2] == 'g'){
//FrameAbsGest newAbsGest = new FrameAbsGest();
}
else if (dassArray[2] == 'u'){
//FrameAbsUser newAbsUser = new FrameAbsUser();
}
else {
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Domaine Click",ex.getMessage());
//REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Domaine
//============================================================================================
//====================================== 4 / MANIFS ==========================================
//============================================================================================
if(source == btManifestations){ //Manifs
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[3] == 'a'){
//this.dispose();
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[3] == 'g'){
@SuppressWarnings("unused")
Manifs_AgentsVisu newAgentsVisu = new Manifs_AgentsVisu();
}
else if (dassArray[3] == 'u'){
@SuppressWarnings("unused")
Manifs_AgentsVisu newAgentsVisu = new Manifs_AgentsVisu();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Manifestations Click",ex.getMessage());
//REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Manifs
//============================================================================================
//===================================== 5 / PRESSING =========================================
//============================================================================================
if(source == btPressing){ //Pressing
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[4] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[4] == 'g'){
//FrameAbsGest newAbsGest = new FrameAbsGest();
}
else if (dassArray[4] == 'u'){
//FrameAbsUser newAbsUser = new FrameAbsUser();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Pressing Click",ex.getMessage()); //REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Pressing
//============================================================================================
//================================= 6/ TAUX D'OUVERTURE ======================================
//============================================================================================
if(source == btOuvertures){ //Taux d'ouverture
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[5] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[5] == 'g'){
//FrameAbsGest newAbsGest = new FrameAbsGest();
}
else if (dassArray[5] == 'u'){
//FrameAbsUser newAbsUser = new FrameAbsUser();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Ouvertures Click",ex.getMessage()); //REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Taux d'ouverture
//============================================================================================
//==================================== 7 / RECRUTEMENT =======================================
//============================================================================================
if(source == btRecrutement){ //Recrutement
try { //Try
//ON APPELLE LE FRAME CORRESPONDANT AU DROIT DE L'UTILISATEUR
if (dassArray[6] == 'a'){
@SuppressWarnings("unused")
F4_AdmGeneral newAdmin = new F4_AdmGeneral();
}
else if (dassArray[6] == 'g'){
//FrameAbsGest newAbsGest = new FrameAbsGest();
}
else if (dassArray[6] == 'u'){
//FrameAbsUser newAbsUser = new FrameAbsUser();
}
else{
//APPEL A LA CLASSE 'MyTime'
MyTime importTime = new MyTime();
String nowTime = importTime.getuDate();
//MESSAGE DE CONNECTION ECHOUEE
javax.swing.JOptionPane.showMessageDialog(null,"CONNECTION REFUSEE A : " + nowTime);
}//Else
}//Try
catch (Exception ex){
//Classe Exception Message
ClassMessagesCreer monException = new ClassMessagesCreer("Bouton Recrutement Click",ex.getMessage());
//REMET LA ZT A ZERO
F3_passwordField.setText("");
}
finally {}
}//Recrutement
if(source == btQuitter){
System.exit(0);
}
}
} |
Partager