Package model

Examples of model.Boule


    Component component = e.getComponent();

    if ((component instanceof Boule) && (component.getName() != "0")) {

      Boule b = (Boule) component;
      if (b.getDrag())
        vue.boulePartie(e.getComponent().getBounds(),Integer.parseInt(e.getComponent().getName()));     

    }
  }
View Full Code Here


  public void mouseReleased(MouseEvent e) {
    Component component = e.getComponent();

    if ((component instanceof Boule) && (component.getName() != "0")) {

      Boule b = (Boule)component;

      int detect = detectionv(e);
      System.out.println("detection" + detect);
      //convention personnel
      if (detect!=250)
      b.setBounds(partie.getProposition()[partie.getLigne()][detect].getBounds().x, partie.getProposition()[partie.getLigne()][detect].getBounds().y, 50, 50);
   
      if (detect <= partie.getNbreColonne()) {

        try {
          if (b.getDrag()) {
            getJeu(Integer.parseInt(component.getName()), detect);
            b.setDrag(false);
            b.setPosition(detect);
          //  b.setVisible(false);
          } else {
           
            partie.getProposition()[partie.getLigne()][b.getPosition()].setCouleur(0);
            getJeu(Integer.parseInt(component.getName()), detect);
          }

        } catch (ExceptionJeu ej) {
          traiter_err(ej);
        }

      } else {
        b.setVisible(false);
        partie.getProposition()[partie.getLigne()][b.getPosition()].setCouleur(0);
      }

    }

  }
View Full Code Here

  public void mouseEntered(MouseEvent e) {

    Component component = e.getComponent();

    if (component instanceof Boule) {
      Boule b = (Boule) component;
      b.setOpaque(true);
      b.setOpaque(false);
      b.setIcon(vue.grasPion(Integer.parseInt(b.getName())));
    }
  }
View Full Code Here

  @Override
  public void mouseExited(MouseEvent e) {
    Component component = e.getComponent();

    if (component instanceof Boule) {
      Boule b = (Boule) component;
      b.setIcon(vue.mettrePion(Integer.parseInt(b.getName())));
      b.setOpaque(false);
    }
  }
View Full Code Here

    Component component = e.getComponent();   

    if ((component instanceof Boule) && (component.getName() != "0")) {

      Boule b = (Boule)component;
      b.setBounds(b.getX()+e.getX()-5,b.getY()-5+e.getY(),50,50);
    }
  }
View Full Code Here

TOP

Related Classes of model.Boule

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.