still more Deck Editor changes

This commit is contained in:
BetaSteward 2011-01-11 15:51:57 -05:00
parent 436c48b17e
commit f74df18cc9
11 changed files with 132 additions and 69 deletions

View file

@ -35,7 +35,12 @@
package mage.client.deckeditor;
import mage.cards.decks.Deck;
import mage.client.cards.BigCard;
import mage.client.cards.CardsList;
import mage.client.util.Event;
import mage.client.util.Listener;
import mage.view.CardsView;
/**
*
@ -55,12 +60,26 @@ public class DeckArea extends javax.swing.JPanel {
this.sideboardList.setVisible(show);
}
public CardsList getDeckList() {
return deckList;
public void loadDeck(Deck deck, BigCard bigCard) {
deckList.loadCards(new CardsView(deck.getCards()), bigCard, null, true);
if (sideboardList.isVisible())
sideboardList.loadCards(new CardsView(deck.getSideboard()), bigCard, null, true);
}
public CardsList getSideboardList() {
return sideboardList;
public void addDeckEventListener(Listener<Event> listener) {
deckList.addCardEventListener(listener);
}
public void clearDeckEventListeners() {
deckList.clearCardEventListeners();
}
public void addSideboardEventListener(Listener<Event> listener) {
sideboardList.addCardEventListener(listener);
}
public void clearSideboardEventListeners() {
sideboardList.clearCardEventListeners();
}
/** This method is called from within the constructor to