forked from External/mage
program towards Interface rather than implementations
This commit is contained in:
parent
b04c436801
commit
ae7919cd07
100 changed files with 218 additions and 209 deletions
|
|
@ -3,6 +3,7 @@ package mage.client.dialog;
|
|||
import java.awt.*;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.swing.*;
|
||||
import mage.cards.decks.Deck;
|
||||
|
|
@ -951,7 +952,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
|
||||
private void loadRandomPacks(int version) {
|
||||
String versionStr = prepareVersionStr(version, false);
|
||||
ArrayList<String> packList;
|
||||
List<String> packList;
|
||||
String packNames;
|
||||
String randomPrefs = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PACKS_RANDOM_DRAFT + versionStr, "");
|
||||
if (!randomPrefs.isEmpty()) {
|
||||
|
|
@ -1219,7 +1220,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
this.isRandom = tournamentType.isRandom();
|
||||
this.isRichMan = tournamentType.isRichMan();
|
||||
tOptions.getLimitedOptions().getSetCodes().clear();
|
||||
ArrayList<String> selected = randomPackSelector.getSelectedPacks();
|
||||
List<String> selected = randomPackSelector.getSelectedPacks();
|
||||
Collections.shuffle(selected);
|
||||
int maxPacks = 3 * (players.size() + 1);
|
||||
if (tournamentType.isRichMan()) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import javax.swing.event.DocumentListener;
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
|
|
@ -19,7 +20,7 @@ import java.util.*;
|
|||
public class PickCheckBoxDialog extends MageDialog {
|
||||
|
||||
Choice choice;
|
||||
ArrayList<KeyValueItem> allItems = new ArrayList<>();
|
||||
List<KeyValueItem> allItems = new ArrayList<>();
|
||||
DefaultListModel<KeyValueItem> dataModel = new DefaultListModel();
|
||||
CheckBoxList.CheckBoxListModel m_dataModel;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import javax.swing.event.DocumentListener;
|
|||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author JayDi85
|
||||
|
|
@ -18,8 +19,8 @@ import java.util.*;
|
|||
public class PickChoiceDialog extends MageDialog {
|
||||
|
||||
Choice choice;
|
||||
ArrayList<KeyValueItem> allItems = new ArrayList<>();
|
||||
DefaultListModel<KeyValueItem> dataModel = new DefaultListModel();
|
||||
List<KeyValueItem> allItems = new ArrayList<>();
|
||||
DefaultListModel<KeyValueItem> dataModel = new DefaultListModel<>();
|
||||
|
||||
final private static String HTML_TEMPLATE = "<html><div style='text-align: center;'>%s</div></html>";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ package mage.client.dialog;
|
|||
|
||||
import java.awt.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JOptionPane;
|
||||
import mage.cards.repository.ExpansionInfo;
|
||||
|
|
@ -58,7 +59,7 @@ public class RandomPacksSelectorDialog extends javax.swing.JDialog {
|
|||
this.setModal(true);
|
||||
}
|
||||
|
||||
public void setSelectedPacks(ArrayList<String> packs) {
|
||||
public void setSelectedPacks(List<String> packs) {
|
||||
if (!boxesCreated) {
|
||||
createCheckboxes();
|
||||
}
|
||||
|
|
@ -72,8 +73,8 @@ public class RandomPacksSelectorDialog extends javax.swing.JDialog {
|
|||
}
|
||||
}
|
||||
|
||||
public ArrayList<String> getSelectedPacks() {
|
||||
ArrayList<String> returnVal = new ArrayList<>();
|
||||
public List<String> getSelectedPacks() {
|
||||
List<String> returnVal = new ArrayList<>();
|
||||
for (Component pack : pnlPacks.getComponents()) {
|
||||
JCheckBox thePack = (JCheckBox) pack;
|
||||
if (thePack.isSelected()) {
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public class TestCardRenderDialog extends MageDialog {
|
|||
Player playerOpponent = new StubPlayer("player2", RangeOfInfluence.ALL);
|
||||
game.addPlayer(playerOpponent, deck);
|
||||
|
||||
ArrayList<CardView> cardViews = new ArrayList<>();
|
||||
java.util.List<CardView> cardViews = new ArrayList<>();
|
||||
///*
|
||||
cardViews.add(createPermanentCard(game, playerYou.getId(), "RNA", "263", 0, 0, 0, false)); // mountain
|
||||
cardViews.add(createPermanentCard(game, playerYou.getId(), "RNA", "185", 0, 0, 0, true)); // Judith, the Scourge Diva
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue