a right overload of message is wrapped into a wait-till-edt-executes loop

carddb will include MMA in stats if the latter are collected
This commit is contained in:
Maxmtg
2013-06-08 15:11:33 +00:00
parent 40091a7189
commit 758b6294e5
2 changed files with 10 additions and 10 deletions

View File

@@ -71,7 +71,7 @@ public final class CardDb implements ICardDatabase {
synchronized (CardDb.class) {
if (CardDb.commonCards == null) { // It's broken under 1.4 and below, on 1.5+ works again!
CardSorter cs = new CardSorter(rules);
commonCards = new CardDb(cs.regularCards, editions, false /*true*/);
commonCards = new CardDb(cs.regularCards, editions, false);
variantCards = new CardDb(cs.variantsCards, editions, false);
}
}
@@ -99,7 +99,7 @@ public final class CardDb implements ICardDatabase {
this.rulesByName = rules;
List<String> missingCards = new ArrayList<String>();
for(CardEdition e : editions) {
boolean worthLogging = logMissingCards && ( e.getType() == Type.CORE || e.getType() == Type.EXPANSION );
boolean worthLogging = logMissingCards && ( e.getType() == Type.CORE || e.getType() == Type.EXPANSION || e.getType() == Type.REPRINT );
if(worthLogging)
System.out.print(e.getName() + " (" + e.getCards().length + " cards)");
String lastCardName = null;

View File

@@ -67,17 +67,17 @@ public class GuiDialog {
* a {@link java.lang.String} object.
*/
public static void message(final String message) {
FThreads.invokeInEdtAndWait( new Runnable() {
@Override
public void run() {
message(message, UIManager.getString("OptionPane.messageDialogTitle"));
}
});
}
public static void message(final String message, String title) {
JOptionPane.showMessageDialog(null, message, title, JOptionPane.PLAIN_MESSAGE);
public static void message(final String message, final String title) {
FThreads.invokeInEdtAndWait(new Runnable() {
@Override
public void run() {
JOptionPane.showMessageDialog(null, message, title, JOptionPane.PLAIN_MESSAGE);
}
});
}
/**