Package javafx.scene.image

Examples of javafx.scene.image.Image


    _firstTake = null;
    grid.getChildren().clear();
    grid.setAlignment(Pos.CENTER);
    _playedCard = new ArrayList<ImageView>();
    for (int i = 0; i < 4; i++) {
      _playedCard.add(new ImageView(new Image(
          "res\\cartes\\carte_inconnue.png")));
      if (i % 2 == 1)
        _playedCard.get(i).setRotate(90);
    }
    grid.add(_playedCard.get(0), 1, 0);
View Full Code Here


      _gridCenter = new GridPane();
    _gridCenter.getChildren().clear();
    _gridCenter.setAlignment(Pos.CENTER);
    _firstTake = true;

    ImageView image = new ImageView(new Image(lien));
    GridPane.setMargin(image, insets);
    GridPane.setHalignment(image, HPos.CENTER);
    _gridCenter.add(image, 0, 0);

    _takeButton = new Button("Prendre");
View Full Code Here

  @SuppressWarnings("unchecked")
  public void chooseAtout(Famille fam) {
    _firstTake = false;

    _carreau = new RadioButton();
    _carreau.setGraphic(new ImageView(new Image(
        "res\\icones\\carreau_ico.png")));
    _carreau.setToggleGroup(_atoutToggleGroup);
    _carreau.setOnAction(this);

    _coeur = new RadioButton();
    _coeur.setGraphic(new ImageView(new Image("res\\icones\\coeur_ico.png")));
    _coeur.setToggleGroup(_atoutToggleGroup);
    _coeur.setOnAction(this);

    _pique = new RadioButton();
    _pique.setGraphic(new ImageView(new Image("res\\icones\\pique_ico.png")));
    _pique.setToggleGroup(_atoutToggleGroup);
    _pique.setOnAction(this);

    _trefle = new RadioButton();
    _trefle.setGraphic(new ImageView(new Image(
        "res\\icones\\trefle_ico.png")));
    _trefle.setToggleGroup(_atoutToggleGroup);
    _trefle.setOnAction(this);

    switch (fam) {
View Full Code Here

   * @param lien
   *            Chemin de l'image
   */
  @SuppressWarnings("unchecked")
  public void addCard(Position pos, String lien) {
    ImageView card = new ImageView(new Image(lien));
    switch (pos) {
    case SUD:
      card.setOnMouseClicked(this);
      if (_southCard.size() > 0)
        GridPane.setMargin(card, new Insets(0, 0, 0, -50));
View Full Code Here

   * @param pos Position du joueur
   * @param imgPath Chemin de l'image de la carte
   */
  private void addCard(Position pos, String imgPath)
  {
    ImageView card = new ImageView(new Image(imgPath));
   
    switch(pos)
    {
      //Main du joueur courant - cartes visibles
      case SOUTH:
View Full Code Here

   */
  private void showTrump(String imgPath)
  {
    Insets insets = new Insets(5, 0, 5, 0);
   
    ImageView image = new ImageView(new Image(imgPath));
   
    GridPane.setMargin(image, insets);
    GridPane.setHalignment(image, HPos.CENTER);
   
    centerGrid.getChildren().clear();
View Full Code Here

    centerGrid.getChildren().clear();
    centerGrid.setAlignment(Pos.CENTER);
   
    playedCard = new ArrayList<ImageView>();
    for (int i = 0; i < 4; i++) {
      playedCard.add(new ImageView(new Image(
          "res\\cartes\\carte_inconnue.png")));
      if (i % 2 == 1)
        playedCard.get(i).setRotate(90);
    }
    centerGrid.add(playedCard.get(0), 1, 0);
View Full Code Here

   * @param fam Atout qui ne peut plus �tre choisi
   */
  private void otherTrumps(Family fam)
  {
    diamonds = new RadioButton();
    diamonds.setGraphic(new ImageView(new Image("res\\icones\\carreau_ico.png")));
    diamonds.setToggleGroup(trumpToggleGroup);
    diamonds.setOnAction(new TakeTrumpHandler());

    hearts = new RadioButton();
    hearts.setGraphic(new ImageView(new Image("res\\icones\\coeur_ico.png")));
    hearts.setToggleGroup(trumpToggleGroup);
    hearts.setOnAction(new TakeTrumpHandler());

    spades = new RadioButton();
    spades.setGraphic(new ImageView(new Image("res\\icones\\pique_ico.png")));
    spades.setToggleGroup(trumpToggleGroup);
    spades.setOnAction(new TakeTrumpHandler());

    clubs = new RadioButton();
    clubs.setGraphic(new ImageView(new Image("res\\icones\\trefle_ico.png")));
    clubs.setToggleGroup(trumpToggleGroup);
    clubs.setOnAction(new TakeTrumpHandler());
   
    switch(fam)
    {
View Full Code Here

              starter++;
            }
           
            for(Card c : game.getCarpet().getCards())
            {
              playCard(playPos[(starter - game.getCarpet().getCards().size() + 4)%4], new Image(c.getImg()));
              starter++;
            }
           
            if(game.getPacket().getCards().size() > 0)
            {
              Pack packet = game.getPacket();
              setFold(new ImageView(new Image(packet.getCards().get(packet.getCards().size() - 4).getImg())),
                  new ImageView(new Image(packet.getCards().get(packet.getCards().size() - 3).getImg())),
                  new ImageView(new Image(packet.getCards().get(packet.getCards().size() - 2).getImg())),
                  new ImageView(new Image(packet.getCards().get(packet.getCards().size() - 1).getImg())));
            }
           
            setTrump(game.getCurrentSet().getTrump());
          }
        }
View Full Code Here

   * @param pos Position du joueur
   * @param imgPath Chemin de l'image de la carte
   */
  private void addCard(Position pos, String imgPath)
  {
    ImageView card = new ImageView(new Image(imgPath));
   
    switch(pos)
    {
      //Main du joueur courant - cartes visibles
      case SOUTH:
View Full Code Here

TOP

Related Classes of javafx.scene.image.Image

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.