mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Merge
This commit is contained in:
commit
a21ed8c30c
1 changed files with 9 additions and 5 deletions
|
@ -37,10 +37,7 @@ package mage.client.deckeditor;
|
|||
import java.awt.Cursor;
|
||||
import java.awt.event.ComponentEvent;
|
||||
import java.awt.event.ComponentListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import mage.Constants.CardType;
|
||||
import mage.cards.Card;
|
||||
|
@ -75,7 +72,14 @@ public class CardSelector extends javax.swing.JPanel implements ComponentListene
|
|||
|
||||
public void loadCards(BigCard bigCard) {
|
||||
this.bigCard = bigCard;
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel(Sets.getInstance().values().toArray()));
|
||||
Object[] l = Sets.getInstance().values().toArray();
|
||||
Arrays.sort(l, new Comparator<Object>() {
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
return ((ExpansionSet)o1).getName().compareTo(((ExpansionSet)o2).getName());
|
||||
}
|
||||
});
|
||||
cbExpansionSet.setModel(new DefaultComboBoxModel(l));
|
||||
// cbExpansionSet.insertItemAt("All sets", 0);
|
||||
cbExpansionSet.setSelectedIndex(0);
|
||||
filter.setUseColor(true);
|
||||
|
|
Loading…
Reference in a new issue