Package mage.view

Examples of mage.view.CardsView


      cards.clear();
      for (Card card: CardsStorage.getAllCards()) {
        if (filter.match(card))
          cards.add(card);
      }
      this.cardGrid.loadCards(new CardsView(cards), bigCard, null);
    }
    finally {
      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
  }
View Full Code Here


    filterCards();
  }//GEN-LAST:event_cbExpansionSetActionPerformed

  private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnClearActionPerformed
    cards.clear();
    this.cardGrid.loadCards(new CardsView(cards), bigCard, null);
  }//GEN-LAST:event_btnClearActionPerformed
View Full Code Here

  private void btnBoosterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBoosterActionPerformed
    List<Card> booster = ((ExpansionSet)this.cbExpansionSet.getSelectedItem()).createBooster();
    for (Card card: booster) {
      cards.add(card);
    }
    this.cardGrid.loadCards(new CardsView(cards), bigCard, null);
  }//GEN-LAST:event_btnBoosterActionPerformed
View Full Code Here

  private void refreshDeck() {
    try {
      setCursor(new Cursor(Cursor.WAIT_CURSOR));
      this.txtDeckName.setText(deck.getName());
      deckArea.getDeckList().loadCards(new CardsView(deck.getCards()), bigCard, null);
      deckArea.getSideboardList().loadCards(new CardsView(deck.getSideboard()), bigCard, null);
    }
    finally {
      setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
  }
View Full Code Here

  }

  private synchronized void target(UUID playerId, String question, Cards cards, Set<UUID> targets, boolean required) {
    if (gameSessions.containsKey(playerId)) {
      if (cards != null)
        gameSessions.get(playerId).target(question, new CardsView(cards.getCards(game)), targets, required, getGameView(playerId));
      else
        gameSessions.get(playerId).target(question, new CardsView(), targets, required, getGameView(playerId));
    }
    informOthers(playerId);
  }
View Full Code Here

    informOthers(playerId);
  }

  private synchronized void target(UUID playerId, String question, Collection<? extends Ability> abilities, boolean required) {
    if (gameSessions.containsKey(playerId))
      gameSessions.get(playerId).target(question, new CardsView(abilities, game.getState()), null, required, getGameView(playerId));
    informOthers(playerId);
  }
View Full Code Here

    informOthers(playerId);
  }

  private synchronized void revealCards(String name, Cards cards) {
    for (GameSession session: gameSessions.values()) {
      session.revealCards(name, new CardsView(cards.getCards(game)));
    }
  }
View Full Code Here

    }
  }

  private synchronized void lookAtCards(UUID playerId, String name, Cards cards) {
    if (gameSessions.containsKey(playerId))
      gameSessions.get(playerId).revealCards(name, new CardsView(cards.getCards(game)));
  }
View Full Code Here

    return new GameView(game.getState(), game);
  }

  private GameView getGameView(UUID playerId) {
    GameView gameView = new GameView(game.getState(), game);
    gameView.setHand(new CardsView(game.getPlayer(playerId).getHand().getCards(game)));
    return gameView;
  }
View Full Code Here

                    choices,
                    this.chosenHandKey);

        if (newChosenHandKey != null && newChosenHandKey.length() > 0) {
            this.chosenHandKey = newChosenHandKey;
            CardsView cards = handCards.get(chosenHandKey);
            handContainer.loadCards(cards, bigCard, gameId);
        }
    }
View Full Code Here

TOP

Related Classes of mage.view.CardsView

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.