Package client.gui.misc

Examples of client.gui.misc.ClientJButton


        /* creer un bouton
         * lui ajouter un listener
         * l'ajouter sur la grille
         * l'ajouter dans la matrice de boutons, pour avoir les coordonnees.
         */
        ClientJButton unBouton = new ClientJButton(ImagesMap.get(ImagesMap.EMPTY));
        unBouton.addActionListener(this);
        unBouton.setBloque(false);
        this.add(unBouton);
        this.grille[i-1][j-1] = unBouton;
      }
    }
  }
View Full Code Here


        if(e == this.grille[i][j]){
          // on dit au pere d'envoyer le point
          try{

            // recuperation du champ
            ClientJButton bt = this.grille[i][j];

            // si le bouton est deja joue, on le bloque.
            if(bt.isBloque()){
              this.pere.warning("Impossible de jouer cette case !");
            }else{
              // envoi du point joue.
              this.pere.envoyerPoint(i,j);

              bt.setBloque(true);
              this.disableAllButtons();
              this.setImage(bt);

            }           
            // blocage du bouton joue.
View Full Code Here

  }


  public void showPointAdversaire(Point p){
    ClientJButton bt = this.grille[p.getX()][p.getY()];
    bt.setBloque(true);
    this.setOtherImage(bt);
    this.enableAllButtons();

  }
View Full Code Here

  }
 
  public void resetGrille(){
    for(int i = 0; i < this.dimension; i ++){
      for(int j = 0; j < this.dimension; j++){
        ClientJButton b = this.grille[i][j];
        b.setBloque(false);
        b.setEnabled(false);
        b.setIcon(ImagesMap.get(ImagesMap.EMPTY));
      }
    }
  }
View Full Code Here

TOP

Related Classes of client.gui.misc.ClientJButton

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.