Ejemplo n.º 1
0
 public void setDeck(Deck d) {
   deck = d;
   cardList = deck.getList();
   removeAll();
   createGUI();
   setVisible(false);
   setVisible(true);
 }
Ejemplo n.º 2
0
 public CardEditor() {
   String name = null;
   while (name == null) {
     name = JOptionPane.showInputDialog("Deck Name:");
   }
   deck = new Deck(name);
   cardList = deck.getList();
   createGUI();
 }
Ejemplo n.º 3
0
 public CardEditor(Deck deck) {
   this.deck = deck;
   cardList = deck.getList();
   createGUI();
 }
Ejemplo n.º 4
0
 public void cleanUp() {
   if (cardList.getSelectedIndex() != -1) {
     deck.getCard(cardList.getSelectedIndex()).setSide(1, side1.getText());
     deck.getCard(cardList.getSelectedIndex()).setSide(2, side2.getText());
   }
 }